From: Charles Bailey Date: Wed, 9 Feb 2000 09:09:45 +0000 (+0000) Subject: Resync with mainline X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cb50131aab68ac6dda048612c6e853b8cb08701e;p=p5sagit%2Fp5-mst-13.2.git Resync with mainline p4raw-id: //depot/vmsperl@5049 p4raw-branched: from //depot/perl@4822 'branch in' ext/Sys/Syslog/Makefile.PL ext/Sys/Syslog/Syslog.pm lib/Pod/Find.pm lib/Pod/ParseUtils.pm t/op/exists_sub.t t/op/ver.t t/pragma/diagnostics.t win32/bin/exetype.pl vos/config.def vos/config.pl (@4896..) pod/perlintern.pod (@4915..) ext/Sys/Syslog/Syslog.xs (@4980..) pod/perlunicode.pod (@5013..) pod/perlapi.pod (@5015..) Todo-5.6 (@5027..) p4raw-deleted: from //depot/perl@4822 'delete in' lib/Sys/Syslog.pm (@2406..) Todo-5.005 (@4008..) lib/caller.pm (@4860..) p4raw-edited: from //depot/perl@4822 'edit in' vms/subconfigure.com (@4767..) p4raw-integrated: from //depot/perl@4822 'copy in' hints/unicosmk.sh (@948..) lib/FileHandle.pm (@1044..) lib/ExtUtils/Packlist.pm (@1315..) ext/IPC/SysV/SysV.pm (@1372..) lib/Net/protoent.pm lib/Net/servent.pm lib/Text/Soundex.pm (@1575..) README.vos vos/Changes vos/build.cm vos/compile_perl.cm vos/perl.bind vos/test_vos_dummies.c vos/vos_dummies.c (@1838..) lib/utf8_heavy.pl (@2039..) ext/IO/lib/IO/Seekable.pm lib/ExtUtils/Command.pm lib/Net/hostent.pm lib/Net/netent.pm lib/Time/gmtime.pm lib/Time/localtime.pm lib/User/grent.pm lib/User/pwent.pm (@2620..) eg/cgi/index.html lib/CGI/Apache.pm lib/CGI/Switch.pm (@2830..) ext/IO/lib/IO/Dir.pm ext/IO/lib/IO/Pipe.pm ext/IO/lib/IO/Poll.pm ext/IO/lib/IO/Socket/UNIX.pm (@2882..) t/comp/use.t (@2891..) lib/File/Compare.pm (@3061..) form.h (@3124..) hints/netbsd.sh (@3158..) t/op/grep.t (@3180..) lib/AnyDBM_File.pm (@3317..) lib/Test.pm (@3376..) lib/CPAN/Nox.pm (@3458..) hints/openbsd.sh (@3516..) mg.h (@3524..) lib/CGI/Cookie.pm lib/CGI/Pretty.pm (@3559..) lib/Text/ParseWords.pm (@3563..) ext/IO/lib/IO/File.pm lib/File/Basename.pm (@3650..) x2p/find2perl.PL (@3677..) cflags.SH (@3774..) utils/dprofpp.PL (@3778..) ext/IO/lib/IO/Handle.pm (@3825..) lib/CGI.pm lib/dumpvar.pl (@3848..) README.cygwin lib/ExtUtils/MM_Cygwin.pm (@3852..) README.threads (@3860..) lib/SelfLoader.pm t/io/tell.t t/lib/cgi-html.t t/op/attrs.t (@4076..) ext/SDBM_File/sdbm/sdbm.c (@4082..) lib/Test/Harness.pm (@4092..) pod/perlcompile.pod (@4120..) ext/Opcode/Safe.pm (@4131..) ext/DB_File/Changes ext/DB_File/Makefile.PL ext/DB_File/version.c (@4142..) ext/DB_File/DB_File.xs (@4144..) lib/File/Spec/VMS.pm (@4182..) hints/dynixptx.sh (@4271..) t/lib/fields.t (@4303..) thrdvar.h (@4316..) pod/perlguts.pod (@4339..) Porting/makerel (@4391..) lib/Text/Tabs.pm (@4398..) perlio.c (@4402..) lib/CPAN/FirstTime.pm (@4416..) README (@4433..) lib/attributes.pm (@4438..) ext/Devel/Peek/Peek.xs (@4475..) Policy_sh.SH (@4496..) universal.c xsutils.c (@4511..) ext/B/B/Stash.pm ext/B/NOTES ext/B/O.pm keywords.h keywords.pl (@4515..) util.h (@4545..) ext/B/B/Asmdata.pm ext/B/B/Deparse.pm (@4546..) ext/Data/Dumper/Dumper.xs pod/perlmod.pod (@4556..) ext/IO/IO.xs lib/unicode/Is/ASCII.pl lib/unicode/Is/Alnum.pl lib/unicode/Is/Alpha.pl lib/unicode/Is/BidiAN.pl lib/unicode/Is/BidiB.pl lib/unicode/Is/BidiCS.pl lib/unicode/Is/BidiEN.pl lib/unicode/Is/BidiES.pl lib/unicode/Is/BidiET.pl lib/unicode/Is/BidiL.pl lib/unicode/Is/BidiON.pl lib/unicode/Is/BidiR.pl lib/unicode/Is/BidiS.pl lib/unicode/Is/BidiWS.pl lib/unicode/Is/C.pl lib/unicode/Is/Cc.pl lib/unicode/Is/Cn.pl lib/unicode/Is/Cntrl.pl lib/unicode/Is/Co.pl lib/unicode/Is/DCcircle.pl lib/unicode/Is/DCcompat.pl lib/unicode/Is/DCfinal.pl lib/unicode/Is/DCfont.pl lib/unicode/Is/DCinital.pl lib/unicode/Is/DCinitial.pl lib/unicode/Is/DCisolated.pl lib/unicode/Is/DCnarrow.pl lib/unicode/Is/DCnoBreak.pl lib/unicode/Is/DCsmall.pl lib/unicode/Is/DCsquare.pl lib/unicode/Is/DCsub.pl lib/unicode/Is/DCsuper.pl lib/unicode/Is/DCvertical.pl lib/unicode/Is/DCwide.pl lib/unicode/Is/DecoCanon.pl lib/unicode/Is/DecoCompat.pl lib/unicode/Is/Digit.pl lib/unicode/Is/Graph.pl lib/unicode/Is/L.pl lib/unicode/Is/Ll.pl lib/unicode/Is/Lm.pl lib/unicode/Is/Lo.pl lib/unicode/Is/Lower.pl lib/unicode/Is/Lt.pl lib/unicode/Is/Lu.pl lib/unicode/Is/M.pl lib/unicode/Is/Mc.pl lib/unicode/Is/Mirrored.pl lib/unicode/Is/Mn.pl lib/unicode/Is/N.pl lib/unicode/Is/Nd.pl lib/unicode/Is/No.pl lib/unicode/Is/P.pl lib/unicode/Is/Pd.pl lib/unicode/Is/Pe.pl lib/unicode/Is/Po.pl lib/unicode/Is/Print.pl lib/unicode/Is/Ps.pl lib/unicode/Is/Punct.pl lib/unicode/Is/S.pl lib/unicode/Is/Sc.pl lib/unicode/Is/Sm.pl lib/unicode/Is/So.pl lib/unicode/Is/Space.pl (@4573..) perly.c vms/perly_c.vms (@4578..) deb.c (@4588..) lib/Pod/Checker.pm lib/Pod/Parser.pm lib/Pod/Usage.pm t/pod/poderrs.t t/pod/poderrs.xr (@4590..) pod/Makefile pod/roffitall unixish.h vos/vosish.h (@4602..) run.c (@4603..) utils/perlbug.PL utils/perldoc.PL (@4604..) hints/hpux.sh (@4606..) lib/strict.pm pod/perlsyn.pod (@4616..) ext/DB_File/DB_File.pm ext/Fcntl/Fcntl.pm ext/GDBM_File/GDBM_File.pm ext/Opcode/Opcode.pm ext/SDBM_File/SDBM_File.pm ext/Socket/Socket.pm lib/AutoLoader.pm lib/Getopt/Std.pm (@4623..) lib/ExtUtils/Manifest.pm (@4632..) pod/perlfaq2.pod (@4636..) t/op/misc.t t/pragma/warn/2use (@4641..) lib/Math/BigFloat.pm (@4685..) pod/perlfilter.pod pod/perlopentut.pod (@4699..) t/pragma/warn/pp_hot t/pragma/warn/pp_sys (@4709..) cygwin/Makefile.SHs os2/Makefile.SHs (@4710..) lib/Net/Ping.pm (@4711..) ext/POSIX/POSIX.xs ext/SDBM_File/sdbm/pair.c (@4717..) lib/ExtUtils/Liblist.pm (@4720..) t/lib/charnames.t t/lib/dumper.t (@4723..) lib/byte_heavy.pl (@4726..) t/pragma/warn/doop t/pragma/warn/pp t/pragma/warn/sv t/pragma/warn/utf8 (@4727..) lib/ExtUtils/xsubpp (@4731..) pod/perlre.pod (@4732..) INTERN.h (@4734..) globals.c (@4744..) lib/File/Copy.pm (@4753..) lib/ExtUtils/MM_VMS.pm lib/ExtUtils/MM_Win32.pm (@4754..) lib/ExtUtils/Install.pm (@4758..) ext/B/B/C.pm (@4763..) README.os2 (@4766..) lib/ExtUtils/MakeMaker.pm (@4769..) installperl (@4774..) lib/CPAN.pm lib/ExtUtils/Installed.pm lib/ExtUtils/MM_Unix.pm lib/ExtUtils/Mksymlists.pm lib/diagnostics.pm (@4777..) t/lib/thread.t (@4780..) pod/perl.pod (@4781..) ext/IO/lib/IO/Socket.pm (@4782..) win32/perlhost.h (@4792..) lib/Tie/Array.pm (@4796..) t/pragma/strict-vars (@4801..) win32/config.bc win32/config.gc win32/config.vc (@4817..) INSTALL (@4824..) utils/h2xs.PL (@4825..) embed.h (@4830..) ext/Data/Dumper/Dumper.pm (@4832..) lib/Tie/Handle.pm (@4833..) proto.h t/op/closure.t (@4834..) lib/base.pm lib/fields.pm (@4835..) dump.c (@4836..) t/io/fs.t (@4838..) lib/Carp/Heavy.pm (@4839..) t/cmd/while.t (@4848..) Porting/Glossary Porting/config.sh Porting/config_H (@4850..) lib/Sys/Hostname.pm (@4851..) ext/Devel/DProf/DProf.pm (@4852..) hints/cygwin.sh (@4853..) patchlevel.h (@4858..) ext/File/Glob/Glob.pm ext/IO/lib/IO/Socket/INET.pm ext/NDBM_File/NDBM_File.pm ext/ODBM_File/ODBM_File.pm ext/POSIX/POSIX.pm lib/Dumpvalue.pm lib/Fatal.pm lib/File/Path.pm lib/File/stat.pm lib/Math/Complex.pm lib/Math/Trig.pm lib/Shell.pm lib/constant.pm lib/lib.pm (@4860..) lib/AutoSplit.pm (@4873..) lib/Pod/Html.pm (@4883..) win32/perllib.c (@4884..) vos/config.h vos/config_h.SH_orig (@4896..) perly.y pod/perlrun.pod pod/perlsub.pod pod/perltodo.pod (@4905..) README.win32 lib/Class/Struct.pm (@4906..) Porting/p4desc (@4908..) ext/Devel/Peek/Peek.pm ext/Thread/Thread.pm lib/File/Find.pm lib/UNIVERSAL.pm pod/buildtoc pod/perlfork.pod (@4910..) t/op/fork.t (@4914..) XSUB.h av.h cop.h cv.h gv.h handy.h hv.h makedef.pl pod/perltoc.pod pp.h scope.h (@4915..) global.sym objXSUB.h (@4916..) lib/Cwd.pm (@4921..) doop.c t/pragma/warn/toke (@4930..) win32/win32.c (@4933..) embedvar.h intrpvar.h lib/charnames.pm op.h sv.h (@4937..) embed.pl (@4939..) lib/utf8.pm regcomp.c regexec.c (@4941..) vms/descrip_mms.template (@4944..) lib/warnings.pm warnings.pl (@4947..) lib/File/Spec/Win32.pm (@4949..) lib/perl5db.pl (@4955..) lib/Benchmark.pm (@4958..) lib/English.pm (@4960..) lib/byte.pm (@4969..) scope.c (@4970..) ext/Devel/DProf/DProf.xs (@4973..) malloc.c (@4974..) op.c pod/perldebug.pod pp_ctl.c (@4975..) Makefile.SH (@4977..) config_h.SH (@4978..) pod/perlop.pod (@4979..) pod/perlfunc.pod (@4998..) pod/perldiag.pod (@5001..) pp_sys.c (@5006..) EXTERN.h doio.c perl.h util.c (@5008..) av.c hv.c pp.c pp_hot.c utf8.c utf8.h (@5009..) pod/perldelta.pod pod/perlport.pod (@5015..) MANIFEST (@5016..) sv.c (@5017..) win32/config_H.bc win32/config_H.gc win32/config_H.vc (@5019..) win32/Makefile win32/makefile.mk (@5022..) win32/win32.h (@5024..) mg.c toke.c (@5025..) gv.c perl.c pod/perlvar.pod (@5029..) pod/perlhist.pod (@5034..) Configure (@5036..) Changes (@5038..) 'merge in' configure.com (@4773..) --- diff --git a/Changes b/Changes index 7f0b267..dbb0a48 100644 --- a/Changes +++ b/Changes @@ -17,7 +17,7 @@ here are some of the more common names in the Changes file, and their current addresses (as of July 1998): Gisle Aas - Abigail + Abigail Kenneth Albanowski Russ Allbery Spider Boardman @@ -75,10 +75,1457 @@ indicator: ---------------- -Version v5.5.640 Development release working toward 5.6 +Version v5.5.650 Development release working toward v5.6 ---------------- ____________________________________________________________________________ +[ 5040] By: gsar on 2000/02/08 07:51:20 + Log: documentation patches (from Michael Schwern and Yitzchak + Scott-Thoennes) + Branch: perl + ! av.c hv.c lib/UNIVERSAL.pm pod/perlapi.pod +____________________________________________________________________________ +[ 5039] By: gsar on 2000/02/08 07:22:46 + Log: alias to $^V to $PERL_VERSION_TUPLE + Branch: perl + ! lib/English.pm pod/perlvar.pod +____________________________________________________________________________ +[ 5038] By: gsar on 2000/02/08 07:03:34 + Log: update Changes + Branch: perl + ! Changes pod/perlhist.pod +____________________________________________________________________________ +[ 5037] By: gsar on 2000/02/08 06:59:55 + Log: Windows has a somewhat different sitelib layout, and needs + $sitelib/archname added as well + Branch: perl + ! perl.c +____________________________________________________________________________ +[ 5036] By: gsar on 2000/02/08 06:59:03 + Log: change#4987 appears to have broken libs scan for platforms that + don't set ignore_versioned_solibs (Solaris is one of them); add + derivative fix from the older logic for skipping versioned .so + libs + Branch: perl + ! Configure +____________________________________________________________________________ +[ 5035] By: gsar on 2000/02/07 21:21:44 + Log: sprintf("%v"...) buffer resizing busted + Branch: perl + ! sv.c +____________________________________________________________________________ +[ 5034] By: gsar on 2000/02/07 19:16:21 + Log: update Changes + Branch: perl + ! Changes pod/perlhist.pod +____________________________________________________________________________ +[ 5033] By: gsar on 2000/02/07 19:01:08 + Log: stringify "\x{FFF}" to utf8 correctly; set SvUTF8 on "\x{XX}" + only when XX > 127 + Branch: perl + ! pp_hot.c toke.c +____________________________________________________________________________ +[ 5032] By: gsar on 2000/02/07 18:25:31 + Log: add note about printf("%v",...) + Branch: perl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 5031] By: gsar on 2000/02/07 18:18:43 + Log: update Changes + Branch: perl + ! Changes Todo-5.6 +____________________________________________________________________________ +[ 5030] By: gsar on 2000/02/07 18:17:49 + Log: thinko in change#5029 + Branch: perl + ! gv.c +____________________________________________________________________________ +[ 5029] By: gsar on 2000/02/07 17:49:58 + Log: change $^U to $^WIDE_SYSTEM_CALLS; s/PL_bigchar/PL_widesyscalls/; + introduce -C switch (sets $^WIDE_SYSTEM_CALLS) + Branch: perl + ! embedvar.h gv.c intrpvar.h mg.c perl.c perlapi.h + ! pod/perlrun.pod pod/perlunicode.pod pod/perlvar.pod + ! win32/win32.h +____________________________________________________________________________ +[ 5028] By: gsar on 2000/02/07 17:10:03 + Log: perlport updates (from Peter Prymmer) + Branch: perl + ! pod/perlport.pod +____________________________________________________________________________ +[ 5027] By: gsar on 2000/02/07 16:53:47 + Log: fix up Todo-5.6 + Branch: perl + ! Todo-5.6 +____________________________________________________________________________ +[ 5026] By: gsar on 2000/02/07 16:32:31 + Log: rename Todo-5.005 to Todo-5.6 + Branch: perl + +> Todo-5.6 + - Todo-5.005 + ! MANIFEST +____________________________________________________________________________ +[ 5025] By: gsar on 2000/02/07 16:09:54 + Log: ${^Warnings} renamed to ${^WARNING_BITS} + Branch: perl + ! gv.c lib/warnings.pm mg.c pod/perltoc.pod pod/perlvar.pod + ! toke.c warnings.pl +____________________________________________________________________________ +[ 5024] By: gsar on 2000/02/07 11:47:06 + Log: various Windows tweaks: make $^E a little less buggy by saving + and restoring system error across TLS fetch; avoid needless + copying of buffers + Branch: perl + ! win32/Makefile win32/makefile.mk win32/perllib.c win32/win32.c + ! win32/win32.h +____________________________________________________________________________ +[ 5023] By: gsar on 2000/02/07 11:44:19 + Log: avoid MakeMaker setting $^W=1 + Branch: perl + ! lib/ExtUtils/MakeMaker.pm +____________________________________________________________________________ +[ 5022] By: gsar on 2000/02/07 10:38:56 + Log: up to v5.5.650 + Branch: perl + ! Changes patchlevel.h win32/Makefile win32/config_H.bc + ! win32/config_H.gc win32/config_H.vc win32/makefile.mk +____________________________________________________________________________ +[ 5021] By: gsar on 2000/02/07 10:10:31 + Log: mention threads status in pod + Branch: perl + ! ext/Thread/Thread.pm +____________________________________________________________________________ +[ 5020] By: gsar on 2000/02/07 09:57:46 + Log: tolerate NULL SITELIB_EXP + Branch: perl + ! perl.c +____________________________________________________________________________ +[ 5019] By: gsar on 2000/02/07 09:46:11 + Log: NULL-terminate PERL_INC_VERSION_LIST + Branch: perl + ! Configure perl.c win32/config.bc win32/config.gc + ! win32/config.vc win32/config_H.bc win32/config_H.gc + ! win32/config_H.vc +____________________________________________________________________________ +[ 5018] By: gsar on 2000/02/07 09:13:10 + Log: add compatible versions from $Config{inc_ver_list} to search + paths automatically (from Tom Hughes ) + Branch: perl + ! lib/lib.pm perl.c +____________________________________________________________________________ +[ 5017] By: gsar on 2000/02/07 08:58:56 + Log: makefiles now use exetype.pl to make wperl.exe + Branch: perl + ! sv.c win32/Makefile win32/makefile.mk +____________________________________________________________________________ +[ 5016] By: gsar on 2000/02/07 08:38:25 + Log: add exetype.pl (from Jan Dubois) + Branch: perl + + win32/bin/exetype.pl + ! MANIFEST +____________________________________________________________________________ +[ 5015] By: gsar on 2000/02/07 08:29:28 + Log: pod fixes (from Abigail and M J T Guy) + Branch: perl + ! Changes README.os2 gv.c pod/perlapi.pod pod/perldebug.pod + ! pod/perldelta.pod pod/perldiag.pod pod/perlopentut.pod + ! pod/perlport.pod pod/perlvar.pod +____________________________________________________________________________ +[ 5014] By: gsar on 2000/02/07 07:09:08 + Log: clarify behavior of vec() when arguments are off the end of the + string (from M J T Guy) + Branch: perl + ! pod/perlfunc.pod +____________________________________________________________________________ +[ 5013] By: gsar on 2000/02/07 07:08:15 + Log: remove $^U dependent behaviors in runtime; chr() and sprintf('%c',...) + now return bytes all the way to 255, they will be transparently + coerced (in future) to UTF-8 when they are used in operations + involving other UTF-8 strings; C doesn't set $^U anymore + Branch: perl + ! lib/byte.pm lib/utf8.pm pod/perlunicode.pod pod/perlvar.pod + ! pp.c sv.c +____________________________________________________________________________ +[ 5012] By: gsar on 2000/02/07 06:36:33 + Log: partly revert change#4851, apparently POSIX::uname() may not be correct + per strict reading of standard (says Tom Christiansen) + Branch: perl + ! lib/Sys/Hostname.pm +____________________________________________________________________________ +[ 5011] By: gsar on 2000/02/07 06:26:30 + Log: allow 64-bit utf8-encoded integers (from Ilya Zakharevich) + Branch: perl + ! utf8.c utf8.h +____________________________________________________________________________ +[ 5010] By: gsar on 2000/02/06 21:27:03 + Log: fix debug code in Perl_malloc() (from Ilya Zakharevich) + Branch: perl + ! malloc.c +____________________________________________________________________________ +[ 5009] By: gsar on 2000/02/06 20:45:30 + Log: set SvUTF8 on vectors only if there are chars > 127; update copyright + years (from Gisle Aas) + Branch: perl + ! EXTERN.h INTERN.h README av.c av.h cop.h cv.h deb.c doio.c + ! doop.c dump.c form.h gv.c gv.h handy.h hv.c hv.h mg.c mg.h + ! op.c op.h perl.c perl.h perlio.c perly.y pp.c pp.h pp_ctl.c + ! pp_hot.c pp_sys.c regcomp.c regexec.c run.c scope.c sv.c sv.h + ! toke.c utf8.c utf8.h util.c util.h +____________________________________________________________________________ +[ 5008] By: gsar on 2000/02/06 19:28:31 + Log: use builtin __CYGWIN__ rather than -DCYGWIN (from Eric Fifer + ) + Branch: perl + ! EXTERN.h XSUB.h doio.c ext/POSIX/POSIX.xs + ! ext/SDBM_File/sdbm/pair.c ext/SDBM_File/sdbm/sdbm.c + ! hints/cygwin.sh lib/ExtUtils/MM_Cygwin.pm mg.c perl.h + ! unixish.h util.c +____________________________________________________________________________ +[ 5007] By: gsar on 2000/02/06 17:47:01 + Log: reduce memory consumption of POSIX.pm (from Ilya Zakharevich) + Branch: perl + ! ext/POSIX/POSIX.pm +____________________________________________________________________________ +[ 5006] By: gsar on 2000/02/06 17:28:35 + Log: integrate cfgperl contents into mainline + Branch: perl + !> Configure config_h.SH ext/Sys/Syslog/Syslog.xs hints/hpux.sh + !> perl.h pp_sys.c +____________________________________________________________________________ +[ 5005] By: gsar on 2000/02/06 17:18:39 + Log: VOS port updates (from Paul Green ) + Branch: perl + ! README.vos pod/perlport.pod vos/Changes vos/build.cm + ! vos/compile_perl.cm vos/config.def vos/config.h vos/config.pl + ! vos/config_h.SH_orig vos/perl.bind vos/test_vos_dummies.c + ! vos/vos_dummies.c vos/vosish.h +____________________________________________________________________________ +[ 5004] By: gsar on 2000/02/06 17:00:49 + Log: fix parse error on C<{ use strict }> and other constructs that + make the parser reenter while LEX_KNOWNEXT is active + Branch: perl + ! t/comp/use.t toke.c +____________________________________________________________________________ +[ 5003] By: gsar on 2000/02/06 14:57:30 + Log: avoid -Bforcearchive on netbsd too + Branch: perl + ! Changes hints/netbsd.sh +____________________________________________________________________________ +[ 5002] By: gsar on 2000/02/06 14:45:17 + Log: revised notes about Pod::Parser & Co. + Branch: perl + ! lib/Pod/Usage.pm pod/perldelta.pod +____________________________________________________________________________ +[ 5001] By: gsar on 2000/02/06 14:02:43 + Log: fix description of obsolete diagnostic + Branch: perl + ! pod/perldiag.pod +____________________________________________________________________________ +[ 5000] By: gsar on 2000/02/06 13:59:58 + Log: allow "\x{12ab}" even without C + Branch: perl + ! t/pragma/warn/toke toke.c +____________________________________________________________________________ +[ 4999] By: gsar on 2000/02/06 13:58:31 + Log: make perlbug use new-style version numbers; improve compatibility + (runs with perl 5.005); fix swapped old vs new version reporting + Branch: perl + ! utils/perlbug.PL +____________________________________________________________________________ +[ 4998] By: gsar on 2000/02/06 13:56:45 + Log: support sprintf("v%v", v1.2.3) (works on any string argument, in + fact); add tests for version tuples + Branch: perl + + t/op/ver.t + ! MANIFEST perl.c pod/perldiag.pod pod/perlfunc.pod + ! pod/perlop.pod sv.c toke.c +____________________________________________________________________________ +[ 4997] By: gsar on 2000/02/04 21:40:08 + Log: change#4970 fallout for useithreads + Branch: perl + ! sv.c +____________________________________________________________________________ +[ 4996] By: jhi on 2000/02/04 20:09:00 + Log: Largefilify offsets of tied handles. + Branch: cfgperl + ! pp_sys.c +____________________________________________________________________________ +[ 4995] By: jhi on 2000/02/04 19:54:25 + Log: Sanity check for libraries scan. + Branch: cfgperl + ! Configure config_h.SH + Branch: metaconfig + ! U/modified/libs.U +____________________________________________________________________________ +[ 4994] By: jhi on 2000/02/04 19:48:42 + Log: HP-UX largefileness doesn't like lseek being redeclared; + no more USE_LONG_LONG. + Branch: cfgperl + ! perl.h +____________________________________________________________________________ +[ 4993] By: jhi on 2000/02/04 19:18:59 + Log: fix the description as much as possible; the whole + separation into three different symbols lists is + pretty broken now. + Branch: metaconfig + ! U/modified/Cppsym.U +____________________________________________________________________________ +[ 4992] By: jhi on 2000/02/04 19:13:10 + Log: Use , not . + Branch: cfgperl + ! Configure config_h.SH ext/Sys/Syslog/Syslog.xs +____________________________________________________________________________ +[ 4991] By: gsar on 2000/02/04 19:11:07 + Log: dmake is on CPAN now + Branch: perl + ! README.win32 +____________________________________________________________________________ +[ 4990] By: jhi on 2000/02/04 19:04:01 + Log: Re-introduce #4817 and #4964 wiped out by #4987. + Branch: cfgperl + ! Configure config_h.SH + Branch: metaconfig + ! U/threads/usethreads.U + Branch: metaconfig/U/perl + ! patchlevel.U +____________________________________________________________________________ +[ 4989] By: jhi on 2000/02/04 18:54:00 + Log: typo fix + Branch: cfgperl + ! Configure config_h.SH + Branch: metaconfig + ! U/modified/libs.U +____________________________________________________________________________ +[ 4988] By: jhi on 2000/02/04 18:34:06 + Log: Integrate with Sarathy. + Branch: cfgperl + +> ext/Sys/Syslog/Makefile.PL ext/Sys/Syslog/Syslog.pm + +> ext/Sys/Syslog/Syslog.xs + - lib/Sys/Syslog.pm + !> (integrate 37 files) +____________________________________________________________________________ +[ 4987] By: jhi on 2000/02/04 18:31:05 + Log: Configure megamaintenance. Cppsym (hopefully) final spasms; + default is to use long long if available; various nits + here and there; fixed to hpux 64-bitnes and largefileness. + Branch: cfgperl + ! Configure config_h.SH hints/hpux.sh perl.h + Branch: metaconfig + ! U/a_dvisory/quadtype.U U/modified/Cppsym.U + ! U/modified/d_gethname.U U/modified/libpth.U U/modified/libs.U + Branch: metaconfig/U/perl + ! d_fseeko.U d_ftello.U dlsrc.U uselongdbl.U uselonglong.U + ! usemultiplicity.U xs_apiversion.U +____________________________________________________________________________ +[ 4986] By: gsar on 2000/02/04 17:26:37 + Log: avoid bad cast warnings (from Robin Barker ) + Branch: perl + ! sv.c +____________________________________________________________________________ +[ 4985] By: gsar on 2000/02/04 16:43:49 + Log: avoid 'na' (spotted by Yitzchak Scott-Thoennes ) + Branch: perl + ! ext/Devel/DProf/DProf.xs +____________________________________________________________________________ +[ 4984] By: gsar on 2000/02/04 08:20:05 + Log: CPAN.pm updated to v1.52 (from Andreas Koenig) + Branch: perl + ! lib/CPAN.pm lib/CPAN/FirstTime.pm lib/CPAN/Nox.pm +____________________________________________________________________________ +[ 4983] By: gsar on 2000/02/04 08:00:38 + Log: updated OpenBSD hints (From Todd C. Miller ) + Branch: perl + ! hints/openbsd.sh +____________________________________________________________________________ +[ 4982] By: gsar on 2000/02/04 07:54:04 + Log: pod typos (from Gregor N. Purdy ) + Branch: perl + ! lib/Pod/Parser.pm +____________________________________________________________________________ +[ 4981] By: gsar on 2000/02/04 07:34:38 + Log: avoid assuming cc accepts -o switch (from Tom Hughes) + Branch: perl + ! Makefile.SH +____________________________________________________________________________ +[ 4980] By: gsar on 2000/02/04 07:29:59 + Log: Sys::Syslog goes the XS way (from Tom Hughes ) + Branch: perl + + ext/Sys/Syslog/Makefile.PL ext/Sys/Syslog/Syslog.pm + + ext/Sys/Syslog/Syslog.xs + - lib/Sys/Syslog.pm + ! MANIFEST pod/perldelta.pod +____________________________________________________________________________ +[ 4979] By: gsar on 2000/02/04 07:13:19 + Log: pod updates (from David Adler, M J T Guy) + Branch: perl + ! pod/perlfaq2.pod pod/perlop.pod pod/perlsyn.pod +____________________________________________________________________________ +[ 4978] By: gsar on 2000/02/04 07:08:14 + Log: typos in config_h.SH (from Paul_Green@vos.stratus.com) + Branch: perl + ! config_h.SH +____________________________________________________________________________ +[ 4977] By: gsar on 2000/02/04 07:06:10 + Log: avoid adding null components to LD_LIBRARY_PATH, OpenBSD has trouble + with them (from Todd C. Miller ) + Branch: perl + ! Makefile.SH +____________________________________________________________________________ +[ 4976] By: gsar on 2000/02/04 06:33:43 + Log: VMS update (from Dan Sugalski and Peter Prymmer) + Branch: perl + ! configure.com vms/descrip_mms.template vms/subconfigure.com +____________________________________________________________________________ +[ 4975] By: gsar on 2000/02/04 05:51:14 + Log: patch to provide more informative names for evals and anonymous + subroutines (from Ilya Zakharevich) + Branch: perl + ! ext/Devel/Peek/Peek.pm ext/Devel/Peek/Peek.xs lib/Dumpvalue.pm + ! lib/dumpvar.pl lib/perl5db.pl op.c perl.h pod/perldebug.pod + ! pod/perlvar.pod pp_ctl.c +____________________________________________________________________________ +[ 4974] By: gsar on 2000/02/04 05:05:57 + Log: off-by-one in malloc.c (from Ilya Zakharevich) + Branch: perl + ! malloc.c +____________________________________________________________________________ +[ 4973] By: gsar on 2000/02/04 05:03:00 + Log: OS/2 build fixups from Ilya Zakharevich + Branch: perl + ! ext/Devel/DProf/DProf.xs os2/Makefile.SHs t/op/fork.t +____________________________________________________________________________ +[ 4972] By: gsar on 2000/02/04 04:58:57 + Log: avoid /* within comment + Branch: perl + ! xsutils.c +____________________________________________________________________________ +[ 4971] By: gsar on 2000/02/04 04:56:09 + Log: another HINT_BYTE victim + Branch: perl + ! lib/charnames.pm +____________________________________________________________________________ +[ 4970] By: gsar on 2000/02/04 04:45:13 + Log: fix pad_alloc panic from C + Branch: perl + ! op.c scope.c scope.h t/op/closure.t toke.c +____________________________________________________________________________ +[ 4969] By: gsar on 2000/02/04 01:09:37 + Log: byte.pm and HINT_BYTE don't match (0x8, not 0x10!) + Branch: perl + ! lib/byte.pm +____________________________________________________________________________ +[ 4968] By: jhi on 2000/02/02 13:17:25 + Log: Integrate with Sarathy. + Branch: cfgperl + +> lib/Pod/Find.pm lib/Pod/ParseUtils.pm + ! Configure + !> (integrate 29 files) + +---------------- +Version v5.5.640 +---------------- + +____________________________________________________________________________ +[ 4967] By: gsar on 2000/02/02 12:22:29 + Log: update makerel for new version format + Branch: perl + ! Changes Porting/makerel +____________________________________________________________________________ +[ 4966] By: gsar on 2000/02/02 11:42:03 + Log: workaround for undefined symbol + Branch: perl + ! win32/win32.h +____________________________________________________________________________ +[ 4965] By: gsar on 2000/02/02 11:19:19 + Log: on cygwin, h_errno is now "__declspec(dllimport) int h_errno" + (from Eric Fifer ) + Branch: perl + ! pp_sys.c +____________________________________________________________________________ +[ 4964] By: gsar on 2000/02/02 11:11:15 + Log: adjust notes on use5005threads + Branch: perl + ! Configure INSTALL README.threads +____________________________________________________________________________ +[ 4963] By: gsar on 2000/02/02 10:14:30 + Log: fix typo + Branch: perl + ! Configure +____________________________________________________________________________ +[ 4962] By: gsar on 2000/02/02 10:13:10 + Log: integrate selected changes from cfgperl (#4899,4900,4904,4918) + Branch: perl + !> Configure Porting/Glossary Porting/config.sh Porting/config_H + !> config_h.SH ext/IO/IO.xs lib/Benchmark.pm +____________________________________________________________________________ +[ 4961] By: gsar on 2000/02/02 09:55:45 + Log: PodParser-1.092 update via CPAN (from Brad Appleton) + Branch: perl + + lib/Pod/Find.pm lib/Pod/ParseUtils.pm + ! MANIFEST lib/Pod/Checker.pm t/pod/poderrs.t t/pod/poderrs.xr +____________________________________________________________________________ +[ 4960] By: gsar on 2000/02/02 08:22:31 + Log: replace misleading docs with a BUGS section + Branch: perl + ! lib/English.pm +____________________________________________________________________________ +[ 4959] By: gsar on 2000/02/02 08:16:17 + Log: remove FUD from perlfunc/use (from M J T Guy) + Branch: perl + ! pod/perlfunc.pod +____________________________________________________________________________ +[ 4958] By: gsar on 2000/02/02 08:13:04 + Log: Benchmark displays bogus CPU stats (suggested by Cedric Auzanne + ) + Branch: perl + ! Changes lib/Benchmark.pm +____________________________________________________________________________ +[ 4957] By: gsar on 2000/02/02 08:04:52 + Log: fix coredump on C<"x" =~ /x/; print @-> (from Ilya Zakharevich) + Branch: perl + ! pp_hot.c +____________________________________________________________________________ +[ 4956] By: gsar on 2000/02/02 08:02:57 + Log: flock() pod talks about "adding" in the sense of "or-ing" + Branch: perl + ! pod/perlfunc.pod +____________________________________________________________________________ +[ 4955] By: gsar on 2000/02/02 07:58:35 + Log: fixes for switching files in the debugger (from Ilya Zakharevich) + Branch: perl + ! lib/perl5db.pl pod/perldebug.pod +____________________________________________________________________________ +[ 4954] By: gsar on 2000/02/02 07:53:51 + Log: use warnings rather than fiddling with $^W (from Paul Marquess) + Branch: perl + ! lib/Cwd.pm lib/English.pm lib/ExtUtils/MM_Unix.pm + ! lib/ExtUtils/MM_Win32.pm lib/ExtUtils/Manifest.pm lib/Fatal.pm + ! lib/File/Spec/Win32.pm lib/Math/BigFloat.pm + ! lib/Text/ParseWords.pm lib/utf8_heavy.pl +____________________________________________________________________________ +[ 4953] By: gsar on 2000/02/02 07:40:33 + Log: dynixptx hints tweak (from Martin J. Bligh ) + Branch: perl + ! hints/dynixptx.sh +____________________________________________________________________________ +[ 4952] By: gsar on 2000/02/02 07:36:39 + Log: deltanotes on weakrefs and Pod::Parser (from Tuomas Lukka and + Brad Appleton) + Branch: perl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 4951] By: gsar on 2000/02/02 06:54:22 + Log: avoid mismatched type warnings + Branch: perl + ! embed.pl perlapi.h +____________________________________________________________________________ +[ 4950] By: jhi on 2000/02/02 06:49:10 + Log: Integrate with Sarathy. + Branch: cfgperl + +> pod/perlunicode.pod + !> MANIFEST Makefile.SH lib/File/Spec/Win32.pm lib/Text/Tabs.pm + !> lib/byte.pm lib/byte_heavy.pl lib/utf8.pm lib/warnings.pm + !> makedef.pl op.c perl.h pod/perldelta.pod pp_ctl.c regcomp.c + !> regexec.c t/pragma/warn/2use utf8.h utils/perldoc.PL + !> vms/descrip_mms.template warnings.pl +____________________________________________________________________________ +[ 4949] By: gsar on 2000/02/02 06:41:17 + Log: fix broken abs2rel() (from François Allard ) + Branch: perl + ! lib/File/Spec/Win32.pm +____________________________________________________________________________ +[ 4948] By: gsar on 2000/02/02 06:30:41 + Log: makefile tweak + Branch: perl + ! Makefile.SH +____________________________________________________________________________ +[ 4947] By: gsar on 2000/02/02 06:27:43 + Log: future-proof unknown warning categories (from Greg Bacon + ) + Branch: perl + ! lib/warnings.pm t/pragma/warn/2use warnings.pl +____________________________________________________________________________ +[ 4946] By: gsar on 2000/02/02 06:21:34 + Log: doc tweak (from Michael G Schwern ) + Branch: perl + ! lib/Text/Tabs.pm +____________________________________________________________________________ +[ 4945] By: gsar on 2000/02/02 06:03:04 + Log: more meaningful message on invalid pattern argument (from + Kevin Meltzer ) + Branch: perl + ! utils/perldoc.PL +____________________________________________________________________________ +[ 4944] By: gsar on 2000/02/02 05:43:49 + Log: XSLoader build patch for VMS (from Craig A. Berry + ) + Branch: perl + ! vms/descrip_mms.template +____________________________________________________________________________ +[ 4943] By: gsar on 2000/02/02 03:40:49 + Log: reword some sections of perlunicode.pod + Branch: perl + ! pod/perlunicode.pod +____________________________________________________________________________ +[ 4942] By: gsar on 2000/02/01 21:02:01 + Log: AIX warning on undefined symbol + Branch: perl + ! makedef.pl +____________________________________________________________________________ +[ 4941] By: gsar on 2000/02/01 20:29:30 + Log: HINT_UTF8 is not propagated to the op tree anymore; add a + perlunicode.pod that reflects changes to unicode support so far + Branch: perl + + pod/perlunicode.pod + ! MANIFEST lib/byte.pm lib/byte_heavy.pl lib/utf8.pm op.c perl.h + ! pod/perldelta.pod pp_ctl.c regcomp.c regexec.c utf8.h +____________________________________________________________________________ +[ 4940] By: jhi on 2000/02/01 12:22:30 + Log: Integrate with Sarathy. + Branch: cfgperl + !> embed.pl embedvar.h global.sym gv.c intrpvar.h + !> lib/charnames.pm lib/utf8.pm mg.c objXSUB.h op.c op.h + !> perlapi.c perlapi.h pod/perlvar.pod pp.c sv.c sv.h + !> t/lib/charnames.t toke.c win32/win32.c win32/win32.h +____________________________________________________________________________ +[ 4939] By: gsar on 2000/02/01 08:52:16 + Log: export pregexec(), Tk uses it + Branch: perl + ! embed.pl global.sym objXSUB.h perlapi.c +____________________________________________________________________________ +[ 4938] By: gsar on 2000/02/01 04:00:09 + Log: mark literal utf8 in string literals properly + Branch: perl + ! toke.c +____________________________________________________________________________ +[ 4937] By: gsar on 2000/01/31 20:19:34 + Log: introduce $^U, a global bit to indicate whether system + calls should using widechar APIs; chr and sprintf "%c" also + follow this flag in the absense of "use byte"; "use utf8" + sets $^U=1 (this appears kludgey) + Branch: perl + ! embedvar.h gv.c intrpvar.h lib/charnames.pm lib/utf8.pm mg.c + ! op.c op.h perlapi.h pod/perlvar.pod pp.c sv.c sv.h + ! t/lib/charnames.t win32/win32.h +____________________________________________________________________________ +[ 4936] By: jhi on 2000/01/31 20:17:44 + Log: HP-UX (induced) fixes. + Branch: cfgperl + ! Configure config_h.SH hints/hpux.sh + Branch: metaconfig + ! U/modified/Oldconfig.U U/modified/libs.U + Branch: metaconfig/U/perl + ! quadfio.U +____________________________________________________________________________ +[ 4935] By: jhi on 2000/01/31 19:15:43 + Log: Cosmetics. + Branch: metaconfig + ! U/compline/d_gconvert.U +____________________________________________________________________________ +[ 4934] By: jhi on 2000/01/31 19:15:22 + Log: Cppsym saga continues. + Branch: cfgperl + ! Configure config_h.SH + Branch: metaconfig + ! U/modified/Cppsym.U +____________________________________________________________________________ +[ 4933] By: gsar on 2000/01/31 18:45:07 + Log: !USING_WIDE() branch is busted in win32_stat() + Branch: perl + ! win32/win32.c +____________________________________________________________________________ +[ 4932] By: jhi on 2000/01/31 06:41:47 + Log: Reveal even more symbols. + Branch: cfgperl + ! Configure config_h.SH + Branch: metaconfig + ! U/modified/Cppsym.U +____________________________________________________________________________ +[ 4931] By: jhi on 2000/01/31 06:21:41 + Log: Integrate with Sarathy. + Branch: cfgperl + - lib/caller.pm + !> (integrate 29 files) +____________________________________________________________________________ +[ 4930] By: gsar on 2000/01/31 04:57:42 + Log: runtime now looks at the SVf_UTF8 bit on the SV to decide + whether to use widechar semantics; lexer and RE engine continue + to need "use utf8" to enable unicode awareness in literals + and patterns (TODO: this needs to be fixed); $1 et al are marked + SvUTF8 if the pattern was compiled for utf8 (TODO: propagating + it from the data is probably better) + Branch: perl + ! doop.c gv.c mg.c op.c op.h pp.c pp_ctl.c pp_hot.c regcomp.c + ! sv.c t/pragma/warn/doop t/pragma/warn/pp t/pragma/warn/sv + ! t/pragma/warn/toke t/pragma/warn/utf8 toke.c utf8.h +____________________________________________________________________________ +[ 4929] By: gsar on 2000/01/31 04:17:09 + Log: remove caller.pm from change#3534 (flawed idea) + Branch: perl + - lib/caller.pm + ! MANIFEST pod/perldelta.pod pod/perlfunc.pod +____________________________________________________________________________ +[ 4928] By: gsar on 2000/01/31 04:16:01 + Log: fix factual regression (-e doesn't create temporary files anymore) + Branch: perl + ! pod/perlfilter.pod +____________________________________________________________________________ +[ 4927] By: gsar on 2000/01/30 21:27:12 + Log: introduce $^V (eq chr($revision) . chr($version) . chr($subversion)); + document version tuples + Branch: perl + ! gv.c pod/perldelta.pod pod/perlfunc.pod pod/perlop.pod + ! pod/perlvar.pod +____________________________________________________________________________ +[ 4926] By: gsar on 2000/01/28 18:10:12 + Log: implement -follow option in find2perl (from Helmut Jarausch + ) + Branch: perl + ! lib/File/Find.pm x2p/find2perl.PL +____________________________________________________________________________ +[ 4925] By: gsar on 2000/01/28 18:03:28 + Log: document what chdir() without an argument does (from Mark-Jason + Dominus ) + Branch: perl + ! pod/perlfunc.pod +____________________________________________________________________________ +[ 4924] By: gsar on 2000/01/28 17:49:34 + Log: README.cygwin update (from Eric Fifer ) + Branch: perl + ! README.cygwin +____________________________________________________________________________ +[ 4923] By: gsar on 2000/01/28 17:10:08 + Log: avoid leaking lexicals into program being debugged (from Ilya + Zakharevich) + Branch: perl + ! lib/perl5db.pl +____________________________________________________________________________ +[ 4922] By: gsar on 2000/01/28 16:36:13 + Log: perldelta note about export list changes + Branch: perl + ! Changes pod/perldelta.pod +____________________________________________________________________________ +[ 4921] By: gsar on 2000/01/28 15:49:04 + Log: alias realpath() to abs_path() (from Tom Christiansen) + Branch: perl + ! lib/Cwd.pm +____________________________________________________________________________ +[ 4920] By: jhi on 2000/01/28 09:52:47 + Log: Cppsym fixup from Andy. + Branch: cfgperl + ! Configure config_h.SH + Branch: metaconfig + ! U/modified/Cppsym.U +____________________________________________________________________________ +[ 4919] By: jhi on 2000/01/28 09:52:22 + Log: In HP-UX no largefiles if no 64 bits. + Branch: cfgperl + ! hints/hpux.sh +____________________________________________________________________________ +[ 4918] By: jhi on 2000/01/28 09:03:37 + Log: The #4880 was too eager, the $n test is useful too. + Branch: cfgperl + ! lib/Benchmark.pm +____________________________________________________________________________ +[ 4917] By: jhi on 2000/01/28 06:27:50 + Log: Integrate with Sarathy. + Branch: cfgperl + +> pod/perlapi.pod pod/perlintern.pod + !> (integrate 39 files) +____________________________________________________________________________ +[ 4916] By: gsar on 2000/01/28 05:29:37 + Log: more exported symbols needed for build on windows + Branch: perl + ! embed.pl global.sym objXSUB.h perlapi.c pod/perlapi.pod + ! pod/perlintern.pod t/lib/thread.t win32/win32.c +____________________________________________________________________________ +[ 4915] By: gsar on 2000/01/28 03:43:52 + Log: autogenerate API listing from comments in the source (from Benjamin + Stuhl ); fix the markup format to be more + flexible for better readability; add missing docs in sv.c; regenerate + perltoc + Branch: perl + + pod/perlapi.pod pod/perlintern.pod + ! MANIFEST XSUB.h av.c av.h cop.h cv.h embed.pl global.sym gv.c + ! gv.h handy.h hv.c hv.h intrpvar.h makedef.pl mg.c objXSUB.h + ! op.c op.h perl.c perlapi.c pod/Makefile pod/buildtoc + ! pod/perl.pod pod/perldelta.pod pod/perlguts.pod + ! pod/perltoc.pod pod/roffitall pp.h scope.h sv.c sv.h thrdvar.h + ! universal.c util.c +____________________________________________________________________________ +[ 4914] By: gsar on 2000/01/27 19:43:35 + Log: document unimplemented status of forking pipe open() on windows + Branch: perl + ! pod/perlfork.pod t/op/fork.t +____________________________________________________________________________ +[ 4913] By: jhi on 2000/01/27 11:18:51 + Log: Integrate with Sarathy. + Branch: cfgperl + !> (integrate 51 files) +____________________________________________________________________________ +[ 4912] By: jhi on 2000/01/27 10:35:48 + Log: Cppsym update continues. + Branch: cfgperl + ! Configure config_h.SH + Branch: metaconfig + ! U/modified/Cppsym.U +____________________________________________________________________________ +[ 4911] By: gsar on 2000/01/27 08:04:17 + Log: add missing flag in change#4892 + Branch: perl + ! win32/win32.c +____________________________________________________________________________ +[ 4910] By: gsar on 2000/01/27 03:56:48 + Log: various pod nits identified by installhtml (all fixed except + unresolved links) + Branch: perl + ! ext/B/B/C.pm ext/Devel/Peek/Peek.pm ext/File/Glob/Glob.pm + ! ext/IO/lib/IO/Socket/INET.pm ext/IPC/SysV/SysV.pm + ! ext/Thread/Thread.pm lib/Class/Struct.pm lib/File/Find.pm + ! lib/File/Spec/VMS.pm lib/Pod/Html.pm lib/UNIVERSAL.pm + ! pod/buildtoc pod/perlcompile.pod pod/perlfork.pod + ! pod/perlre.pod pod/perltoc.pod pod/perltodo.pod +____________________________________________________________________________ +[ 4909] By: gsar on 2000/01/26 22:45:28 + Log: typo + Branch: perl + ! Porting/p4desc +____________________________________________________________________________ +[ 4908] By: gsar on 2000/01/26 22:41:18 + Log: update p4 tool + Branch: perl + ! Porting/p4desc +____________________________________________________________________________ +[ 4907] By: gsar on 2000/01/26 21:45:41 + Log: revised attribute syntax: C, C + and C are all valid (from Spider Boardman) + Branch: perl + ! lib/AutoSplit.pm lib/SelfLoader.pm lib/attributes.pm + ! pod/perldelta.pod pod/perldiag.pod pod/perlsub.pod + ! t/op/attrs.t toke.c +____________________________________________________________________________ +[ 4906] By: gsar on 2000/01/26 20:16:39 + Log: pod typos and warnings (from Abigail ) + Branch: perl + ! README.win32 ext/B/B/Deparse.pm lib/Class/Struct.pm +____________________________________________________________________________ +[ 4905] By: gsar on 2000/01/26 19:10:26 + Log: s/STOP/CHECK/ blocks + Branch: perl + ! embedvar.h ext/B/B/Stash.pm ext/B/NOTES ext/B/O.pm intrpvar.h + ! keywords.h keywords.pl lib/constant.pm op.c perl.c perlapi.h + ! perly.c perly.y pod/perldelta.pod pod/perldiag.pod + ! pod/perlfunc.pod pod/perlmod.pod pod/perlrun.pod + ! pod/perlsub.pod pod/perltodo.pod sv.c t/op/misc.t toke.c + ! vms/perly_c.vms +____________________________________________________________________________ +[ 4904] By: jhi on 2000/01/26 13:58:18 + Log: In UNICOS and UNICOS/mk after a successful fcntl F_SETFL + of O_NONBLOCK a subsequent fcntl F_GETFL will return O_NDELAY. + Branch: cfgperl + ! ext/IO/IO.xs +____________________________________________________________________________ +[ 4903] By: jhi on 2000/01/26 11:16:34 + Log: Continue cpp symbol update. + Branch: cfgperl + ! Configure config_h.SH + Branch: metaconfig + ! U/modified/Cppsym.U +____________________________________________________________________________ +[ 4902] By: gsar on 2000/01/26 09:28:37 + Log: tweak exports list on Windows + Branch: perl + ! makedef.pl t/op/fork.t win32/win32.h +____________________________________________________________________________ +[ 4901] By: jhi on 2000/01/26 08:05:57 + Log: Integrate with Sarathy. + Branch: cfgperl + !> Changes README.win32 lib/File/Path.pm lib/Getopt/Std.pm op.c + !> pod/perldelta.pod pod/perldiag.pod t/op/grep.t + !> t/pragma/strict-vars toke.c win32/Makefile win32/makefile.mk + !> win32/win32.c win32/win32.h +____________________________________________________________________________ +[ 4900] By: jhi on 2000/01/26 07:59:05 + Log: s/d_nvpresuv/d_nv_preserves_uv/; + plus cosmetic change for #4899. + Branch: cfgperl + ! Configure Porting/Glossary Porting/config.sh Porting/config_H + ! config_h.SH + Branch: metaconfig + ! U/modified/Cppsym.U + Branch: metaconfig/U/perl + ! perlxv.U +____________________________________________________________________________ +[ 4899] By: jhi on 2000/01/26 07:46:56 + Log: Update the scan of the cpp symbols. + Branch: cfgperl + ! Configure config_h.SH + Branch: metaconfig + ! U/modified/Cppsym.U +____________________________________________________________________________ +[ 4898] By: gsar on 2000/01/26 04:49:45 + Log: allow '--' to terminate argument processing (suggested by + Marc Espie ) + Branch: perl + ! lib/Getopt/Std.pm +____________________________________________________________________________ +[ 4897] By: gsar on 2000/01/26 02:42:38 + Log: change#3744 should have made grep more like map instead of the + other way around + Branch: perl + ! t/op/grep.t toke.c +____________________________________________________________________________ +[ 4896] By: gsar on 2000/01/26 00:56:14 + Log: integrate cfgperl contents into mainline + Branch: perl + +> vos/config.def vos/config.pl + ! Changes + !> Configure MANIFEST config_h.SH hints/unicosmk.sh + !> lib/Benchmark.pm pod/perldelta.pod pod/perlhist.pod pp.c + !> vos/config.h vos/config_h.SH_orig +____________________________________________________________________________ +[ 4895] By: gsar on 2000/01/26 00:45:45 + Log: fix parse failure of (my $foo : bar) and similar (from Spider + Boardman) + Branch: perl + ! toke.c +____________________________________________________________________________ +[ 4894] By: gsar on 2000/01/26 00:33:53 + Log: avoid failure if directories already read by rmtree() are + deleted by another process + Branch: perl + ! lib/File/Path.pm +____________________________________________________________________________ +[ 4893] By: gsar on 2000/01/25 23:19:18 + Log: typo in change#4892 + Branch: perl + ! win32/win32.c +____________________________________________________________________________ +[ 4892] By: gsar on 2000/01/25 22:16:19 + Log: eliminate need for perl95.exe on Windows 9x by working around CRT + bug internally (from Benjamin Stuhl ); modified + to call the fixed version of open_osfhandle() only on Windows 9x; + updated the makefiles and README.win32 to suit + Branch: perl + ! README.win32 win32/Makefile win32/makefile.mk win32/win32.c + ! win32/win32.h +____________________________________________________________________________ +[ 4891] By: gsar on 2000/01/25 20:22:01 + Log: produce redeclaration warning on C + Branch: perl + ! op.c pod/perldelta.pod pod/perldiag.pod t/pragma/strict-vars +____________________________________________________________________________ +[ 4890] By: gsar on 2000/01/25 19:21:17 + Log: update Makefile notes on the now deprecated USE_5005THREADS and + USE_OBJECT + Branch: perl + ! win32/Makefile win32/makefile.mk +____________________________________________________________________________ +[ 4889] By: jhi on 2000/01/25 14:44:55 + Log: Misedit in #4888. + Branch: cfgperl + ! pp.c +____________________________________________________________________________ +[ 4888] By: jhi on 2000/01/25 14:38:59 + Log: UNICOS/mk patches. Removing the _CRAYMPP test may be + rash but it's the best move I can think of right now. + UNICOS/mk doesn't anymore (2.0.4.82) define _CRAYMPP, + but I think it did in the past. + Removing the _CRAYMPP test fixes a legion of pack/unpack + failures (hint: SHORTSIZE=4,INTSIZE=8,LONGSIZE=8). + One subtest, t/lib/io_sock.t #14, is still failing. + Branch: cfgperl + ! Configure config_h.SH hints/unicosmk.sh pp.c + Branch: metaconfig + ! U/modified/Oldconfig.U +____________________________________________________________________________ +[ 4887] By: jhi on 2000/01/25 06:13:14 + Log: Integrate with Sarathy. + Branch: cfgperl + !> Changes Makefile.SH XSUB.h cflags.SH embed.pl globals.c + !> installperl lib/Pod/Html.pm makedef.pl mg.c objXSUB.h perl.h + !> perlapi.c perlapi.h pod/perldelta.pod pod/perldiag.pod + !> t/io/fs.t win32/Makefile win32/makefile.mk win32/perlhost.h + !> win32/perllib.c win32/win32.c win32/win32.h +____________________________________________________________________________ +[ 4886] By: gsar on 2000/01/25 02:54:00 + Log: consistently use MAX_PATH+1 buffer sizes + Branch: perl + ! win32/win32.c +____________________________________________________________________________ +[ 4885] By: gsar on 2000/01/25 02:51:35 + Log: workaround for rename('x','X') bug in Windows NT + Branch: perl + ! t/io/fs.t win32/win32.c +____________________________________________________________________________ +[ 4884] By: gsar on 2000/01/25 01:32:57 + Log: windows build fixups from uniform DLL name change to perl56.dll + Branch: perl + ! installperl makedef.pl win32/perllib.c +____________________________________________________________________________ +[ 4883] By: gsar on 2000/01/25 01:31:27 + Log: more fixes for warnings from change#4840 + Branch: perl + ! lib/Pod/Html.pm +____________________________________________________________________________ +[ 4882] By: gsar on 2000/01/24 15:35:12 + Log: assorted little nits + Branch: perl + ! mg.c win32/Makefile win32/makefile.mk win32/perlhost.h + ! win32/win32.c +____________________________________________________________________________ +[ 4881] By: gsar on 2000/01/24 14:32:31 + Log: add new warnings to perldelta + Branch: perl + ! Changes pod/perldelta.pod pod/perldiag.pod +____________________________________________________________________________ +[ 4880] By: jhi on 2000/01/24 14:14:23 + Log: From: Stephane Payrard + To: Gurusamy Sarathy + Cc: perl5-porters@perl.org + Subject: avoid division by 0 in Benchmark.pm + Date: Mon, 24 Jan 2000 16:15:38 +0100 + Message-ID: <20000124161538.A995@freesurf.fr> + Branch: cfgperl + ! lib/Benchmark.pm +____________________________________________________________________________ +[ 4879] By: gsar on 2000/01/24 14:14:20 + Log: force linkage of the function wrappers for globals in change#4878 + Branch: perl + ! embed.pl globals.c perlapi.h win32/win32.h +____________________________________________________________________________ +[ 4878] By: gsar on 2000/01/24 13:04:45 + Log: enable function wrappers for access to globals under MULTIPLICITY + (provides binary compatibility in the face of changes in interpreter + structure) + Branch: perl + ! Makefile.SH XSUB.h cflags.SH embed.pl makedef.pl objXSUB.h + ! perl.h perlapi.c perlapi.h win32/Makefile win32/makefile.mk +____________________________________________________________________________ +[ 4877] By: jhi on 2000/01/24 11:41:57 + Log: perlhist update. + Branch: cfgperl + ! pod/perlhist.pod +____________________________________________________________________________ +[ 4876] By: jhi on 2000/01/24 11:32:07 + Log: Updates on the large file support status. + Branch: cfgperl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 4875] By: jhi on 2000/01/24 11:23:16 + Log: Integrate with Sarathy. + Branch: cfgperl + !> ext/DB_File/Makefile.PL ext/NDBM_File/NDBM_File.pm + !> ext/ODBM_File/ODBM_File.pm lib/AutoSplit.pm + !> lib/Math/Complex.pm lib/Math/Trig.pm lib/Shell.pm +____________________________________________________________________________ +[ 4874] By: gsar on 2000/01/24 10:43:03 + Log: fix typos; avoid use constant for lowercase constants (produces + warnings now) + Branch: perl + ! ext/DB_File/Makefile.PL lib/Math/Complex.pm lib/Math/Trig.pm + ! lib/Shell.pm +____________________________________________________________________________ +[ 4873] By: gsar on 2000/01/24 09:40:24 + Log: avoid warnings when there's no subs to autosplit + Branch: perl + ! lib/AutoSplit.pm +____________________________________________________________________________ +[ 4872] By: jhi on 2000/01/24 09:39:01 + Log: Create a tool for converting a config_h.SH into a VOS config.h. + Branch: cfgperl + + vos/config.def vos/config.pl + ! MANIFEST vos/config.h vos/config_h.SH_orig +____________________________________________________________________________ +[ 4871] By: gsar on 2000/01/24 09:15:20 + Log: typos in change#4623 + Branch: perl + ! ext/NDBM_File/NDBM_File.pm ext/ODBM_File/ODBM_File.pm +____________________________________________________________________________ +[ 4870] By: jhi on 2000/01/24 06:43:19 + Log: Sync metaconfig units to comply with the typo fixes of #4869. + Branch: cfgperl + ! Configure config_h.SH + Branch: metaconfig + + U/modified/cf_email.U U/modified/so.U + Branch: metaconfig/U/perl + ! dlsrc.U +____________________________________________________________________________ +[ 4869] By: jhi on 2000/01/24 06:04:31 + Log: Integrate with Sarathy. + Branch: cfgperl + +> t/pragma/diagnostics.t + !> (integrate 120 files) +____________________________________________________________________________ +[ 4868] By: gsar on 2000/01/23 21:49:28 + Log: on windows, set seek position to end for files opened in append mode + (improves compatibility with Unix, avoids buffering issues) + Branch: perl + ! win32/win32.c +____________________________________________________________________________ +[ 4867] By: gsar on 2000/01/23 21:19:31 + Log: change#4866 was flawed; revert and add better fix for warning + Branch: perl + ! op.c op.h +____________________________________________________________________________ +[ 4866] By: gsar on 2000/01/23 20:43:56 + Log: optimize away runtime code for our($foo) (also avoid warnings) + Branch: perl + ! op.c +____________________________________________________________________________ +[ 4865] By: gsar on 2000/01/23 13:17:18 + Log: DB_File 1.72 update from Paul Marquess + Branch: perl + ! ext/DB_File/Changes ext/DB_File/DB_File.pm + ! ext/DB_File/DB_File.xs ext/DB_File/version.c +____________________________________________________________________________ +[ 4864] By: gsar on 2000/01/23 13:12:31 + Log: system('VAR123=foo cmd') wasn't invoking shell (de-locale-ized patch + suggested by Dominic Dunlop ) + Branch: perl + ! doio.c +____________________________________________________________________________ +[ 4863] By: gsar on 2000/01/23 13:01:35 + Log: fix misclassified warnings + Branch: perl + ! pod/perldiag.pod +____________________________________________________________________________ +[ 4862] By: gsar on 2000/01/23 12:52:12 + Log: document bareword prototype incompatibility + Branch: perl + ! pod/perldelta.pod pod/perlsub.pod +____________________________________________________________________________ +[ 4861] By: gsar on 2000/01/23 12:32:25 + Log: faulty edit + Branch: perl + ! lib/File/stat.pm +____________________________________________________________________________ +[ 4860] By: gsar on 2000/01/23 12:23:48 + Log: s/use vars/our/g modules that aren't independently maintained on CPAN + Branch: perl + ! ext/B/B/Asmdata.pm ext/Data/Dumper/Dumper.pm + ! ext/Devel/DProf/DProf.pm ext/Fcntl/Fcntl.pm + ! ext/File/Glob/Glob.pm ext/GDBM_File/GDBM_File.pm + ! ext/IO/lib/IO/Dir.pm ext/IO/lib/IO/File.pm + ! ext/IO/lib/IO/Handle.pm ext/IO/lib/IO/Pipe.pm + ! ext/IO/lib/IO/Poll.pm ext/IO/lib/IO/Seekable.pm + ! ext/IO/lib/IO/Socket.pm ext/IO/lib/IO/Socket/INET.pm + ! ext/IO/lib/IO/Socket/UNIX.pm ext/NDBM_File/NDBM_File.pm + ! ext/ODBM_File/ODBM_File.pm ext/Opcode/Opcode.pm + ! ext/Opcode/Safe.pm ext/POSIX/POSIX.pm + ! ext/SDBM_File/SDBM_File.pm ext/Socket/Socket.pm + ! ext/Thread/Thread.pm lib/AnyDBM_File.pm lib/AutoLoader.pm + ! lib/AutoSplit.pm lib/Class/Struct.pm lib/Dumpvalue.pm + ! lib/ExtUtils/Command.pm lib/ExtUtils/Install.pm + ! lib/ExtUtils/Installed.pm lib/ExtUtils/Liblist.pm + ! lib/ExtUtils/MM_VMS.pm lib/ExtUtils/Mksymlists.pm + ! lib/ExtUtils/Packlist.pm lib/Fatal.pm lib/File/Basename.pm + ! lib/File/Compare.pm lib/File/Copy.pm lib/File/Find.pm + ! lib/File/Path.pm lib/File/stat.pm lib/FileHandle.pm + ! lib/Math/Complex.pm lib/Math/Trig.pm lib/Net/Ping.pm + ! lib/Net/hostent.pm lib/Net/netent.pm lib/Net/protoent.pm + ! lib/Net/servent.pm lib/Shell.pm lib/Test.pm + ! lib/Test/Harness.pm lib/Tie/Array.pm lib/Tie/Handle.pm + ! lib/Time/gmtime.pm lib/Time/localtime.pm lib/User/grent.pm + ! lib/User/pwent.pm lib/base.pm lib/caller.pm lib/constant.pm + ! lib/diagnostics.pm lib/fields.pm lib/lib.pm lib/strict.pm +____________________________________________________________________________ +[ 4859] By: gsar on 2000/01/23 11:29:22 + Log: fix diagnostics to report "our" vs "my" correctly + Branch: perl + ! op.c pod/perldiag.pod +____________________________________________________________________________ +[ 4858] By: gsar on 2000/01/23 10:14:46 + Log: set api_version to 5.5.0 (binary compatibility needs to get tested + more widely) + Branch: perl + ! patchlevel.h +____________________________________________________________________________ +[ 4857] By: gsar on 2000/01/23 10:04:03 + Log: disallow our($foo::bar) + Branch: perl + ! pod/perldiag.pod toke.c +____________________________________________________________________________ +[ 4856] By: gsar on 2000/01/23 09:50:54 + Log: dprofpp can't find Devel::DProf::VERSION due to change#4852 + Branch: perl + ! utils/dprofpp.PL +____________________________________________________________________________ +[ 4855] By: gsar on 2000/01/23 09:36:51 + Log: new test (from Michael G Schwern ) + Branch: perl + + t/pragma/diagnostics.t + ! MANIFEST +____________________________________________________________________________ +[ 4854] By: gsar on 2000/01/23 09:24:40 + Log: add PREREQ_PM to default template (suggested by Michael G Schwern + ) + Branch: perl + ! utils/h2xs.PL +____________________________________________________________________________ +[ 4853] By: gsar on 2000/01/23 09:08:30 + Log: cygwin update (from Eric Fifer ) + Branch: perl + ! cygwin/Makefile.SHs hints/cygwin.sh t/io/tell.t +____________________________________________________________________________ +[ 4852] By: gsar on 2000/01/23 08:52:44 + Log: mark some extensions as "special versions" to avoid CPAN indexer + confusion (from Ilya Zakharevich) + Branch: perl + ! ext/Devel/DProf/DProf.pm ext/Devel/Peek/Peek.pm +____________________________________________________________________________ +[ 4851] By: gsar on 2000/01/23 08:48:46 + Log: prefer POSIX::uname() rather than syscalls, which require attempting + to load syscall.ph (from David Huggins-Daines ) + Branch: perl + ! lib/Sys/Hostname.pm +____________________________________________________________________________ +[ 4850] By: gsar on 2000/01/23 08:36:43 + Log: integrate cfgperl contents into mainline + Branch: perl + !> Configure Policy_sh.SH Porting/Glossary Porting/config.sh + !> Porting/config_H config_h.SH perl.h +____________________________________________________________________________ +[ 4849] By: gsar on 2000/01/23 08:17:30 + Log: fix localization in while BLOCK when there is a continue BLOCK + by introducing an explicit scope (c.f. change#4848) + Branch: perl + ! op.c pp_ctl.c t/cmd/while.t +____________________________________________________________________________ +[ 4848] By: gsar on 2000/01/23 06:43:51 + Log: fix scope cleanup when next jumps to a continue block; this is rather + in the nature of a kludge; it doesn't fix the longstanding bug that + makes C print "7" + instead of "1") + Branch: perl + ! pp_ctl.c t/cmd/while.t +____________________________________________________________________________ +[ 4847] By: gsar on 2000/01/23 04:47:25 + Log: don't warn about masked lexical in C, + C etc. + Branch: perl + ! op.c +____________________________________________________________________________ +[ 4846] By: gsar on 2000/01/23 04:44:17 + Log: avoid warnings in change#4839 + Branch: perl + ! lib/Carp/Heavy.pm +____________________________________________________________________________ +[ 4845] By: gsar on 2000/01/22 13:12:38 + Log: Configure typos (from Ray Phillips ) + Branch: perl + ! Changes Configure +____________________________________________________________________________ +[ 4844] By: gsar on 2000/01/22 12:46:26 + Log: wrong category for exec() warning + Branch: perl + ! op.c pod/perlop.pod +____________________________________________________________________________ +[ 4843] By: gsar on 2000/01/22 12:42:40 + Log: fix line continuations in argument lists (from Helmut Jarausch) + Branch: perl + ! lib/ExtUtils/xsubpp +____________________________________________________________________________ +[ 4842] By: gsar on 2000/01/22 12:34:39 + Log: CGI.pm upgraded to v2.56 from CPAN + Branch: perl + ! eg/cgi/index.html lib/CGI.pm lib/CGI/Apache.pm + ! lib/CGI/Cookie.pm lib/CGI/Pretty.pm lib/CGI/Switch.pm + ! t/lib/cgi-html.t +____________________________________________________________________________ +[ 4841] By: gsar on 2000/01/22 12:07:23 + Log: avoid warnings due to lack of forward declarations + Branch: perl + ! lib/Pod/Html.pm +____________________________________________________________________________ +[ 4840] By: gsar on 2000/01/22 12:04:30 + Log: heavy cleanup of Pod::Html bug fixes (from Wolfgang Laun + ) + Branch: perl + ! lib/Pod/Html.pm +____________________________________________________________________________ +[ 4839] By: gsar on 2000/01/22 11:57:24 + Log: better Carp reporting within subclassed modules (from Wolfgang Laun + ) + Branch: perl + ! lib/Carp/Heavy.pm pod/perldelta.pod +____________________________________________________________________________ +[ 4838] By: gsar on 2000/01/22 10:53:06 + Log: truncate(FH) flushes FH before truncating it + Branch: perl + ! pp_sys.c t/io/fs.t +____________________________________________________________________________ +[ 4837] By: gsar on 2000/01/22 10:37:16 + Log: #line directives without a filename leave the file name as it was + instead of setting it to the script name (from Andrew Pimlott + ) + Branch: perl + ! toke.c +____________________________________________________________________________ +[ 4836] By: gsar on 2000/01/22 10:06:53 + Log: add patch for printf-style format typechecks (from Robin Barker + ); fixes for problems so identified + Branch: perl + ! XSUB.h doio.c dump.c embed.pl gv.c op.c perl.c perl.h pp_ctl.c + ! pp_hot.c pp_sys.c proto.h regcomp.c sv.c toke.c +____________________________________________________________________________ +[ 4835] By: gsar on 2000/01/22 08:42:52 + Log: From: John Tobey + Date: Thu, 16 Dec 1999 20:20:38 -0500 + Message-Id: + Subject: [ID 19991216.006] [PATCH 5.005_63] Reloading modules that use 'fields' + Branch: perl + ! lib/base.pm lib/fields.pm t/lib/fields.t +____________________________________________________________________________ +[ 4834] By: gsar on 2000/01/22 08:08:08 + Log: fix deeply nested closures that have no references to lexical in + intervening subs + Branch: perl + ! embed.h embed.pl op.c proto.h t/op/closure.t +____________________________________________________________________________ +[ 4833] By: gsar on 2000/01/21 17:04:21 + Log: add $VERSION + Branch: perl + ! lib/Text/Soundex.pm lib/Tie/Handle.pm +____________________________________________________________________________ +[ 4832] By: gsar on 2000/01/21 16:49:09 + Log: fix bug in dumping self-referential scalars + Branch: perl + ! ext/Data/Dumper/Dumper.pm ext/Data/Dumper/Dumper.xs + ! t/lib/dumper.t +____________________________________________________________________________ +[ 4831] By: jhi on 2000/01/21 09:16:07 + Log: Integrate with Sarathy. + Branch: cfgperl + +> t/op/exists_sub.t + !> INSTALL MANIFEST embed.h embed.pl global.sym objXSUB.h op.c + !> op.h perlapi.c pod/perldelta.pod pod/perldiag.pod + !> pod/perlfunc.pod pod/perlop.pod pod/perlvar.pod pp.c pp_hot.c + !> pp_sys.c proto.h sv.c sv.h t/pragma/warn/pp_hot + !> t/pragma/warn/pp_sys util.c utils/h2xs.PL +____________________________________________________________________________ +[ 4830] By: gsar on 2000/01/21 04:28:08 + Log: patch to report warnings on bogus filehandles passed to flock(), + more consistent warnings, from Greg Bacon + (slightly modified) + Branch: perl + ! embed.h embed.pl global.sym objXSUB.h perlapi.c + ! pod/perldiag.pod pp_hot.c pp_sys.c proto.h + ! t/pragma/warn/pp_hot t/pragma/warn/pp_sys util.c +____________________________________________________________________________ +[ 4829] By: gsar on 2000/01/21 03:43:46 + Log: typo fix + Branch: perl + ! pod/perlop.pod +____________________________________________________________________________ +[ 4828] By: gsar on 2000/01/21 03:32:31 + Log: notes about $^H and %^H from Ilya Zakharevich; substantial + fixups of faulty facts and prose + Branch: perl + ! pod/perlvar.pod +____________________________________________________________________________ +[ 4827] By: gsar on 2000/01/21 01:45:51 + Log: support for C (from Spider Boardman) + Branch: perl + + t/op/exists_sub.t + ! MANIFEST op.c op.h pod/perldelta.pod pod/perldiag.pod + ! pod/perlfunc.pod pp.c +____________________________________________________________________________ +[ 4826] By: gsar on 2000/01/21 01:35:46 + Log: mention the fact that open(my $foo, ...) covers all handle + constructors + Branch: perl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 4825] By: gsar on 2000/01/21 01:03:34 + Log: From: Ilya Zakharevich + Date: Wed, 19 Jan 2000 15:05:11 -0500 + Message-ID: <20000119150511.A22859@monk.mps.ohio-state.edu> + Subject: [PATCH 5.005_63] h2xs goof and a depessimization + Branch: perl + ! utils/h2xs.PL +____________________________________________________________________________ +[ 4824] By: gsar on 2000/01/20 19:14:26 + Log: INSTALL updates from Andy Dougherty + Branch: perl + ! INSTALL +____________________________________________________________________________ +[ 4823] By: gsar on 2000/01/20 08:40:13 + Log: sv_true() has a superfluous test + Branch: perl + ! sv.c sv.h +____________________________________________________________________________ +[ 4822] By: bailey on 2000/01/20 02:03:35 + Log: Minor cosmetic updates + Branch: vmsperl + ! configure.com +____________________________________________________________________________ +[ 4821] By: bailey on 2000/01/20 00:25:30 + Log: Quick integration of mainline changes to date + Branch: vmsperl + +> (branch 74 files) + - eg/cgi/dna.small.gif.uu eg/cgi/wilogo.gif.uu epoc/config.h + - epoc/perl.mmp epoc/perl.pkg ext/DynaLoader/dl_cygwin.xs + - lib/Pod/PlainText.pm lib/unicode/Eq/Latin1 + - lib/unicode/Eq/Unicode lib/unicode/Jamo-2.txt + - lib/unicode/Unicode.html lib/unicode/UnicodeData-Latest.txt + - lib/warning.pm os2/POSIX.mkfifo warning.h + !> (integrate 462 files) +____________________________________________________________________________ +[ 4820] By: jhi on 2000/01/19 22:46:42 + Log: More robust inc_version_list from Andy. + Branch: cfgperl + ! Configure Porting/Glossary Porting/config.sh Porting/config_H + ! config_h.SH + Branch: metaconfig + ! U/installdirs/inc_version_list.U +____________________________________________________________________________ +[ 4819] By: jhi on 2000/01/19 17:36:56 + Log: Add NV_PRESERVES_UV. + Branch: cfgperl + ! Configure Porting/Glossary Porting/config.sh Porting/config_H + ! config_h.SH perl.h + Branch: metaconfig + ! U/protos/selecttype.U + Branch: metaconfig/U/perl + - nvpresuv.U + ! perlxv.U +____________________________________________________________________________ +[ 4818] By: jhi on 2000/01/19 08:13:05 + Log: Integrate with Sarathy. + Branch: cfgperl + !> Changes Configure win32/config.bc win32/config.gc + !> win32/config.vc win32/config_H.bc win32/config_H.gc + !> win32/config_H.vc +____________________________________________________________________________ +[ 4817] By: gsar on 2000/01/19 05:25:43 + Log: regen win32/config* + Branch: perl + ! Configure win32/config.bc win32/config.gc win32/config.vc + ! win32/config_H.bc win32/config_H.gc win32/config_H.vc +____________________________________________________________________________ +[ 4816] By: jhi on 2000/01/18 21:19:10 + Log: Policy patch from Andy for installation directories, + removing the $apiversion. + Branch: cfgperl + ! Policy_sh.SH +____________________________________________________________________________ +[ 4815] By: jhi on 2000/01/18 21:11:03 + Log: Move _GNU_SOURCE into config_h.SH awaay from Configure + as suggested by Andy. + Branch: cfgperl + ! Configure config_h.SH + Branch: metaconfig + ! U/compline/d_gnulibc.U U/modified/cc.U +____________________________________________________________________________ +[ 4814] By: gsar on 2000/01/18 20:48:10 + Log: integrate cfgperl changes into mainline + Branch: perl + ! Changes + !> Configure Porting/Glossary Porting/config.sh Porting/config_H + !> Porting/pumpkin.pod config_h.SH doop.c patchlevel.h perl.c + !> perl.h t/lib/posix.t t/op/pack.t utf8.c +____________________________________________________________________________ [ 4813] By: jhi on 2000/01/18 19:41:33 Log: metaconfig todo note from Andy. Branch: cfgperl @@ -256,256 +1703,6 @@ ____________________________________________________________________________ ! README.win32 win32/Makefile win32/makefile.mk win32/perlhost.h ! win32/vdir.h win32/win32.c ____________________________________________________________________________ -[ 4788] By: chip on 2000/01/10 17:52:39 - Log: Integrate #4779 from mainline: - terminate -s switch processing only on C<-->, not on C<--foo> - Branch: maint-5.005/perl - ! perl.c -____________________________________________________________________________ -[ 4787] By: chip on 2000/01/10 17:51:17 - Log: Tweak change #4785. - Branch: maint-5.005/perl - ! win32/win32.c -____________________________________________________________________________ -[ 4786] By: chip on 2000/01/10 17:11:40 - Log: Make automatically-generated files +w (type "text+w"). - Branch: maint-5.005/perl - ! embed.h embedvar.h ext/B/B/Asmdata.pm keywords.h objXSUB.h - ! opcode.h pod/perltoc.pod pp_proto.h regnodes.h - ! win32/config_H.bc win32/config_H.gc win32/config_H.vc -____________________________________________________________________________ -[ 4785] By: chip on 2000/01/10 17:08:48 - Log: Patch from Sarathy to integrate changes from mainline: 2751, - 2821, 2916, 2930, 2931, 2937 2990, 3033, 3036, 3042, 3061, 3097, - 3123, 3134, 3135, 3269, 3270, 3300, 3316, 3345 3350, 3353, 3362, - 3363, 3396, 3419, 3423, 3445, 3446, 3447, 3449, 3450, 3451, 3487 - 3493, 3514, 3533, 3548, 3549, 3588, 3682, 3685, 3699, 3785, - 3804, 3811, 3897, 4057 4102, 4103, 4230, 4401, 4420, 4504 - -- - enable better Win32::DomainName() by demand loading netapi32.dll - (from Jan Dubois) - -- - win32_utime() on directories should use localtime() rather - than gmtime() (from Jan Dubois) - -- - serious bug introduced by G_VOID changes in 5.003_96: scalar - eval"" did not pop stack correctly; C<$a = eval "(1,2)x1"> - is one symptom of the problem - -- - add $installarchlib/CORE to default linker search path on windows - -- - fix memory leak in C - -- - fix memory leak in C - -- - avoid hiding child process window - -- - optimizations could sometimes bypass bareword check - -- - fix typo that caused INSTALLPRIVLIB to have doubled 'perl5' - -- - Pod::Html tweak - From: jan.dubois@ibm.net (Jan Dubois) - To: perl5-porters@perl.org - Subject: [PATCH 5.005_58] pod2html: Missing chunk for VMS filenames - Date: Tue, 27 Jul 1999 22:14:12 +0200 - Message-ID: <37a50af0.46171380@smtp1.ibm.net> - -- - don't quit if =head* wasn't found (suggested by Roland Bauer - ) - -- - avoid bug in win32_str_os_error() (from Jan Dubois) - -- - applied suggested patch, along with later tweak - From: jan.dubois@ibm.net (Jan Dubois) - Date: Wed, 14 Jul 1999 23:53:43 +0200 - Message-ID: <37a902e7.15977234@smtp1.ibm.net> - Subject: Merge ActivePerl Stylesheet support etc into Pod::Html.pm - -- - use a better prefixify() heuristic than m/perl/ (prefix/lib/perl5 - and prefix/lib/perl5/man are ass_u_med only if those directories - actually exist; else prefix/{lib,man} are used) - -- - allow C<-foo> under C (behavior of C<-$string> - is unchanged still) - -- - avoid race condition in the CAPI extension bootstrap handler - -- - sanity check to cover the case when perl is installed into the - X:\ (drive root) - -- - truncate() has a peculiar exemption from strict barewords, even - though it has a non-filehandle prototype - -- - change#3447 didn't do enough to exempt Foo->bar(qw/.../) from - strict 'subs' - -- - change#3449 wasn't doing enough - -- - make win32_spawnvp() inherit standard handles even when they - may be redirected - -- - minor logic tweak for reserved word warning - -- - oops, some files missing in change#3449 - -- - allow '*' prototype to autoquote even barewords that happen to be - function names; parens or ampersand continue to force the other - interpretation; makes C - do the right thing, for example - -- - redo change#2061 and parts of change#1169 with code in the - parser; PL_last_proto hackery gone, strict 'subs' in now - implemented in the optimizer where specifying the exceptional - cases is much more robust; '*' (bareword) prototype now works - reliably when used in second and subsequent arguments - -- - remove redundant part of change#1169 superceded by change#2061; - avoid "future reserved word" warning on prototypical bearwords - -- - s/isspace/isSPACE/g and make sure the CRT version is always - passed an unsigned char (fixes random occurrence of spaces in - arguments containing high-bit chars passed to spawned children, - on win32) - -- - on win32, look for "site/5.XXX/lib" if "site/5.XXXYY/lib" isn't - found (brings sitelib intuition in line with privlib) - -- - mortalize string allocations by win32_get_{priv,site}lib() - (fixes small memory leak in interpreter) - -- - opendir(D,"x:") on win32 opens cwd() for drive rather than root; - stat() behaves similarly - -- - documentation for Win32 builtins (somewhat modified) - From: jan.dubois@ibm.net (Jan Dubois) - Date: Tue, 30 Mar 1999 08:05:03 +0200 - Message-ID: <37006783.1926460@smtp1.ibm.net> - Subject: Re: Issues with build 509 - -- - provide File::Copy::syscopy() via Win32::CopyFile() on win32 - -- - more bulletproof workaround for mangled paths; - provide Win32::GetLongPathName() - -- - normalize $^X to full pathname on win32 - -- - work around mangled archname on win32 while finding privlib/sitelib; - normalize lib paths to forward slashes internally - -- - avoid negative return value from Win32::GetTickCount() - From: jan.dubois@ibm.net (Jan Dubois) - Date: Sat, 03 Apr 1999 19:04:18 +0200 - Message-ID: <37084742.22824479@smtp1.ibm.net> - Subject: Re: Win32::GetTickCount - -- - adjust win32_stat() to cope with FindFirstFile() and stat() bugs - (makes opendir(D,"c:") work reliably) - -- - fix buggy reference count on refs to SVs with autoviv magic - (resulted in C and Data::Dumper - accessing free()d memory) - -- - fix bug in change#3123 (off-by-one, caused C to fail - on win32) - -- - flip release & version in win32_uname() - -- - support POSIX::uname() via win32_uname() - -- - implement win32_spawnvp() internally, making it return true PIDs - for asynchronous spawns; fix win32_kill() to always deal with - PIDs - -- - use yyerror() instead of croak() so that compile-time failures in - my(LIST) don't confuse globals with lexicals - -- - allow custom comparison function in File::Compare::compare_text() - From: jan.dubois@ibm.net (Jan Dubois) - Date: Fri, 26 Feb 1999 21:56:09 +0100 - Message-ID: <36db0838.8805651@smtp1.ibm.net> - Subject: Re: PodParser 1.07 (was: RE: C vs stuff()) - -- - slightly edited version of suggested patch - From: jan.dubois@ibm.net (Jan Dubois) - Date: Mon, 01 Mar 1999 00:32:05 +0100 - Message-ID: <36dbcf2c.12325433@smtp1.ibm.net> - Subject: Re: [PATCH 5.005_55] Cleanup of File::Spec module - -- - revert parts of change#2990 to preserve predictable usage of - Win32::Foo() as stacked list values - From: jan.dubois@ibm.net (Jan Dubois) - Date: Sat, 27 Feb 1999 18:24:17 +0100 - Message-ID: <36e22849.36531259@smtp1.ibm.net> - Subject: Re: resend [PATCH 5.005_55] Various win32/win32.c cleanup - -- - add File::Compare::compare_text() - From: jan.dubois@ibm.net (Jan Dubois) - Date: Fri, 26 Feb 1999 00:20:41 +0100 - Message-ID: <36dcd8ab.20195659@smtp1.ibm.net> - Subject: Re: PodParser 1.07 (was: RE: C vs stuff()) - -- - From: jan.dubois@ibm.net (Jan Dubois) - Date: Thu, 18 Feb 1999 19:14:07 +0100 - Message-ID: <36d15809.40853323@smtp1.ibm.net> - Subject: resend [PATCH 5.005_55] Various win32/win32.c cleanup - -- - support Win32::GetFullPathName() and Win32::SetLastError() - From: jan.dubois@ibm.net (Jan Dubois) - Date: Tue, 09 Feb 1999 22:27:31 +0100 - Message-ID: <36c1a2ed.8007554@smtp1.ibm.net> - Subject: [PATCH _54] Win32::GetFullPathName - -- - backout change#2811 and add newer version based on File::Spec - From: Barrie Slaymaker - Date: Thu, 11 Feb 1999 16:29:24 -0500 - Message-ID: <36C34BB4.A62090E0@telerama.com> - Subject: (pod2html) Relative URLs using new File::Spec - -- - From: Barrie Slaymaker - Date: Thu, 11 Feb 1999 19:39:48 -0500 - Message-ID: <36C37854.707D139@telerama.com> - Subject: Merging File::PathConvert in to File::Spec - -- - back out change#2751, apply updated version - From: jan.dubois@ibm.net (Jan Dubois) - Date: Sat, 06 Feb 1999 01:06:29 +0100 - Message-ID: <36bc844c.18763049@smtp1.ibm.net> - Subject: [PATCH] Cleanup of File::Spec module - -- - pod2html misinterprets Foo::Bar as a URL - (fix suggested by Alexander Barilo - ) - -- - devnull() support from Jan Dubois and others - Branch: maint-5.005/perl - + lib/File/Spec/Functions.pm pod/Win32.pod - ! MANIFEST cop.h dump.c embed.h ext/SDBM_File/sdbm/dbe.c - ! global.sym iperlsys.h lib/CGI.pm lib/CGI/Carp.pm - ! lib/ExtUtils/MM_Unix.pm lib/ExtUtils/xsubpp - ! lib/File/Compare.pm lib/File/Copy.pm lib/File/Spec.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 lib/Pod/Html.pm objXSUB.h objpp.h op.c - ! op.h perl.h pp.c pp_ctl.c pp_hot.c proto.h t/comp/proto.t - ! t/io/fs.t t/lib/fatal.t t/op/eval.t t/op/magic.t t/op/ref.t - ! t/pragma/strict-subs toke.c utils/perldoc.PL win32/GenCAPI.pl - ! win32/Makefile win32/config.bc win32/config.gc win32/config.vc - ! win32/config_H.bc win32/config_H.gc win32/config_H.vc - ! win32/makedef.pl win32/makefile.mk win32/perlhost.h - ! win32/runperl.c win32/win32.c win32/win32.h win32/win32iop.h - ! win32/win32sck.c -____________________________________________________________________________ -[ 4784] By: chip on 2000/01/10 09:04:34 - Log: various documentation tweaks suggested by M. J. T. Guy - Branch: maint-5.005/perl - ! INSTALL lib/strict.pm pod/perlfunc.pod pod/perlsyn.pod -____________________________________________________________________________ -[ 4783] By: chip on 2000/01/10 08:11:39 - Log: Refresh Getopt::Long to v2.20. - Branch: maint-5.005/perl - ! lib/Getopt/Long.pm -____________________________________________________________________________ [ 4782] By: gsar on 2000/01/10 05:27:03 Log: EPOC port update (from Olaf Flebbe ) Branch: perl diff --git a/Configure b/Configure index ba58770..7a6f9d6 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Tue Jan 18 21:42:31 EET 2000 [metaconfig 3.0 PL70] +# Generated on Fri Feb 4 21:57:24 EET 2000 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.com) cat >/tmp/c1$$ </dev/null || hostname) 2>&1` +myuname=`$uname -a 2>/dev/null` +$test -z "$myuname" && myuname=`hostname 2>/dev/null` # tr '[A-Z]' '[a-z]' would not work in EBCDIC # because the A-Z/a-z are not consecutive. myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \ @@ -2194,6 +2137,7 @@ EOM $test -f /dnix && osname=dnix $test -f /lynx.os && osname=lynxos $test -f /unicos && osname=unicos && osvers=`$uname -r` + $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r` $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r` $test -f /bin/mips && /bin/mips && osname=mips $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \ @@ -2654,7 +2598,7 @@ esac' cat <&4 + +You requested the use of long doubles but you do not seem to have +the mathematic functions for long doubles. I'm disabling the use +of long doubles. +EOM + uselongdouble=$undef + ;; +esac + cat < +#define I_STDLIB $i_stdlib #ifdef I_STDLIB #include #endif @@ -8928,7 +8901,7 @@ esac set fseeko d_fseeko eval $inlibc case "$longsize" in -8) echo "(Your long is 64 bits, so in a pinch you could use fseek.)" ;; +8) echo "(Your long is 64 bits, so you could use fseek.)" ;; esac : see if fsetpos exists @@ -8954,7 +8927,7 @@ eval $inlibc set ftello d_ftello eval $inlibc case "$longsize" in -8) echo "(Your long is 64 bits, so in a pinch you could use ftell.)" ;; +8) echo "(Your long is 64 bits, so you could use ftell.)" ;; esac : see if getgrent exists @@ -9254,6 +9227,10 @@ esac set d_htonl eval $setvar +: see if iconv exists +set iconv d_iconv +eval $inlibc + : index or strchr echo " " if set index val -f; eval $csym; $val; then @@ -9543,163 +9520,513 @@ eval $setvar set nice d_nice eval $inlibc -: see if POSIX threads are available -set pthread.h i_pthread -eval $inhdr - - - - -: how to create joinable pthreads -if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then - echo " " - echo "Checking what constant to use for creating joinable pthreads..." >&4 - $cat >try.c <<'EOCP' -#include +: see if inttypes.h is available +: we want a real compile instead of Inhdr because some systems +: have an inttypes.h which includes non-existent headers +echo " " +$cat >try.c < int main() { - int detachstate = JOINABLE; + static int32_t foo32 = 0x12345678; } EOCP - set try -DJOINABLE=PTHREAD_CREATE_JOINABLE - if eval $compile; then - echo "You seem to use PTHREAD_CREATE_JOINABLE." >&4 - val="$undef" # Yes, undef. - set d_old_pthread_create_joinable - eval $setvar - val="" - set old_pthread_create_joinable - eval $setvar - else - set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED - if eval $compile; then - echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&4 - val="$define" - set d_old_pthread_create_joinable - eval $setvar - val=PTHREAD_CREATE_UNDETACHED - set old_pthread_create_joinable - eval $setvar - else - set try -DJOINABLE=__UNDETACHED - if eval $compile; then - echo "You seem to use __UNDETACHED." >&4 - val="$define" - set d_old_pthread_create_joinable - eval $setvar - val=__UNDETACHED - set old_pthread_create_joinable - eval $setvar - else - echo "Egads, nothing obvious found. Guessing that you use 0." >&4 - val="$define" - set d_old_pthread_create_joinable - eval $setvar - val=0 - set old_pthread_create_joinable - eval $setvar - fi - fi - fi - $rm -f try try.* -else - d_old_pthread_create_joinable="$undef" - old_pthread_create_joinable="" -fi - -: see if pause exists -set pause d_pause -eval $inlibc - -: see if pipe exists -set pipe d_pipe -eval $inlibc - -: see if poll exists -set poll d_poll -eval $inlibc - - -: see whether the various POSIXish _yields exist -$cat >try.c < -#include -int main() { -#ifdef SCHED_YIELD - sched_yield(); -#else -#ifdef PTHREAD_YIELD - pthread_yield(); -#else -#ifdef PTHREAD_YIELD_NULL - pthread_yield(NULL); -#endif -#endif -#endif -} -EOP -: see if sched_yield exists -set try -DSCHED_YIELD +set try if eval $compile; then - val="$define" - sched_yield='sched_yield()' + echo " found." >&4 + val="$define" else - val="$undef" + echo " NOT found." >&4 + val="$undef" fi -case "$usethreads" in -$define) - case "$val" in - $define) echo 'sched_yield() found.' >&4 ;; - *) echo 'sched_yield() NOT found.' >&4 ;; - esac -esac -set d_sched_yield +$rm -f try.c try +set i_inttypes eval $setvar -: see if pthread_yield exists -set try -DPTHREAD_YIELD +: check for int64_t +echo " " +$echo $n "Checking to see if your system supports int64_t...$c" >&4 +$cat >try.c < +#$i_inttypes I_INTTYPES +#ifdef I_INTTYPES +#include +#endif +int main() { int64_t x = 7; } +EOCP +set try if eval $compile; then - val="$define" - case "$sched_yield" in - '') sched_yield='pthread_yield()' ;; - esac -else - set try -DPTHREAD_YIELD_NULL - if eval $compile; then val="$define" - case "$sched_yield" in - '') sched_yield='pthread_yield(NULL)' ;; - esac - else + echo " Yes, it does." >&4 +else val="$undef" - fi + echo " No, it doesn't." >&4 fi -case "$usethreads" in -$define) - case "$val" in - $define) echo 'pthread_yield() found.' >&4 ;; - *) echo 'pthread_yield() NOT found.' >&4 ;; - esac - ;; -esac -set d_pthread_yield +$rm -f try try.* +set d_int64t eval $setvar -case "$sched_yield" in -'') sched_yield=undef ;; -esac - -$rm -f try try.* -: see if this is a pwd.h system -set pwd.h i_pwd -eval $inhdr +echo " " +echo "Checking which 64-bit integer type we could use..." >&4 -case "$i_pwd" in -$define) - xxx=`./findhdr pwd.h` - $cppstdin $cppflags $cppminus < $xxx >$$.h +case "$intsize" in +8) val=int + set quadtype + eval $setvar + val='"unsigned int"' + set uquadtype + eval $setvar + quadkind=1 + ;; +*) case "$longsize" in + 8) val=long + set quadtype + eval $setvar + val='"unsigned long"' + set uquadtype + eval $setvar + quadkind=2 + ;; + *) case "$d_longlong:$longlongsize" in + define:8) + val='"long long"' + set quadtype + eval $setvar + val='"unsigned long long"' + set uquadtype + eval $setvar + quadkind=3 + ;; + *) case "$d_int64t" in + define) + val=int64_t + set quadtype + eval $setvar + val=uint64_t + set uquadtype + eval $setvar + quadkind=4 + ;; + esac + ;; + esac + ;; + esac + ;; +esac - if $contains 'pw_quota' $$.h >/dev/null 2>&1; then +case "$quadtype" in +'') case "$uselonglong:$d_longlong:$longlongsize" in + undef:define:8) + echo "(You would have 'long long', but you are not using it.)" >&4 ;; + *) echo "Alas, no 64-bit integer types in sight." >&4 ;; + esac + d_quad="$undef" + ;; +*) if test X"$use64bits" = Xdefine -o X"$longsize" = X8; then + verb="will" + else + verb="could" + fi + echo "We $verb use '$quadtype' for 64-bit integers." >&4 + d_quad="$define" + ;; +esac + +: check for length of character +echo " " +case "$charsize" in +'') + echo "Checking to see how big your characters are (hey, you never know)..." >&4 + $cat >try.c <<'EOCP' +#include +int main() +{ + printf("%d\n", (int)sizeof(char)); + exit(0); +} +EOCP + set try + if eval $compile_ok; then + dflt=`./try` + else + dflt='1' + echo "(I can't seem to compile the test program. Guessing...)" + fi + ;; +*) + dflt="$charsize" + ;; +esac +rp="What is the size of a character (in bytes)?" +. ./myread +charsize="$ans" +$rm -f try.c try + + +echo " " +$echo "Choosing the C types to be used for Perl's internal types..." >&4 + +case "$use64bits:$d_quad:$quadtype" in +define:define:?*) + ivtype="$quadtype" + uvtype="$uquadtype" + ivsize=8 + uvsize=8 + ;; +*) ivtype="long" + uvtype="unsigned long" + ivsize=$longsize + uvsize=$longsize + ;; +esac + +case "$uselongdouble:$d_longdbl" in +define:define) + nvtype="long double" + nvsize=$longdblsize + ;; +*) nvtype=double + nvsize=$doublesize + ;; +esac + +$echo "(IV will be "$ivtype", $ivsize bytes)" +$echo "(UV will be "$uvtype", $uvsize bytes)" +$echo "(NV will be "$nvtype", $nvsize bytes)" + +$cat >try.c < +#endif +#include +int main() { +#ifdef INT8 + int8_t i = INT8_MAX; + uint8_t u = UINT8_MAX; + printf("int8_t\n"); +#endif +#ifdef INT16 + int16_t i = INT16_MAX; + uint16_t i = UINT16_MAX; + printf("int16_t\n"); +#endif +#ifdef INT32 + int32_t i = INT32_MAX; + uint32_t u = UINT32_MAX; + printf("int32_t\n"); +#endif +} +EOCP + +case "$i8type" in +'') case "$charsize" in + 1) i8type=char + u8type="unsigned char" + i8size=$charsize + u8size=$charsize + ;; + esac + ;; +esac +case "$i8type" in +'') set try -DINT8 + if eval $compile; then + case "`./try$exe_ext`" in + int8_t) i8type=int8_t + u8type=uint8_t + i8size=1 + u8size=1 + ;; + esac + fi + ;; +esac +case "$i8type" in +'') if $test $charsize -ge 1; then + i8type=char + u8type="unsigned char" + i8size=$charsize + u8size=$charsize + fi + ;; +esac + +case "$i16type" in +'') case "$shortsize" in + 2) i16type=short + u16type="unsigned short" + i16size=$shortsize + u16size=$shortsize + ;; + esac + ;; +esac +case "$i16type" in +'') set try -DINT16 + if eval $compile; then + case "`./try$exe_ext`" in + int16_t) + i16type=int16_t + u16type=uint16_t + i16size=2 + u16size=2 + ;; + esac + fi + ;; +esac +case "$i16type" in +'') if $test $shortsize -ge 2; then + i16type=short + u16type="unsigned short" + i16size=$shortsize + u16size=$shortsize + fi + ;; +esac + +case "$i32type" in +'') case "$longsize" in + 4) i32type=long + u32type="unsigned long" + i32size=$longsize + u32size=$longsize + ;; + *) case "$intsize" in + 4) i32type=int + u32type="unsigned int" + i32size=$intsize + u32size=$intsize + ;; + esac + ;; + esac + ;; +esac +case "$i32type" in +'') set try -DINT32 + if eval $compile; then + case "`./try$exe_ext`" in + int32_t) + i32type=int32_t + u32type=uint32_t + i32size=4 + u32size=4 + ;; + esac + fi + ;; +esac +case "$i32type" in +'') if $test $intsize -ge 4; then + i32type=int + u32type="unsigned int" + i32size=$intsize + u32size=$intsize + fi + ;; +esac + +case "$i64type" in +'') case "$d_quad:$quadtype" in + define:?*) + i64type="$quadtype" + u64type="$uquadtype" + i64size=8 + u64size=8 + ;; + esac + ;; +esac + +$echo "Checking whether your NVs can preserve your UVs..." >&4 +$cat <try.c +#include +int main() { + $uvtype k = ($uvtype)~0, l; + $nvtype d; + l = k; + d = ($nvtype)l; + l = ($uvtype)d; + if (l == k) + printf("preserve\n"); + exit(0); +} +EOP +set try +if eval $compile; then + case "`./try$exe_ext`" in + preserve) d_nv_preserves_uv="$define" ;; + esac +fi +case "$d_nv_preserves_uv" in +$define) $echo "Yes, they can." 2>&1 ;; +*) $echo "No, they can't." 2>&1 + d_nv_preserves_uv="$undef" + ;; +esac + +$rm -f try.* try + +: see if POSIX threads are available +set pthread.h i_pthread +eval $inhdr + + + + +: how to create joinable pthreads +if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then + echo " " + echo "Checking what constant to use for creating joinable pthreads..." >&4 + $cat >try.c <<'EOCP' +#include +int main() { + int detachstate = JOINABLE; +} +EOCP + set try -DJOINABLE=PTHREAD_CREATE_JOINABLE + if eval $compile; then + echo "You seem to use PTHREAD_CREATE_JOINABLE." >&4 + val="$undef" # Yes, undef. + set d_old_pthread_create_joinable + eval $setvar + val="" + set old_pthread_create_joinable + eval $setvar + else + set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED + if eval $compile; then + echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&4 + val="$define" + set d_old_pthread_create_joinable + eval $setvar + val=PTHREAD_CREATE_UNDETACHED + set old_pthread_create_joinable + eval $setvar + else + set try -DJOINABLE=__UNDETACHED + if eval $compile; then + echo "You seem to use __UNDETACHED." >&4 + val="$define" + set d_old_pthread_create_joinable + eval $setvar + val=__UNDETACHED + set old_pthread_create_joinable + eval $setvar + else + echo "Egads, nothing obvious found. Guessing that you use 0." >&4 + val="$define" + set d_old_pthread_create_joinable + eval $setvar + val=0 + set old_pthread_create_joinable + eval $setvar + fi + fi + fi + $rm -f try try.* +else + d_old_pthread_create_joinable="$undef" + old_pthread_create_joinable="" +fi + +: see if pause exists +set pause d_pause +eval $inlibc + +: see if pipe exists +set pipe d_pipe +eval $inlibc + +: see if poll exists +set poll d_poll +eval $inlibc + + +: see whether the various POSIXish _yields exist +$cat >try.c < +#include +int main() { +#ifdef SCHED_YIELD + sched_yield(); +#else +#ifdef PTHREAD_YIELD + pthread_yield(); +#else +#ifdef PTHREAD_YIELD_NULL + pthread_yield(NULL); +#endif +#endif +#endif +} +EOP +: see if sched_yield exists +set try -DSCHED_YIELD +if eval $compile; then + val="$define" + sched_yield='sched_yield()' +else + val="$undef" +fi +case "$usethreads" in +$define) + case "$val" in + $define) echo 'sched_yield() found.' >&4 ;; + *) echo 'sched_yield() NOT found.' >&4 ;; + esac +esac +set d_sched_yield +eval $setvar + +: see if pthread_yield exists +set try -DPTHREAD_YIELD +if eval $compile; then + val="$define" + case "$sched_yield" in + '') sched_yield='pthread_yield()' ;; + esac +else + set try -DPTHREAD_YIELD_NULL + if eval $compile; then + val="$define" + case "$sched_yield" in + '') sched_yield='pthread_yield(NULL)' ;; + esac + else + val="$undef" + fi +fi +case "$usethreads" in +$define) + case "$val" in + $define) echo 'pthread_yield() found.' >&4 ;; + *) echo 'pthread_yield() NOT found.' >&4 ;; + esac + ;; +esac +set d_pthread_yield +eval $setvar + +case "$sched_yield" in +'') sched_yield=undef ;; +esac + +$rm -f try try.* + +: see if this is a pwd.h system +set pwd.h i_pwd +eval $inhdr + +case "$i_pwd" in +$define) + xxx=`./findhdr pwd.h` + $cppstdin $cppflags $cppminus < $xxx >$$.h + + if $contains 'pw_quota' $$.h >/dev/null 2>&1; then val="$define" else val="$undef" @@ -9771,123 +10098,10 @@ $define) set d_pwage; eval $setvar set d_pwchange; eval $setvar set d_pwclass; eval $setvar - set d_pwexpire; eval $setvar - set d_pwcomment; eval $setvar - set d_pwgecos; eval $setvar - set d_pwpasswd; eval $setvar - ;; -esac - -: see if inttypes.h is available -: we want a real compile instead of Inhdr because some systems -: have an inttypes.h which includes non-existent headers -echo " " -$cat >try.c < -int main() { - static int32_t foo32 = 0x12345678; -} -EOCP -set try -if eval $compile; then - echo " found." >&4 - val="$define" -else - echo " NOT found." >&4 - val="$undef" -fi -$rm -f try.c try -set i_inttypes -eval $setvar - -: check for int64_t -echo " " -$echo $n "Checking to see if your system supports int64_t...$c" >&4 -$cat >try.c < -#$i_inttypes I_INTTYPES -#ifdef I_INTTYPES -#include -#endif -int main() { int64_t x = 7; } -EOCP -set try -if eval $compile; then - val="$define" - echo " Yes, it does." >&4 -else - val="$undef" - echo " No, it doesn't." >&4 -fi -$rm -f try try.* -set d_int64t -eval $setvar - - -echo " " -echo "Checking which 64-bit integer type we could use..." >&4 - -case "$intsize" in -8) val=int - set quadtype - eval $setvar - val='"unsigned int"' - set uquadtype - eval $setvar - quadkind=1 - ;; -*) case "$longsize" in - 8) val=long - set quadtype - eval $setvar - val='"unsigned long"' - set uquadtype - eval $setvar - quadkind=2 - ;; - *) case "$uselonglong:$d_longlong:$longlongsize" in - define:define:8) - val='"long long"' - set quadtype - eval $setvar - val='"unsigned long long"' - set uquadtype - eval $setvar - quadkind=3 - ;; - *) case "$d_int64t" in - define) - val=int64_t - set quadtype - eval $setvar - val=uint64_t - set uquadtype - eval $setvar - quadkind=4 - ;; - esac - ;; - esac - ;; - esac - ;; -esac - -case "$quadtype" in -'') case "$uselonglong:$d_longlong:$longlongsize" in - undef:define:8) - echo "(You would have 'long long', but you are not using it.)" >&4 ;; - *) echo "Alas, no 64-bit integer types in sight." >&4 ;; - esac - d_quad="$undef" - ;; -*) if test X"$use64bits" = Xdefine -o X"$longsize" = X8; then - verb="will" - else - verb="could" - fi - echo "We $verb use '$quadtype' for 64-bit integers." >&4 - d_quad="$define" + set d_pwexpire; eval $setvar + set d_pwcomment; eval $setvar + set d_pwgecos; eval $setvar + set d_pwpasswd; eval $setvar ;; esac @@ -10676,10 +10890,6 @@ set d_sigsetjmp eval $setvar $rm -f try.c try -: see if sqrtl exists -set sqrtl d_sqrtl -eval $inlibc - : see if sys/stat.h is available set sys/stat.h i_sysstat eval $inhdr @@ -12113,216 +12323,6 @@ else fi -: check for length of character -echo " " -case "$charsize" in -'') - echo "Checking to see how big your characters are (hey, you never know)..." >&4 - $cat >try.c <<'EOCP' -#include -int main() -{ - printf("%d\n", (int)sizeof(char)); - exit(0); -} -EOCP - set try - if eval $compile_ok; then - dflt=`./try` - else - dflt='1' - echo "(I can't seem to compile the test program. Guessing...)" - fi - ;; -*) - dflt="$charsize" - ;; -esac -rp="What is the size of a character (in bytes)?" -. ./myread -charsize="$ans" -$rm -f try.c try - - -echo " " -$echo "Choosing the C types to be used for Perl's internal types..." >&4 - -case "$use64bits:$d_quad:$quadtype" in -define:define:?*) - ivtype="$quadtype" - uvtype="$uquadtype" - ivsize=8 - uvsize=8 - ;; -*) ivtype="long" - uvtype="unsigned long" - ivsize=$longsize - uvsize=$longsize - ;; -esac - -case "$uselongdouble:$d_longdbl" in -define:define) - nvtype="long double" - nvsize=$longdblsize - ;; -*) nvtype=double - nvsize=$doublesize - ;; -esac - -echo "(IV will be "$ivtype", $ivsize bytes)" -echo "(UV will be "$uvtype", $uvsize bytes)" -echo "(NV will be "$nvtype", $nvsize bytes)" - -$cat >try.c < -#endif -#include -int main() { -#ifdef INT8 - int8_t i = INT8_MAX; - uint8_t u = UINT8_MAX; - printf("int8_t\n"); -#endif -#ifdef INT16 - int16_t i = INT16_MAX; - uint16_t i = UINT16_MAX; - printf("int16_t\n"); -#endif -#ifdef INT32 - int32_t i = INT32_MAX; - uint32_t u = UINT32_MAX; - printf("int32_t\n"); -#endif -} -EOCP - -case "$i8type" in -'') case "$charsize" in - 1) i8type=char - u8type="unsigned char" - i8size=$charsize - u8size=$charsize - ;; - esac - ;; -esac -case "$i8type" in -'') set try -DINT8 - if eval $compile; then - case "`./try$exe_ext`" in - int8_t) i8type=int8_t - u8type=uint8_t - i8size=1 - u8size=1 - ;; - esac - fi - ;; -esac -case "$i8type" in -'') if $test $charsize -ge 1; then - i8type=char - u8type="unsigned char" - i8size=$charsize - u8size=$charsize - fi - ;; -esac - -case "$i16type" in -'') case "$shortsize" in - 2) i16type=short - u16type="unsigned short" - i16size=$shortsize - u16size=$shortsize - ;; - esac - ;; -esac -case "$i16type" in -'') set try -DINT16 - if eval $compile; then - case "`./try$exe_ext`" in - int16_t) - i16type=int16_t - u16type=uint16_t - i16size=2 - u16size=2 - ;; - esac - fi - ;; -esac -case "$i16type" in -'') if $test $shortsize -ge 2; then - i16type=short - u16type="unsigned short" - i16size=$shortsize - u16size=$shortsize - fi - ;; -esac - -case "$i32type" in -'') case "$longsize" in - 4) i32type=long - u32type="unsigned long" - i32size=$longsize - u32size=$longsize - ;; - *) case "$intsize" in - 4) i32type=int - u32type="unsigned int" - i32size=$intsize - u32size=$intsize - ;; - esac - ;; - esac - ;; -esac -case "$i32type" in -'') set try -DINT32 - if eval $compile; then - case "`./try$exe_ext`" in - int32_t) - i32type=int32_t - u32type=uint32_t - i32size=4 - u32size=4 - ;; - esac - fi - ;; -esac -case "$i32type" in -'') if $test $intsize -ge 4; then - i32type=int - u32type="unsigned int" - i32size=$intsize - u32size=$intsize - fi - ;; -esac - -case "$i64type" in -'') case "$d_quad:$quadtype" in - define:?*) - i64type="$quadtype" - u64type="$uquadtype" - i64size=8 - u64size=8 - ;; - esac - ;; -esac - -$rm -f try.* try - echo " " if $test X"$quadtype" != X; then @@ -12373,7 +12373,7 @@ EOCP fi fi -if $test X"$sPRId64" = X -a X"$i_inttypes.h" = X"$define" -a X"$quadtype" = Xint64_t; then +if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then $cat >try.c <<'EOCP' #include #include @@ -12894,6 +12894,7 @@ $rm -f foo* bar* case "$selecttype" in '') case "$d_select" in $define) + echo " " $cat <Cppsym.know -$cat <Cppsym +$echo "Guessing which symbols your C compiler and preprocessor define..." >&4 +$cat <<'EOSH' > Cppsym.know +a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370 +AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE +alliant alpha am29000 AM29000 amiga AMIGAOS AMIX +ansi ANSI_C_SOURCE apollo ardent atarist att386 att3b BeOS +BIG_ENDIAN BIT_MSF bsd BSD bsd43 bsd4_2 bsd4_3 BSD4_3 bsd4_4 +BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES BSDCOMPAT bsdi +bull c cadmus clipper CMU COFF COMPILER_VERSION +concurrent convex cpu cray CRAY CRAYMPP ctix CX_UX +CYGWIN DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO +Dynix DynixPTX ELF encore EPI EXTENSIONS FILE_OFFSET_BITS +FreeBSD GCC_NEW_VARARGS gcos gcx gimpel +GNU_SOURCE GNUC GNUC_MINOR GO32 gould GOULD_PN +H3050R H3050RX hbullx20 hcx host_mips +hp200 hp300 hp700 HP700 hp800 hp9000 +hp9000s200 hp9000s300 hp9000s400 hp9000s500 +hp9000s700 hp9000s800 hp9k8 hp_osf hppa hpux HPUX_SOURCE +i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960 +iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64 +INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1 +LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE +LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE +Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG +LONGDOUBLE LONGLONG LP64 luna luna88k Lynx +M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF +M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3 +M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX MACH machine MachTen +MATH_HAS_NO_SIDE_EFFECTS +mc300 mc500 mc68000 mc68010 mc68020 mc68030 mc68040 +mc68060 mc68k mc68k32 mc700 mc88000 mc88100 merlin +mert MiNT mips MIPS_FPSET MIPS_ISA MIPS_SIM MIPS_SZINT +MIPS_SZLONG MIPS_SZPTR MIPSEB MIPSEL MODERN_C motorola +mpeix MSDOS MTXINU MULTIMAX mvs MVS n16 ncl_el ncl_mr +NetBSD news1500 news1700 news1800 news1900 news3700 +news700 news800 news900 NeXT NLS ns16000 ns32000 +ns32016 ns32332 ns32k nsc32000 +OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE +pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc +pc532 pdp11 PGC PIC plexus PORTAR posix +POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE +POSIX_C_SOURCE POSIX_SOURCE POWER +PROTOTYPES PWB pyr QNX R3000 REENTRANT RES Rhapsody RISC6000 +riscix riscos RT scs SCO sequent sgi SGI_SOURCE sinix +SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE +sony sony_news sonyrisc sparc sparclite spectrum +stardent stdc STDC_EXT stratos sun sun3 sun386 +Sun386i svr3 svr4 SVR4_2 SVR4_SOURCE svr5 +SX system SYSTYPE_BSD SYSTYPE_BSD43 SYSTYPE_BSD44 +SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3 SYSV4 SYSV5 +sysV68 sysV88 Tek4132 Tek4300 titan +tower tower32 tower32_200 tower32_600 tower32_700 +tower32_800 tower32_850 tss +u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5 +ultrix UMAXV UnicomPBB UnicomPBD UNICOS UNICOSMK +unix UNIX95 UNIX99 unixpc unos USGr4 USGr4_2 +Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms xenix Xenix286 +XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2 XPG2_EXTENDED +XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED +z8000 +EOSH +# Maybe put other stuff here too. +cat <>Cppsym.know +$osname +EOSH +./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a +./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b +$cat Cppsym.a Cppsym.b | $tr ' ' $trnl | sort | uniq > Cppsym.know +$rm -f Cppsym.a Cppsym.b +cat < Cppsym $startsh -case "\$1" in --l) list=true - shift - ;; -esac -unknown='' -case "\$list\$#" in -1|2) - for sym do - if $contains "^\$1$" Cppsym.true >/dev/null 2>&1; then - exit 0 - elif $contains "^\$1$" Cppsym.know >/dev/null 2>&1; then - : - else - unknown="\$unknown \$sym" - fi - done - set X \$unknown - shift - ;; -esac -case \$# in -0) exit 1;; -esac -echo \$* | $tr ' ' '$trnl' | $sed -e 's/\(.*\)/\\ -#ifdef \1\\ -exit 0; _ _ _ _\1\\ \1\\ -#endif\\ -/' >Cppsym\$\$ -echo "exit 1; _ _ _" >>Cppsym\$\$ -$cppstdin $cppminus Cppsym2\$\$ -case "\$list" in -true) $awk 'NF > 5 {print substr(\$6,2,100)}' Cppsym.got + if $test -s Cppsym.got; then + $rm -f Cppsym.got + exit 0 + fi + $rm -f Cppsym.got + exit 1 +else + $tr " " "$trnl" | ./Cppsym.try + exit 0 +fi +EOSH chmod +x Cppsym $eunicefix Cppsym -./Cppsym -l $al | $sort | $grep -v '^$' >Cppsym.true - +cat < Cppsym.try +$startsh +cat <<'EOCP' > try.c +#include +int main() { +EOCP +$awk \\ +EOSH +cat <<'EOSH' >> Cppsym.try +'length($1) > 0 { + printf "#ifdef %s\n#if %s+0\nprintf(\"%s=%%ld\\n\", %s);\n#else\nprintf(\"%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 + printf "#ifdef _%s\n#if _%s+0\nprintf(\"_%s=%%ld\\n\", _%s);\n#else\nprintf(\"_%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 + printf "#ifdef __%s\n#if __%s+0\nprintf(\"__%s=%%ld\\n\", __%s);\n#else\nprintf(\"__%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 + printf "#ifdef __%s__\n#if __%s__+0\nprintf(\"__%s__=%%ld\\n\", __%s__);\n#else\nprintf(\"__%s__\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 +}' >> try.c +echo '}' >> try.c +EOSH +cat <> Cppsym.try +cc="$cc" +optimize="$optimize" +ccflags="$ccflags" +ldflags="$ldflags" +libs="$libs" +exe_ext="$exe_ext" +$cc $optimize $ccflags $ldflags -o try$exe_ext try.c $libs && ./try$exe_ext +EOSH +chmod +x Cppsym.try +$eunicefix Cppsym.try +./Cppsym < Cppsym.know > Cppsym.true : now check the C compiler for additional symbols postprocess_cc_v='' case "$osname" in @@ -13741,7 +13811,8 @@ fi $awk '/\=/ { print $0; next } { print $0"=1" }' ccsym.raw >ccsym.list -$awk '{ print $0"=1" }' Cppsym.true >ccsym.true +$awk '/\=/ { print $0; next } + { print $0"=1" }' Cppsym.true >ccsym.true $comm -13 ccsym.true ccsym.list >ccsym.own $comm -12 ccsym.true ccsym.list >ccsym.com $comm -23 ccsym.true ccsym.list >ccsym.cpp @@ -14523,6 +14594,7 @@ d_gnulibc='$d_gnulibc' d_grpasswd='$d_grpasswd' d_hasmntopt='$d_hasmntopt' d_htonl='$d_htonl' +d_iconv='$d_iconv' d_index='$d_index' d_inetaton='$d_inetaton' d_int64t='$d_int64t' @@ -14559,6 +14631,7 @@ d_msgrcv='$d_msgrcv' d_msgsnd='$d_msgsnd' d_mymalloc='$d_mymalloc' d_nice='$d_nice' +d_nv_preserves_uv='$d_nv_preserves_uv' d_off64_t='$d_off64_t' d_old_pthread_create_joinable='$d_old_pthread_create_joinable' d_oldpthreads='$d_oldpthreads' @@ -14752,6 +14825,7 @@ i_fcntl='$i_fcntl' i_float='$i_float' i_gdbm='$i_gdbm' i_grp='$i_grp' +i_iconv='$i_iconv' i_inttypes='$i_inttypes' i_limits='$i_limits' i_locale='$i_locale' @@ -14813,6 +14887,7 @@ i_varhdr='$i_varhdr' i_vfork='$i_vfork' ignore_versioned_solibs='$ignore_versioned_solibs' inc_version_list='$inc_version_list' +inc_version_list_init='$inc_version_list_init' incpath='$incpath' inews='$inews' installarchlib='$installarchlib' @@ -14847,6 +14922,9 @@ libc='$libc' libperl='$libperl' libpth='$libpth' libs='$libs' +libsdirs='$libsdirs' +libsfiles='$libsfiles' +libsfound='$libsfound' libswanted='$libswanted' line='$line' lint='$lint' diff --git a/EXTERN.h b/EXTERN.h index c813f81..897fae6 100644 --- a/EXTERN.h +++ b/EXTERN.h @@ -1,6 +1,6 @@ /* EXTERN.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -40,7 +40,7 @@ # define dEXTCONST const # endif # else -# if defined(CYGWIN) && defined(USEIMPORTLIB) +# if defined(__CYGWIN__) && defined(USEIMPORTLIB) # define EXT extern __declspec(dllimport) # define dEXT # define EXTCONST extern __declspec(dllimport) const diff --git a/INSTALL b/INSTALL index 7ac14ca..d387783 100644 --- a/INSTALL +++ b/INSTALL @@ -8,7 +8,8 @@ First, make sure you are installing an up-to-date version of Perl. If you didn't get your Perl source from CPAN, check the latest version at . -The basic steps to build and install perl5 on a Unix system are: +The basic steps to build and install perl5 on a Unix system +with all the defaults are: rm -f config.sh Policy.sh sh Configure -de @@ -42,20 +43,6 @@ For information on what's new in this release, see the pod/perldelta.pod file. For more detailed information about specific changes, see the Changes file. -IMPORTANT NOTE: 5.005_53 and later releases do not export unadorned -global symbols anymore. This means you may need to build older -extensions that have not been updated for the new naming convention -with: - - perl Makefile.PL POLLUTE=1 - -Alternatively, you can enable CPP symbol pollution wholesale by -building perl itself with: - - sh Configure -Accflags=-DPERL_POLLUTE - -pod/perldelta.pod contains more details about this. - =head1 DESCRIPTION This document is written in pod format as an easy way to indicate its @@ -67,7 +54,8 @@ by lines beginning with '='. The other mark-up used is C literal code L A link (cross reference) to name -You should probably at least skim through this entire document before +Although most of the defaults are probably fine for most users, +you should probably at least skim through this entire document before proceeding. If you're building Perl on a non-Unix system, you should also read @@ -80,6 +68,22 @@ system. (Unixware users should use the svr4.sh hint file.) If there is a README file for your platform, then you should read that too. Additional information is in the Porting/ directory. +=head1 WARNING: This version requires an extra step to build old extensions. + +5.005_53 and later releases do not export unadorned +global symbols anymore. This means you may need to build older +extensions that have not been updated for the new naming convention +with: + + perl Makefile.PL POLLUTE=1 + +Alternatively, you can enable CPP symbol pollution wholesale by +building perl itself with: + + sh Configure -Accflags=-DPERL_POLLUTE + +pod/perldelta.pod contains more details about this. + =head1 WARNING: This version may not be binary compatible with Perl 5.005. Using the default Configure options for building perl should get you @@ -102,7 +106,7 @@ The standard extensions supplied with Perl will be handled automatically. On a related issue, old modules may possibly be affected by the changes in the Perl language in the current release. Please see pod/perldelta.pod (and pod/perl500Xdelta.pod) for a description of -what's changed. See also your installed copy of the perllocal.pod +what's changed. See your installed copy of the perllocal.pod file for a (possibly incomplete) list of locally installed modules. Also see CPAN::autobundle for one way to make a "bundle" of your currently installed modules. @@ -126,10 +130,10 @@ followed. This will enable us to officially support this option. =head1 Space Requirements -The complete perl5 source tree takes up about 15 MB of disk space. -After completing make, it takes up roughly 20 MB, though the actual +The complete perl5 source tree takes up about 20 MB of disk space. +After completing make, it takes up roughly 30 MB, though the actual total is likely to be quite system-dependent. The installation -directories need something on the order of 15 MB, though again that +directories need something on the order of 20 MB, though again that value is system-dependent. =head1 Start with a Fresh Distribution @@ -333,7 +337,7 @@ The directories set up by Configure fall into three broad categories. =item Directories for the perl distribution -By default, Configure will use the following directories for 5.6. +By default, Configure will use the following directories for 5.6.0. $version is the full perl version number, including subversion, e.g. 5.6.0 or 5.6.1, and $archname is a string like sun4-sunos, determined by Configure. The full definitions of all Configure @@ -360,8 +364,7 @@ the common style is shown here. After perl is installed, you may later wish to add modules (e.g. from CPAN) or scripts. Configure will set up the following directories to -be used for installing those add-on modules and scripts. $version -is the perl version number, e.g. 5.6.0. +be used for installing those add-on modules and scripts. Configure variable Default value $siteprefix $prefix @@ -582,7 +585,7 @@ If the generated Policy.sh file is unsuitable, you may freely edit it to contain any valid shell commands. It will be run just after the platform-specific hints files. -Note: Since the directory hierarchy for 5.6 contains a number of +Note: Since the directory hierarchy for 5.6.0 contains a number of new vendor* and site* entries, your Policy.sh file will probably not set them to your desired values. I encourage you to run Configure interactively to be sure it puts things where you want them. @@ -881,7 +884,17 @@ the Configure command line. Similarly, the Opcode extension is always built by default, but you can skip it by setting the Configure variable useopcode=false either in a hint file for from the command line. -You can learn more about each of these extensions by consulting the +If you unpack any additional extensions in the ext/ directory before +running Configure, then Configure will offer to build those additional +extensions as well. Most users probably shouldn't have to do this -- +it is usually easier to build additional extensions later after perl +has been installed. However, if you wish to have those additional +extensions statically linked into the perl binary, then this offers a +convenient way to do that in one step. (It is not necessary, however; +you can build and install extensions just fine even if you don't have +dynamic loading. See lib/ExtUtils/MakeMaker.pm for more details.) + +You can learn more about each of the supplied extensions by consulting the documentation in the individual .pm modules, located under the ext/ subdirectory. @@ -904,7 +917,7 @@ to turn off each extension: SDBM_File (Always included by default) Opcode useopcode Socket d_socket - Threads usethreads + Threads use5005threads attrs (Always included by default) Thus to skip the NDBM_File extension, you can use @@ -1133,8 +1146,9 @@ $ccflags or $optimize, and then re-run =item No sh -If you don't have sh, you'll have to copy the sample file Porting/config_H -to config.h and edit the config.h to reflect your system's peculiarities. +If you don't have sh, you'll have to copy the sample file +Porting/config.sh to config.sh and edit your config.sh to reflect your +system's peculiarities. See Porting/pumpkin.pod for more information. You'll probably also have to extensively modify the extension building mechanism. @@ -1179,7 +1193,7 @@ libgdbm under HP-UX 11. Specific information for the OS/2, Plan9, VMS and Win32 ports is in the corresponding README files and subdirectories. Additional information, including a glossary of all those config.sh variables, is in the Porting -subdirectory. Especially Porting/Glossary should come in handy. +subdirectory. Especially Porting/Glossary should come in handy. Ports for other systems may also be available. You should check out http://www.perl.com/CPAN/ports for current information on ports to @@ -1704,8 +1718,9 @@ searched by version 5.6.0 will be /usr/local/lib/perl5/site_perl/5.005/$archname /usr/local/lib/perl5/site_perl/5.005 + /usr/local/lib/perl5/site_perl/ -Notice the last two entries -- Perl understands the default structure +Notice the last three entries -- Perl understands the default structure of the $sitelib directories and will look back in older, compatible directories. This way, modules installed under 5.005_03 will continue to be usable by 5.005_03 but will also accessible to 5.6.0. Further, @@ -1714,11 +1729,8 @@ present only in 5.6.0. That new module will get installed into /usr/local/lib/perl5/site_perl/5.6.0 and will be available to 5.6.0, but will not interfere with the 5.005_03 version. -Also, by default, 5.6.0 will look in - - /usr/local/lib/perl5/site_perl/ - -for 5.004-era pure perl modules. +The last entry, /usr/local/lib/perl5/site_perl/, is there so that +5.6.0 will look for 5.004-era pure perl modules. Lastly, suppose you now install version 5.6.1, which we'll assume is binary compatible with 5.6.0 and 5.005. The directories searched @@ -1775,15 +1787,15 @@ yet. =head2 Upgrading from 5.005 to 5.6.0 -Extensions built and installed with versions of perl prior to 5.005_50 -will need to be recompiled to be used with 5.005_50 and later. You will, -however, be able to continue using 5.005 even after you install 5.6. -The 5.005 binary will still be able to find the modules built under -5.005; the 5.6.0 binary will look in the new $sitearch and $sitelib -directories, and will not find them. See also your installed copy -of the perllocal.pod file for a (possibly incomplete) list of locally -installed modules. Note that you want perllocal.pod not perllocale.pod -for installed module information. +Most extensions built and installed with versions of perl +prior to 5.005_50 will not need to be recompiled to be used with +5.6.0. If you find you do need to rebuild an extension with 5.6.0, +you may safely do so without disturbing the 5.005 installation. +(See L<"Coexistence with earlier versions of perl5"> above.) + +See your installed copy of the perllocal.pod file for a (possibly +incomplete) list of locally installed modules. Note that you want +perllocal.pod not perllocale.pod for installed module information. =head1 Coexistence with perl4 diff --git a/INTERN.h b/INTERN.h index ee2959c..286cc46 100644 --- a/INTERN.h +++ b/INTERN.h @@ -1,6 +1,6 @@ /* INTERN.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/MANIFEST b/MANIFEST index f6e96a7..ca222c0 100644 --- a/MANIFEST +++ b/MANIFEST @@ -53,7 +53,7 @@ README.vms Notes about VMS port README.vos Notes about Stratus VOS port README.win32 Notes about Win32 port Todo The Wishlist -Todo-5.005 What needs doing before 5.005 release +Todo-5.6 What needs doing before/during the 5.6.x release cycle XSUB.h Include file for extension subroutines apollo/netinet/in.h Apollo DomainOS port: C header file frontend av.c Array value code @@ -364,6 +364,9 @@ ext/SDBM_File/typemap SDBM extension interface types ext/Socket/Makefile.PL Socket extension makefile writer ext/Socket/Socket.pm Socket extension Perl module ext/Socket/Socket.xs Socket extension external subroutines +ext/Sys/Syslog/Makefile.PL Sys::Syslog extension makefile writer +ext/Sys/Syslog/Syslog.pm Sys::Syslog extension Perl module +ext/Sys/Syslog/Syslog.xs Sys::Syslog extension external subroutines ext/Thread/Makefile.PL Thread extension makefile writer ext/Thread/Notes Thread notes ext/Thread/README Thread README @@ -626,10 +629,12 @@ lib/Net/netent.pm By-name interface to Perl's builtin getnet* lib/Net/protoent.pm By-name interface to Perl's builtin getproto* lib/Net/servent.pm By-name interface to Perl's builtin getserv* lib/Pod/Checker.pm Pod-Parser - check POD documents for syntax errors +lib/Pod/Find.pm used by pod/splitpod lib/Pod/Functions.pm used by pod/splitpod lib/Pod/Html.pm Convert POD data to HTML lib/Pod/InputObjects.pm Pod-Parser - define objects for input streams lib/Pod/Man.pm Convert POD data to *roff +lib/Pod/ParseUtils.pm Pod-Parser - pod utility functions lib/Pod/Parser.pm Pod-Parser - define base class for parsing POD lib/Pod/Select.pm Pod-Parser - select portions of POD docs lib/Pod/Text.pm Pod-Parser - convert POD data to formatted ASCII text @@ -642,7 +647,6 @@ lib/SelfLoader.pm Load functions only on demand lib/Shell.pm Make AUTOLOADed system() calls lib/Symbol.pm Symbol table manipulation routines lib/Sys/Hostname.pm Hostname methods -lib/Sys/Syslog.pm Perl module supporting syslogging lib/Term/Cap.pm Perl module supporting termcap usage lib/Term/Complete.pm A command completion subroutine lib/Term/ReadLine.pm Stub readline library @@ -678,7 +682,6 @@ lib/blib.pm For "use blib" lib/byte.pm Pragma to enable byte operations lib/byte_heavy.pl Support routines for byte pragma lib/cacheout.pl Manages output filehandles when you need too many -lib/caller.pm Inherit pragmatic attributes from caller's context lib/charnames.pm Character names lib/chat2.pl Obsolete ipc library (use Comm.pm etc instead) lib/complete.pl A command completion subroutine @@ -1047,6 +1050,7 @@ pod/checkpods.PL Tool to check for common errors in pods pod/perl.pod Top level perl man page pod/perl5004delta.pod Changes from 5.003 to 5.004 pod/perl5005delta.pod Changes from 5.004 to 5.005 +pod/perlapi.pod Perl API documentation (autogenerated) pod/perlapio.pod IO API info pod/perlbook.pod Book info pod/perlbot.pod Object-oriented Bag o' Tricks @@ -1076,6 +1080,7 @@ pod/perlfunc.pod Function info pod/perlguts.pod Internals info pod/perlhack.pod Perl hackers guide pod/perlhist.pod Perl history info +pod/perlintern.pod Perl internal function docs (autogenrated) pod/perlipc.pod IPC info pod/perllexwarn.pod Lexical Warnings info pod/perllocale.pod Locale support info @@ -1103,6 +1108,7 @@ pod/perltodo.pod Todo list explained pod/perltoot.pod Tom's object-oriented tutorial pod/perltootc.pod Tom's object-oriented tutorial (more on class data) pod/perltrap.pod Trap info +pod/perlunicode.pod Unicode support info pod/perlvar.pod Variable info pod/perlxs.pod XS api info pod/perlxstut.pod XS tutorial @@ -1311,6 +1317,7 @@ t/op/do.t See if subroutines work t/op/each.t See if hash iterators work t/op/eval.t See if eval operator works t/op/exec.t See if exec and system work +t/op/exists_sub.t See if exists(&sub) works t/op/exp.t See if math functions work t/op/fh.t See if filehandles work t/op/filetest.t See if file tests work @@ -1381,6 +1388,7 @@ t/op/undef.t See if undef works t/op/universal.t See if UNIVERSAL class works t/op/unshift.t See if unshift works t/op/vec.t See if vectors work +t/op/ver.t See if version tuples work t/op/wantarray.t See if wantarray works t/op/write.t See if write works t/pod/emptycmd.t Test empty pod directives @@ -1415,6 +1423,7 @@ t/pod/testcmp.pl Module to compare output against expected results t/pod/testp2pt.pl Module to test Pod::PlainText for a given file t/pod/testpchk.pl Module to test Pod::Checker for a given file t/pragma/constant.t See if compile-time constants work +t/pragma/diagnostics.t See if diagnostics.pm works t/pragma/locale.t See if locale support works t/pragma/locale/latin1 Part of locale.t in Latin 1 t/pragma/locale/utf8 Part of locale.t in UTF8 @@ -1519,8 +1528,10 @@ vms/vmsish.h VMS-specific C header for Perl core vms/writemain.pl Generate perlmain.c from miniperlmain.c+extensions vos/Changes Changes made to port Perl to the VOS operating system vos/build.cm VOS command macro to build Perl -vos/compile_perl.cm VOS commnad macro to build multiple version of Perl +vos/compile_perl.cm VOS command macro to build multiple version of Perl +vos/config.def input for config.pl vos/config.h config.h for VOS +vos/config.pl script to convert a config_h.SH to a config.h vos/config_h.SH_orig config_h.SH at the time config.h was created vos/perl.bind VOS bind control file vos/test_vos_dummies.c Test program for "vos_dummies.c" @@ -1529,6 +1540,7 @@ vos/vosish.h VOS-specific header file warnings.h The warning numbers warnings.pl Program to write warnings.h and lib/warnings.pm win32/Makefile Win32 makefile for NMAKE (Visual C++ build) +win32/bin/exetype.pl Set executable type to CONSOLE or WINDOWS win32/bin/perlglob.pl Win32 globbing win32/bin/pl2bat.pl wrap perl scripts into batch files win32/bin/runperl.pl run perl script via batch file namesake diff --git a/Makefile.SH b/Makefile.SH index 347ee7e..c3e5c85 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -30,7 +30,12 @@ case "$useshrplib" in true) # Prefix all runs of 'miniperl' and 'perl' with # $ldlibpth so that ./perl finds *this* shared libperl. - ldlibpth="LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH" + case "$LD_LIBRARY_PATH" in + '') + ldlibpth="LD_LIBRARY_PATH=`pwd`";; + *) + ldlibpth="LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}";; + esac pldlflags="$cccdlflags" case "${osname}${osvers}" in @@ -78,6 +83,8 @@ true) eval "ldlibpth=\"$ldlibpthname=`pwd`:\$$ldlibpthname\"" ;; esac + # Strip off any trailing :'s + ldlibpth=`echo $ldlibpth | sed 's/:*$//'` ;; esac ;; @@ -228,7 +235,7 @@ addedbyconf = UU $(shextract) $(plextract) pstruct h1 = EXTERN.h INTERN.h XSUB.h av.h config.h cop.h cv.h dosish.h h2 = embed.h form.h gv.h handy.h hv.h keywords.h mg.h op.h -h3 = opcode.h patchlevel.h perl.h perly.h pp.h proto.h regcomp.h +h3 = opcode.h patchlevel.h perl.h perlapi.h perly.h pp.h proto.h regcomp.h h4 = regexp.h scope.h sv.h unixish.h util.h iperlsys.h thread.h h5 = utf8.h warnings.h h = $(h1) $(h2) $(h3) $(h4) $(h5) @@ -236,13 +243,13 @@ h = $(h1) $(h2) $(h3) $(h4) $(h5) c1 = $(mallocsrc) av.c scope.c op.c doop.c doio.c dump.c hv.c mg.c c2 = perl.c perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c utf8.c c3 = gv.c sv.c taint.c toke.c util.c deb.c run.c universal.c xsutils.c -c4 = globals.c perlio.c +c4 = globals.c perlio.c perlapi.c c = $(c1) $(c2) $(c3) $(c4) miniperlmain.c perlmain.c obj1 = $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) op$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) obj2 = hv$(OBJ_EXT) av$(OBJ_EXT) run$(OBJ_EXT) pp_hot$(OBJ_EXT) sv$(OBJ_EXT) pp$(OBJ_EXT) scope$(OBJ_EXT) pp_ctl$(OBJ_EXT) pp_sys$(OBJ_EXT) -obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) xsutils$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) +obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) xsutils$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) obj = $(obj1) $(obj2) $(obj3) $(ARCHOBJS) @@ -287,7 +294,10 @@ FORCE: @sh -c true opmini$(OBJ_EXT): op.c - $(CCCMD) $(PLDLFLAGS) -DPERL_EXTERNAL_GLOB -o opmini$(OBJ_EXT) op.c + $(RMS) opmini.c + $(LNS) op.c opmini.c + $(CCCMD) $(PLDLFLAGS) -DPERL_EXTERNAL_GLOB opmini.c + $(RMS) opmini.c miniperlmain$(OBJ_EXT): miniperlmain.c $(CCCMD) $(PLDLFLAGS) $*.c @@ -551,7 +561,7 @@ install.html: all installhtml run_byacc: FORCE $(BYACC) -d perly.y - chmod 664 perly.c + -chmod 664 perly.c sh $(shellflags) ./perly.fixer y.tab.c perly.c sed -e 's/fprintf *( *stderr *,/PerlIO_printf(Perl_debug_log,/g' \ -e 's/y\.tab/perly/g' perly.c >perly.tmp && mv perly.tmp perly.c diff --git a/Policy_sh.SH b/Policy_sh.SH index cb8536c..b953046 100644 --- a/Policy_sh.SH +++ b/Policy_sh.SH @@ -134,11 +134,11 @@ do ;; sitelib) case "$siteprefix" in - *perl*) dflt=$prefix/lib/site_perl ;; - *) dflt=$prefix/lib/$package/site_perl ;; + *perl*) dflt=$prefix/lib/site_perl/$version ;; + *) dflt=$prefix/lib/$package/site_perl/$version ;; esac ;; - sitearch) dflt="$sitelib/$apiversion/$archname" ;; + sitearch) dflt="$sitelib/$archname" ;; siteman1dir) dflt="$siteprefix/man/man1" ;; siteman3dir) dflt="$siteprefix/man/man3" ;; @@ -166,11 +166,11 @@ do ;; vendorlib) case "$vendorprefix" in - *perl*) dflt=$prefix/lib/vendor_perl ;; - *) dflt=$prefix/lib/$package/vendor_perl ;; + *perl*) dflt=$prefix/lib/vendor_perl/$version ;; + *) dflt=$prefix/lib/$package/vendor_perl/$version ;; esac ;; - vendorarch) dflt="$vendorlib/$apiversion/$archname" ;; + vendorarch) dflt="$vendorlib/$archname" ;; vendorman1dir) dflt="$vendorprefix/man/man1" ;; vendorman3dir) dflt="$vendorprefix/man/man3" ;; diff --git a/Porting/Glossary b/Porting/Glossary index bde26b7..17b408d 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -942,6 +942,10 @@ d_nice (d_nice.U): This variable conditionally defines the HAS_NICE symbol, which indicates to the C program that the nice() routine is available. +d_nv_preserves_uv (perlxv.U): + This variable indicates whether a variable of type nvtype + can preserve all the bits a variable of type uvtype. + d_off64_t (io64.U): This symbol will be defined if the C compiler supports off64_t. @@ -2121,12 +2125,18 @@ ignore_versioned_solibs (libs.U): inc_version_list (inc_version_list.U): This variable specifies the list of subdirectories in over which perl.c:incpush() and lib/lib.pm will automatically - search when adding directories to @INC. This is only useful + search when adding directories to @INC. The elements in + the list are separated by spaces. This is only useful if you have a perl library directory tree structured like the default one. See INSTALL for how this works. The versioned site_perl directory was introduced in 5.005, so that is the lowest possible value. +inc_version_list_init (inc_version_list.U): + This variable holds the same list as inc_version_list, but + each item is enclosed in double quotes and separated by commas, + suitable for use in the PERL_INC_VERSION_LIST initialization. + incpath (usrinc.U): This variable must preceed the normal include path to get hte right one, as in "$incpath/usr/include" or "$incpath/usr/lib". diff --git a/Porting/config.sh b/Porting/config.sh index eebf57f..c91d1d1 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -8,7 +8,7 @@ # Package name : perl5 # Source directory : . -# Configuration time: Sun Jan 16 21:10:53 EET 2000 +# Configuration time: Wed Jan 26 09:55:17 EET 2000 # Configured by : jhi # Target system : osf1 alpha.hut.fi v4.0 878 alpha @@ -31,9 +31,9 @@ alignbytes='8' ansi2knr='' aphostname='' api_revision='5' -api_subversion='640' +api_subversion='0' api_version='5' -api_versionstring='5.5.640' +api_versionstring='5.005' ar='ar' archlib='/opt/perl/lib/5.5.640/alpha-dec_osf-thread-multi' archlibexp='/opt/perl/lib/5.5.640/alpha-dec_osf-thread-multi' @@ -56,10 +56,10 @@ cc='cc' cccdlflags=' ' ccdlflags=' -Wl,-rpath,/opt/perl/lib/5.5.640/alpha-dec_osf-thread-multi/CORE' ccflags='-pthread -std -DLANGUAGE_C' -ccsymbols='__LANGUAGE_C__=1 _LONGLONG=1 LANGUAGE_C=1 SYSTYPE_BSD=1' +ccsymbols='__alpha=1 __LANGUAGE_C__=1 __osf__=1 __unix__=1 _LONGLONG=1 _SYSTYPE_BSD=1 SYSTYPE_BSD=1' cf_by='jhi' cf_email='yourname@yourhost.yourplace.com' -cf_time='Sun Jan 16 21:10:53 EET 2000' +cf_time='Wed Jan 26 09:55:17 EET 2000' charsize='1' chgrp='' chmod='' @@ -72,7 +72,7 @@ cp='cp' cpio='' cpp='cpp' cpp_stuff='42' -cppccsymbols='__alpha=1 __osf__=1 __unix__=1 _SYSTYPE_BSD=1 unix=1' +cppccsymbols='LANGUAGE_C=1 unix=1' cppflags='-pthread -std -DLANGUAGE_C' cpplast='' cppminus='' @@ -229,6 +229,7 @@ d_msgrcv='define' d_msgsnd='define' d_mymalloc='undef' d_nice='define' +d_nv_preserves_uv='undef' d_off64_t='undef' d_old_pthread_create_joinable='undef' d_oldpthreads='undef' @@ -483,6 +484,7 @@ i_varhdr='stdarg.h' i_vfork='undef' ignore_versioned_solibs='' inc_version_list=' ' +inc_version_list_init='""' incpath='' inews='' installarchlib='/opt/perl/lib/5.5.640/alpha-dec_osf-thread-multi' @@ -760,7 +762,7 @@ PERL_VERSION=5 PERL_SUBVERSION=640 PERL_API_REVISION=5 PERL_API_VERSION=5 -PERL_API_SUBVERSION=640 +PERL_API_SUBVERSION=0 CONFIGDOTSH=true # Variables propagated from previous config.sh file. pp_sys_cflags='ccflags="$ccflags -DNO_EFF_ONLY_OK"' diff --git a/Porting/config_H b/Porting/config_H index 94007e9..03aafe7 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -17,7 +17,7 @@ /* * Package name : perl5 * Source directory : . - * Configuration time: Sun Jan 16 21:10:53 EET 2000 + * Configuration time: Wed Jan 26 09:55:17 EET 2000 * Configured by : jhi * Target system : osf1 alpha.hut.fi v4.0 878 alpha */ @@ -1212,9 +1212,14 @@ * available directly to the user. Note that it may well be different from * the preprocessor used to compile the C program. */ +/* CPPLAST: + * This symbol is intended to be used along with CPPRUN in the same manner + * symbol CPPMINUS is used with CPPSTDIN. It contains either "-" or "". + */ #define CPPSTDIN "cppstdin" #define CPPMINUS "" #define CPPRUN "/usr/bin/cpp" +#define CPPLAST "" /* HAS_ACCESS: * This manifest constant lets the C program know that the access() @@ -1406,6 +1411,11 @@ * so that it is safe even if used by a process with super-user * privileges. */ +/* HAS_PHOSTNAME: + * This symbol, if defined, indicates that the C program may use the + * contents of PHOSTNAME as a command to feed to the popen() routine + * to derive the host name. + */ #define HAS_GETHOSTNAME /**/ #define HAS_UNAME /**/ #undef HAS_PHOSTNAME @@ -1533,6 +1543,9 @@ * the GNU C library is being used. */ /*#define HAS_GNULIBC / **/ +#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE) +# define _GNU_SOURCE +#endif /* HAS_HASMNTOPT: * This symbol, if defined, indicates that the hasmntopt routine is * available to query the mount options of file systems. @@ -2309,7 +2322,7 @@ * for a C initialization string. See the inc_version_list entry * in Porting/Glossary for more details. */ -#define PERL_INC_VERSION_LIST /**/ +#define PERL_INC_VERSION_LIST "" /**/ /* HAS_OFF64_T: * This symbol will be defined if the C compiler supports off64_t. @@ -2480,6 +2493,10 @@ /* U64SIZE: * This symbol contains the sizeof(U64). */ +/* NV_PRESERVES_UV: + * This symbol, if defined, indicates that a variable of type NVTYPE + * can preserve all the bit of a variable of type UVSIZE. + */ #define IVTYPE long /**/ #define UVTYPE unsigned long /**/ #define I8TYPE char /**/ @@ -2505,6 +2522,7 @@ #define I64SIZE 8 /**/ #define U64SIZE 8 /**/ #endif +#undef NV_PRESERVES_UV /* IVdf: * This symbol defines the format string used for printing a Perl IV @@ -2751,6 +2769,10 @@ /*#define USE_LONG_LONG / **/ #endif +/* USE_MORE_BITS: + * This symbol, if defined, indicates that 64-bit interfaces and + * long doubles should be used when available. + */ #ifndef USE_MORE_BITS /*#define USE_MORE_BITS / **/ #endif diff --git a/Porting/makerel b/Porting/makerel index f51b4a5..2052fc8 100644 --- a/Porting/makerel +++ b/Porting/makerel @@ -22,17 +22,12 @@ my @patchlevel_h = ; close PATCHLEVEL; my $patchlevel_h = join "", grep { /^#\s*define/ } @patchlevel_h; print $patchlevel_h; +$revision = $1 if $patchlevel_h =~ /PERL_REVISION\s+(\d+)/; $patchlevel = $1 if $patchlevel_h =~ /PERL_VERSION\s+(\d+)/; $subversion = $1 if $patchlevel_h =~ /PERL_SUBVERSION\s+(\d+)/; die "Unable to parse patchlevel.h" unless $subversion >= 0; -$vers = sprintf("5.%03d", $patchlevel); -$vms_vers = sprintf("5_%03d", $patchlevel); -if ($subversion) { - $vers.= sprintf( "_%02d", $subversion); - $vms_vers.= sprintf( "%02d", $subversion); -} else { - $vms_vers.= " "; -} +$vers = sprintf("%d.%d.%d", $revision, $patchlevel, $subversion); +$vms_vers = sprintf("%d_%d_%d", $revision, $patchlevel, $subversion); # fetch list of local patches my (@local_patches, @lpatch_tags, $lpatch_tags); diff --git a/Porting/p4desc b/Porting/p4desc index b6b412d..0bf79da 100755 --- a/Porting/p4desc +++ b/Porting/p4desc @@ -65,7 +65,7 @@ my $cur = m|^Affected files| ... m|^Differences|; # while we are within range if ($cur) { - if (m|^\.\.\. (//depot/.+?#\d+) add$|) { + if (m{^\.\.\. (//depot/.+?#\d+) (add|branch)$}) { my $newfile = $1; push @addfiles, $newfile; warn "$newfile add, revision != 1!\n" unless $newfile =~ /#1$/; @@ -90,9 +90,9 @@ sub newfiles { my $addfile; my $ret = ""; for $addfile (@addfiles) { - my $type = `p4 -p $p4port files $addfile`; + my $type = `p4 -p $p4port files '$addfile'`; if ($?) { - warn "$0: `p4 -p $p4port print $addfile` failed, status[$?]\n"; + warn "$0: `p4 -p $p4port print '$addfile'` failed, status[$?]\n"; next; } $type =~ m|^//.*\((.+)\)$| or next; @@ -101,9 +101,9 @@ sub newfiles { $ret .= "\n==== $addfile ($type) ====\n\n"; next; } - my @new = `p4 -p $p4port print $addfile`; + my @new = `p4 -p $p4port print '$addfile'`; if ($?) { - die "$0: `p4 -p $p4port print $addfile` failed, status[$?]\n"; + die "$0: `p4 -p $p4port print '$addfile'` failed, status[$?]\n"; } my $desc = shift @new; # discard initial description $ret .= "\n==== $addfile ($type) ====\n\n"; @@ -111,6 +111,7 @@ sub newfiles { $lines = "" if @new < 2; $ret .= "\@\@ -0,0 +1$lines \@\@\n"; $ret .= join("+","",@new); + $ret .= "\n\\ No newline at end of file\n" if $ret !~ /\n$/; } @addfiles = (); return $ret; diff --git a/README b/README index 7b294f2..0925b98 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ Perl Kit, Version 5.0 - Copyright 1989-1999, Larry Wall + Copyright 1989-2000, Larry Wall All rights reserved. This program is free software; you can redistribute it and/or modify diff --git a/README.cygwin b/README.cygwin index fb93ac5..ab60a58 100644 --- a/README.cygwin +++ b/README.cygwin @@ -4,502 +4,587 @@ specially designed to be readable as is. =head1 NAME -README.cygwin - notes about porting Perl to Cygwin +README.cygwin - Perl for Cygwin =head1 SYNOPSIS -=over +This document will help you configure, make, test and install Perl +on Cygwin. This document also describes features of Cygwin that will +affect how Perl behaves at runtime. -=item Cygwin +B There are pre-built Perl packages available for Cygwin and a +version of Perl is provided on the Cygwin CD. If you have no need to +customize the configuration, consider using one of these packages: -The Cygwin tools are ports of the popular GNU development tools for -Windows NT, 95, and 98. They run thanks to the Cygwin library which -provides the UNIX system calls and environment these programs expect. -More info about this project can be found at its home page -http://sourceware.cygnus.com/cygwin/ + http://cygutils.netpedia.net/ -=item libperl.dll +=head1 PREREQUISITES -These instructions and the default cygwin hints build a shared -libperl.dll Perl library and enables dynamically loaded extensions. +=head2 Cygwin = GNU+Cygnus+Windows (Don't leave UNIX without it) -=back +The Cygwin tools are ports of the popular GNU development tools for Win32 +platforms. They run thanks to the Cygwin library which provides the UNIX +system calls and environment these programs expect. More information +about this project can be found at: -=head1 BUILDING - -=head2 Prerequisites - -=over - -=item Cygwin b20.1 - -The latest stable Cygwin suite is beta20.1. It may be -downloaded from ftp://go.cygnus.com/pub/sourceware.cygnus.com/cygwin/latest/ -or many mirror sites around the world. - -=item egcs-1.1.2 - -This port was built with egcs-1.1.2 downloaded from -ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin/egcs-1.1.2/ - -=item install executable - -To make life easier, you should download -ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/porters/Humblet_Pierre_A/install-cygwin-b20.sh, -and use it as your install "executable." Just follow the instructions -that are embedded as comments in the .sh file. - -=item Windows NT notes - -You should execute a 'chmod -R +w *' on the entire perl source directory. -The configuration process creates new files (and thus needs write access -to the directory) and sometimes, especially if you make repeated builds -in the same directory, overwrites old files. If you do not enable write -access, you're just asking for trouble. Reminder for B20.1: unless 'ntea' -is included in the CYGWIN environment variable settings, chmod has no -effect. See "environment," below. - -It is best if you build, test, and install as a normal user, not as -Administrator or as any member of the Administrators group. There is -a well-known NT-ism that affects Cygwin: all files that are created -by any member of the Administrators B are B owned by -that member. The ownership of those files is assigned to the -Administrators group, instead. If the default access mode for new files -is -rw-r--r--, then the original creator of the file cannot overwrite -it: he no longer owns the file, no B does. It is owned by the -group, but group members don't have write access to it. This causes -any number of problems, including make test / perl harness failures, -installation failures, etc. - -In some cases, however, it is necessary to install as Administrator. For -instance, if normal users are not allowed write access to the install -directory. My solution, in this case, was to transfer ownership of the -install directory tree (/usr/local) to a single, normal user, and -set permissions to -rw-r--r-- (drwxr-xr-x for directories, of course). -If you read the preceeding paragraph carefully, you might suspect that -changing the permissions on the entire tree to -rw-rw-r--, but allowing -the Administrators group to keep ownership should solve the problem. -However, newly created directories (and the perl install creates a lot -of them) will not allow group write access. Setting umask will not -fix this problem, because umask is a B operator; it only -specifies the types of accesses that will NOT be allowed on new files. -For instance, umask u=rwx,g=rwx,o=rx means that world ('Bthers') will -never be allowed write access, but owner ('Bser') and Broup B -be allowed write access. Everybody (u, g, and o) Bbe allowed -read access. - -In any case, Corinna Vinschen's ntsec patches B eventually -alleviate this whole mess, and are included in the development -snapshots as of 24 May 1999. You will need to include 'ntsec' as -one of the items in the CYGWIN variable setting. However, initial -tests indicate some incompatibility the 0524 snapshot and this perl -build. - -=item environment - -I (csw) found the following steps necessary for a successful build: - -=over - -=item path - -I set my path so that none of the windows directories showed up - -otherwise Configure found the wrong executables (find, grep, etc). -It is, however, important that '.' be in the path, because otherwise -the build process can't execute the ld2 script that is created. - -=item mounts - -I had to unmount my f: drive. I have cygwin installed under -F:\cygnus\cygwin-b20\, which is mounted as \. I also ordinarily -have F:\ mounted as /f (i.e. mounted onto the empty directory -F:\cygnus\cygwin-b20\f\ ). However, this causes Configure to -"locate" the awk, tr, sed, etc. programs at -/f/cygnus/cygwin-b20/usr/bin instead of /usr/bin. -This ended up causing problems. - -I built and tested perl using all binary mounts. However, Eric Fifer -has built and tested it using text mounts, but reported more failures -during make test and perl harness. Based on his findings, and experiments -performed by Sebastien Barre with the static build of perl, I can -report that these test failures are B due to any differences in -the perl executable. Most of the failures encountered during a make test -on text mounts can be eliminated by remounting as binary, and re-running -the tests using the same executable. These test failures are due to -problems in the test scripts, not the executable. See Appendix. - -One observation from experience with the static build of perl is that -it's a bad idea to a mix a perl executable that was compiled using binary -mounts with modules compiled using text mounts, and vice versa. Make -sure your mount environment matches. This observation has not been -confirmed with respect to the dynamically linked build of perl. - -=item environment variables - -For NT users, the CYGWIN variable should include the 'ntea' setting. -However, if you have FAT drives on your system, as opposed to NTFS, -please read the Cygwin FAQ concerning ntea before including it in -your system settings. If you do not use ntea, you will encounter a -few extra make test and/or perl harness failures. These are not -indicative of a faulty perl executable, but only that your system -settings do not allow the types of file access and ownership checking -that the test scripts are attempting to verify. See Appendix. - -I unset INCLUDE and LIB (these two variables are set by MSVC5, and -inherited from my Windows environment by cygwin). I'm not sure this made -a difference, but it has caused problems in the past... + http://sourceware.cygnus.com/cygwin/ -=back +A recent net or commercial release of Cygwin is required. -=item crypt library +At the time this document was written, the port required recent +development snapshots that were expected to stabilize early in 2000 and +be released to the net as B21 and commercially as v1.1. -http://miracle.geol.msu.ru/sos/ points to two different crypt -libraries ported to cygwin. This has been tested with the libcrypt.tgz -by Andy Piper. His home page can be found at -http://www.xemacs.freeserve.co.uk/ +B At this point, minimal effort has been made to provide +compatibility with old (beta) Cygwin releases. The focus has been to +provide a high quality release and not worry about working around old +Cygwin bugs. If you wish to use Perl with Cygwin B20.1 or earlier, +consider using either perl5.005_03 or perl5.005_62, which are available +in source and binary form at C or on the +Cygwin CD. If there is significant demand, a patch kit can be developed +to port back to earlier Cygwin versions. -=item hacks that should be revisited after the next cygwin release +=head2 Compiler -Some of the failures we encountered when running make test and/or perl harness -are due to bugs in the cygwin b20.1 distribution. We sometimes found it -necessary to use dirty little hacks to persuade make test and perl harness -to play nicely. Since cygwin is in active development, many of these hacks -may not be necessary in the future. These include: +A recent net or commercial release of I is required. -=over +At the time this document was written, I was current and +could be downloaded from: -=item fix for pragma/locale + ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin/gcc-2.95.2/ -the line '#undef MB_CUR_MAX' was added to ex/POSIX/POSIX.xs. This fixes -a failure in the pragma/locale.t test, which before this fix resulted in a -coredump. It appears that MB_CUR_MAX is #defined __mb_cur_max, and __mb_cur_max -is declared 'extern' in Cygwin b20.1's stdlib.c, but is never defined. Thus, -the error. +=head2 Cygwin Configuration -=item fix for lib/io_sock +While building Perl some changes may be necessary to your Cygwin setup so +that Perl builds cleanly. These changes are B required for normal +Perl usage. -there is a rather extensive patch to t/lib/io_sock.t which works around -a failure related to fork() in the cygwin environment. Cygwin b20.1 does not -properly remap manually loaded DLLs in the child after a fork. +B The binaries that are built will run on all Win32 versions. +They do not depend on your host system (Win9x, WinNT) or your Cygwin +configuration (I, I, binary/text mounts). The only +dependencies come from hardcoded pathnames like C. However, +your host system and Cygwin configuration will affect Perl's runtime +behavior (see L). Some regression tests may fail in different +ways depending on your setup. For now, the test suite does not skip +tests that do not make sense given a particular setup. If a test can +pass in some Cygwin setup, it is left in and explainable test failures +are documented. -=item fix for lib/filehand +=over 4 -during the make test/perl harness steps, a win32 popup complains about -a "perl.exe Application Error - illegal memory access." This is due to to -a test in t/lib/filehand.t, and is related to the fork + dll problem. +=item * C -=item fix for environ +Set the C environment variable so that Configure finds the Cygwin +versions of programs. Any Windows directories should be removed or +moved to the end of your C. -there are a number of changes to miniperlmain.c, util.c, and mg.c that -are there to work around a Cygwin problem relating to environ. +=item * F -=item fix for lib/posix +There should be an instance of I in F (or F). +Configure tests C<#!/bin/cat> and if it is not found, you will see +the error: -the following line was added to t/lib/posix.t to work around a Cygwin bug. + Configure: ./try: No such file or directory -=begin text +=item * F -kill 'CONT', $$ if($^O =~ /cygwin/); # XXX: Cygwin bug INT signal gets stuck +If you do not have a F directory, Configure will B prompt +you to install I into F. -=end text +=item * I -=back +If you do not have I (which is part of the I package), +Configure will B prompt you to install man pages. + +=item * Permissions + +On WinNT with either the I or I C settings, directory +and file permissions may not be set correctly. Since the build process +creates files and directories, to be safe you may want to run a `C' on the entire Perl source tree. + +Also, it is a well known WinNT "feature" that files created by a login +that is a member of the I group will be owned by the +I group. Depending on your umask, you may find that you +can not write to files that you just created (because you are no longer +the owner). When using the I C setting, this is not an +issue because it "corrects" the ownership to what you would expect on +a UNIX system. =back -=head2 Configure +=head1 CONFIGURE -Check hints/cygwin.sh for any system specific settings. In -particular change libpth to point to the correct location of -...../i586-cygwin32/lib. +The default options gathered by Configure with the assistance of +F will build a Perl that supports dynamic loading +(which requires a shared F). -run "sh Configure". +This will run Configure and keep a record: -When confronted with this prompt: + ./Configure 2>&1 | tee log.configure -=begin text +If you are willing to accept all the defaults add a B<-d> option. +However, several useful customizations are available. - First time through, eh? I have some defaults handy for the - following systems: - . - . - . - Which of these apply, if any? +=head2 Strip Binaries -=end text +It is possible to strip the EXEs and DLLs created by the build process. +The resulting binaries will be significantly smaller. If you want the +binaries to be stripped, you can either add a B<-s> option when Configure +prompts you, -select "cygwin". + Any additional ld flags (NOT including libraries)? [none] -s + Any special flags to pass to gcc to use dynamic loading? [none] -s + Any special flags to pass to ld2 to create a dynamically loaded library? + [none] -s -Do not use the malloc that comes with perl--using the perl malloc -collides with some cygwin startup routines. +or you can edit F and uncomment the relevant variables +near the end of the file. -=head2 make +=head2 Optional Libraries -Run "make". If you're really feeling adventurous, type -"make 2>&1 | tee make-log.txt". +Several Perl functions and modules depend on the existence of +some optional libraries. Configure will find them if they are +installed in one of the directories listed as being used for library +searches. Pre-built packages for most of these are available at +C. -=over +=over 4 -=item ld2 +=item * C<-lcrypt> -The make script will install ld2 into your $installbin directory (i.e. -wherever you said to put the perl.exe) during the *make* process. It -does not wait until the *make install* process to install the ld2 script. -This is because the remainder of the make refers to ld2 without fully -specifying its path, and does this from multiple subdirectories (so ./ld2 -won't work.) The assumption here is that $installbin is in your current -$PATH. If this is not the case, or if you do not have an install -executable, the make will fail at some point. Don't panic. Just manually -copy ld2 from the source directory to someplace in your path. +The crypt libraries in GNU libc have been ported to Cygwin. -This cannot be done prior to make, because ld2 is created during the -make process. +The DES based Ultra Fast Crypt port was done by Alexey Truhan -=back + http://dome.weeg.uiowa.edu/pub/domestic/sos/cw32crypt-dist-0.tgz + +NOTE: There are various export restrictions on DES implementations, +see the glibc README for more details. -=head2 make test +The MD5 port was done by Andy Piper: -Run "make test" to see how stable your system is. I (csw) got the -following errors/warnings: + http://dome.weeg.uiowa.edu/pub/domestic/sos/libcrypt.tgz -=over +More information can also be found at: -=item op/taint + http://miracle.geol.msu.ru/sos/ -Got two "missing cygwin1.dll" warning popups. This is because -op/taint wants cygwin1.dll to be somewhere in the system path -(\WINDOWS\SYSTEM, etc) or in the build directory. Can be ignored. +=item * C<-lgdbm> (C) -=item lib/filehand +GDBM is available for Cygwin. GDBM's ndbm/dbm compatibility feature +also makes C and C possible (although they add +little extra value). -Got an "Application Error - memory could not be read" popup. While -this looks alarming, it can be ignored - just click OK. It is -because Cygwin B20.1 doesn't properly remap manually loaded DLLs -in the child after a fork. +=item * C<-ldb> (C) -=item lib/io_sock +BerkeleyDB is available for Cygwin. Some details can be found in +F. -Got an "Application Error - memory could not be read" popup. Again, -just click OK and ignore it. +=item * C<-lcygipc> (C) + +A port of SysV IPC is available for Cygwin: + + http://www.multione.capgemini.fr/tools/pack_ipc/ + +The 1.3 release does not include ftok(), but code for ftok() can be +borrowed from glibc. =back -=head2 perl harness +=head2 Configure-time Options + +The F document describes several Configure-time options. +Some of these will work with Cygwin, others are not yet possible. Also, +some of these are experimental. + +=over 4 + +=item * C<-Uusedl> + +If you want to force Perl to be compiled statically, you can either +choose this when Configure prompts you or you can use the Configure +command line option. + +=item * C<-Uusemymalloc> -Once you've run make test, then cd into the t/ subdirectory and -execute './perl harness'. I (csw) got the following results: +By default Perl uses the malloc() included with the Perl source. If you +want to force Perl to build with the system malloc(), you can either +choose this when Configure prompts you or you can use the Configure +command line option. -=over +=item * C<-Dusemultiplicty> -=item op/taint +Multiplicity is required when embedding Perl in a C program and using +more than one interpreter instance. This works with the Cygwin port. -Got four "missing cygwin1.dll" warning popups. Click OK and -ignore. +=item * C<-Duseperlio> -=item lib/filehand +The PerlIO abstraction works with the Cygwin port. -Got an "Application Error - memory could not be read" popup. Again, -click OK and ignore. +=item * C<-Duse64bits -Duselonglong> -=item lib/io_sock +I supports 64-bit integers. However, several additional long long +functions are necessary to use them within Perl (I<{atol,strtoul}l>). +These are B yet available with Cygwin. -Got an "Application Error - memory could not be read" popup. Again, -clock OK and ignore. +=item * C<-Duselongdouble> -=item final results +I supports long doubles (12 bytes). However, several additional +long double math functions are necessary to use them within Perl +(I<{sqrt,pow,atan2,exp,fmod,log,cos,frexp,sin,floor,modf,atof}l>). +These are B yet available with Cygwin. -After the ./perl harness, I got the following results summary. +=item * C<-Dusethreads> - Failed Test Status Wstat Total Fail Failed List of failed - ------------------------------------------------------------------------------- - op/taint.t 149 3 2.01% 1, 3, 31 - 9 tests skipped, plus 35 subtests skipped. - Failed 1/190 test scripts, 99.47% okay. 3/6452 subtests failed, 99.95% okay. +POSIX threads are B yet implemented in Cygwin. + +=item * C<-Duselargefiles> + +Although Win32 supports large files, Cygwin currently uses 32-bit ints +for internal size and positional calculations. =back -=head2 make install +=head2 Suspicious Warnings -Finally, run "make install". In my case, the install process was unable -to copy the files from /pod/* to /usr/local/lib/perl5/5.00503/pod/. -I (csw) just copied them by hand after the install finished. I believe -this is because I'm using Sergey Okhapkin's coolview version of the -cygwin1.dll, which provides case sensitivity. The directory is created -as "/usr/local/lib/perl5/5.00503/Pod" but the copy is done into -"/usr/local/lib/perl5/5.00503/pod". This fails -- but probably won't -fail if you're using the default cygwin1.dll. +You may see some messages during Configure that seem suspicious. -=head1 BUGS +=over 4 -A lot of warnings about incompatible pointer types and comparison -lacking a cast. This is because of __declspec(dllimport). +=item * Whoa There -Upon each start, make warns that a rule for perlmain.o is overrided. -Yes, it is. In order to use libperl.dll, perlmain needs to import -symbols from there. According to alex smishlajev, there seems to be -no better solution than adding an explicit define to the rule. +Cygwin does not yet implement chroot(), setegid() or seteuid() +functionality, but has stub functions that return C. You will +see a message when Configure detects that its guess conflicts with the +hint file. -make clean does not remove library .def and .exe.core files. + *** WHOA THERE!!! *** + The recommended value for $d_chroot on this machine was "undef"! + Keep the recommended value? [y] -ld2 script is installed with reference to source directory. You should -change this to /usr/local/bin (or whatever) after install. +You should keep the recommended value. -.bat wrappers for installed utility scripts are not made during installation. +=item * Checking how std your stdio is... -=head1 AUTHOR +Configure reports: -alexander smishlajev + Your stdio doesn't appear very std. -=head1 DISCLAIMER +This is correct. -I (alex) am not going to maintain this document or this port. I only wanted -to make perl porting a bit easier. If failed, I can't be helpful for you. -Contact one of the others listed in the history section. +=head1 MAKE -=head1 HISTORY +Simply run make and wait: + + make 2>&1 | tee log.make + +=head2 Warnings + +Warnings like these are normal: + + warning: overriding commands for target + warning: ignoring old commands for target + + Warning: no export definition file provided + dllwrap will create one, but may not be what you want + +=head2 ld2 + +During `C', I will be created and installed in your $installbin +directory (where you said to put public executables). It does not +wait until the `C' process to install the I script, +this is because the remainder of the `C' refers to I without +fully specifying its path and does this from multiple subdirectories. +The assumption is that $installbin is in your current C. If this +is not the case or if you do not have an I program, `C' +will fail at some point. If this happens, just manually copy I +from the source directory to someplace in your C. + +=head1 TEST + +There are two steps to running the test suite: + + make test 2>&1 | tee log.make-test + + cd t;./perl harness 2>&1 | tee ../log.harness + +The same tests are run both times, but more information is provided when +running as `C<./perl harness>'. -=over +Test results vary depending on your host system and your Cygwin +configuration. It is possible that Cygwin will pass all the tests, but it +is more likely that some tests will fail for one of the the reasons below. -=item Release 1.4.1: 28-May-1999 +=head2 File Permissions -Charles Wilson - cwilson@ece.gatech.edu +UNIX file permissions are based on sets of mode bits for +{read,write,execute} for each {user,group,other}. By default Cygwin only +tracks the Win32 readonly attribute represented as the UNIX file user +write bit (files are always readable, files are executable if they have +a F<.{com,bat,exe}> extension or begin with C<#!>, directories are always +readable and executable). On WinNT with the I C setting, +the remaining mode bits are stored as extended attributes. On WinNT +with the I C setting, permissions use the standard WinNT +security descriptors and access control lists. Without one of these +options, these tests will fail: - Configure minor fix for spaces in $PATH - documentation updates + Failed Test List of failed + ------------------------------------ + io/fs.t 5, 7, 9-10 + lib/anydbm.t 2 + lib/db-btree.t 20 + lib/db-hash.t 16 + lib/db-recno.t 18 + lib/gdbm.t 2 + lib/glob-basic.t 9 (directory always readable) + lib/ndbm.t 2 + lib/odbm.t 2 + lib/sdbm.t 2 + op/stat.t 9, 20 (.tmp not an executable extension) -=item Release 1.4: 26-May-1999 +=head2 Hard Links -Charles Wilson - cwilson@ece.gatech.edu +FAT partitions do not support hard links (whereas NTFS does), in which +case Cygwin implements link() by copying the file. These tests will fail: - From Eric Fifer: - hints/cygwin32.sh -L. and --export-dynamic not needed - cygwin32/Makefile.SHs no value needed for -DUSEIMPORTLIB - t/lib/io_sock.t -I../lib so "make test" works - t/lib/posix.t workaround a Cygwin bug so test works - doio.c/perl.h cleanup gcc warning "doio.c:789: warning: - pointer/integer type mismatch in - conditional expression" - From Charles Wilson: - Configure changes to findhdr script - documentation updates - built binary kit for release + Failed Test List of failed + ------------------------------------ + io/fs.t 4 + op/stat.t 3 -=item Release 1.3: 26-May-1999 +=head2 Filetime Granularity -Charles Wilson - cwilson@ece.gatech.edu +On FAT partitions the filetime granularity is 2 seconds. The following +test will fail: - Changes to Cwd.pm to correct lib/findbin.t test failure from Eric Fifer - Changes to t/op/magic.t to correct a test failure from Eric Fifer - Changes to miniperlmain.c, util.c, and mg.c to correct t/op/magic.t #29 - test failure, from Eric Fifer - more documentatino updates, patch merging, and a change to - cygwin/Makefile.SHs -- cw. - 99.95% okay!!! + Failed Test List of failed + ------------------------------------ + io/fs.t 18 -=item Release 1.2: 25-May-1999 +=head2 Tainting Checks -Charles Wilson - cwilson@ece.gatech.edu +When Perl is running in taint mode, C<$ENV{PATH}> is considered tainted +and not used, so DLLs not in the default system directories will not +be found. While the tests are running you will see warnings popup from +the system with messages like: - fixes for lib/io_sock and pragma/locale from Eric Fifer - fixes for Configure, Makefile.SH, and cygwin32/Makefile.SHs from - alex smishlajev - documentation updates, and other fixes to the fixes from cw. - 99.91% okay!!! + Win9x + Error Starting Program + A required .DLL file, CYGWIN1.DLL, was not found -=item Release 1.1: 21-May-1999 + WinNT + perl.exe or sh.exe - Unable to Locate DLL + The dynamic link library cygwin1.dll could not be found in the + specified path ... -Charles Wilson - cwilson@ece.gatech.edu +Just click OK and ignore them. When running `C', 2 popups +occur. During `C<./perl harness>', 4 popups occur. Also, these tests +will fail: -minor change to Configure script, reversed a few changes made by -alexander's patch (made DOSISH #undefined again) and moved code -by alexander from dosish.h to perl.h. Reversed a change in -pp_hot.c + Failed Test List of failed + ------------------------------------ + op/taint.t 1, 3, 31, 37 -=item Release 1.0: 16-May-1999 +Alternatively, you can copy F into one of the Windows system +directories (although, this is B recommended). -Charles Wilson - cwilson@ece.gatech.edu +=head2 /etc/group -Merged alexander's patch and Eric's patch into a single -monolithic patch. Minor cleanup. Built binary for distribution. -perl5.005_03-dynamic-patch-v1.0 +Cygwin does not need F, in which case the F +test will be skipped. The check performed by F expects to +see entries that use the members field, otherwise this test will fail: -=item Pre-release 3: 12-May-1999 + Failed Test List of failed + ------------------------------------ + op/grent.t 1 -Eric Fifer - efifer@sanwaint.com +=head2 Unexplained Failures -Removed all references to the impure_ptr hack since it is no longer -needed. Some minor cleanup of alexander smishlajev's work and a few -bug fixes. +Any additional tests that fail are likely due to bugs in Cygwin. It is +expected that by the time of the next net release most of these will +be solved so they are not described here. None of the current bugs are +serious enough that workarounds are needed. -=item Pre-release 2 (initial dynamic build): 17..25-apr-1999 +=head2 Script Portability -alexander smishlajev - als@turnher.com +Cygwin does an outstanding job of providing UNIX-like semantics on top +of Win32 systems. However, in addition to the items noted above, there +are some differences that you should know about. This is only a very +brief guide to portability, more information about Cygwin can be found +in the Cygwin documentation. -perl 5.005_03. cygwin b20.1 egcs 1.1.2. far 1.60. nescafe classic. +=over 4 -=item Pre-release 1 (static build): 5-Mar-1999 +=item * Pathnames -Charles Wilson - cwilson@ece.gatech.edu +Cygwin pathnames can be separated by forward (F) or backward (F<\>) +slashes. They may also begin with drive letters (F) or Universal +Naming Codes (F). DOS device names (F, F, F, +F, F) are invalid as base filenames. However, they can be +used in extensions (e.g., F). Names may not contain these +characters: -Collected various patches that had been floating around the net, along -with build instructions. Original authorship credit for those patches -goes to: + : * ? " < > | - Steven Morlock - newspost@morlock.net - Sebastien Barre - Sebastien.Barre@utc.fr - Teun Burgers - burgers@ecn.nl +File names are case insensitive, but case preserving. With the I +C setting, file names are mixed-case (although, directory names +remain case insensitive). -Created a monolithic patchkit (perl5.005_03-static-patch) and build -instructions for cygwin (beta 20.1). Also created a binary distribution -of the resulting static perl build. +The I setting is only available with the "coolview" version of +F provided by Sergey Okhapkin at: + + ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/porters/Okhapkin_Sergey/ + +=item * Text/Binary + +When a file is opened it is in either text or binary mode. In text mode +it is subject to CR/LF/Ctrl-Z translations. Perl provides a binmode() +function to force binary mode on files that otherwise would be treated +as text. With Cygwin, the default mode for an open() is determined by the +mode of the mount that underlies a file. For binmode() to be effective, +the underlying mount must be text. There is no way to force text mode +on a file underneath a binary mount. The text/binary issue is covered +at length in the Cygwin documentation. + +lseek() only works with files opened in binary mode. + +=item * F<.exe> + +The Cygwin stat() makes the F<.exe> extension transparent by looking for +a F when you ask for F (unless a F also exists). +Cygwin does not require a F<.exe> extension, but I adds it +automatically when building a program. However, when accessing an +executable as a normal file (e.g., I or I in a makefile) +the F<.exe> is not transparent. + +NOTE: There is a version of I that understands F<.exe>, it can +be found at: + + ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/porters/Humblet_Pierre_A/ + +=item * chown() + +On WinNT with the I C setting, chown() can change a file's +user and group IDs. In all other configurations chown() is a no-op, +although this is appropriate on Win9x since there is no security model. + +=item * Miscellaneous + +File locking using the C command to fcntl() is a stub that +returns C. + +Win32 can not unlink() an open file (but this is emulated by Cygwin). + +Win9x can not rename() an open file (although WinNT can). =back -=head1 APPENDIX +=head1 INSTALL + +This will install Perl, including man pages. + + make install 2>&1 | tee log.make-install -Perl harness results from Eric Fifer, under various environments. The same -executable was used in all cases. The last item is a different executable -on a different machine, built by Charles Wilson. +You may need to be I to run `C'. If you +are not, you must have write access to the directories in question. -There are a number of very good questions one could ask about anomalies -in the test results presented below. "Why do the last two show different -results?" "Why did op/stat.t #18 pass in the first two tests and fail in -the third?" Short answer: I don't know. Long answer: I really have no -idea. +Information on installing the Perl documentation in HTML format can be +found in the F document. -=over +=head1 MANIFEST -=item text mounts, no 'ntea' +These are the files in the Perl release that contain references to Cygwin. +These very brief notes attempt to explain the reason for all conditional +code. Hopefully, keeping this up to date will allow the Cygwin port to +be kept as clean as possible. - Failed Test Status Wstat Total Fail Failed List of failed - ------------------------------------------------------------ - lib/anydbm.t 2 512 12 8 66.67% 5-12 - lib/sdbm.t 2 512 18 15 83.33% 2, 5-18 - op/split.t 25 1 4.00% 11 - op/stat.t 58 3 5.17% 9, 19, 26 - op/taint.t 149 3 2.01% 1, 3, 31 +=over 4 -=item binary mounts, no 'ntea' +=item Documentation - Failed Test Status Wstat Total Fail Failed List of failed - ------------------------------------------------------------ - lib/sdbm.t 18 1 5.56% 2 - op/stat.t 58 3 5.17% 9, 19, 26 - op/taint.t 149 3 2.01% 1, 3, 31 + INSTALL + Changes Changes5.005 Changes5.004 + AUTHORS MAINTAIN MANIFEST + README.cygwin README.win32 + pod/perl.pod pod/perlfaq3.pod pod/perlhist.pod pod/perlmodlib.pod + pod/perlport.pod pod/perltoc.pod pod/perl5004delta.pod -=item binary mounts, 'ntea' +=item Build, Configure, Make, Install - Failed Test Status Wstat Total Fail Failed List of failed - ------------------------------------------------------------ - op/stat.t 58 3 5.17% 18-19, 26 - op/taint.t 149 3 2.01% 1, 3, 31 + cygwin/Makefile.SHs + cygwin/ld2.in + cygwin/perlld.in + ext/IPC/SysV/hints/cygwin.pl + ext/NDBM_File/hints/cygwin.pl + ext/ODBM_File/hints/cygwin.pl + hints/cygwin.sh + Porting/patchls - cygwin in port list + Makefile.SH - linklibperl, cygwin/Makefile.SHs + makedepend.SH - uwinfix + Configure - help finding hints from uname, + shared libperl required for dynamic loading + installman - man pages with :: translated to . + installperl - install dll, install to pods -=item binary mounts, ntea (csw build) +=item Tests - Failed Test Status Wstat Total Fail Failed List of failed - ------------------------------------------------------------------------------- - op/taint.t 149 3 2.01% 1, 3, 31 + t/io/tell.t - binmode + t/op/magic.t - $^X WORKAROUND, s/.exe// + t/op/stat.t - no /dev, no -u (setuid) + +=item Compiled Perl Source + + doio.c - win9x can not rename a file when it is open + EXTERN.h - __declspec(dllimport) + XSUB.h - __declspec(dllexport) + perl.h - binmode + mg.c - environ WORKAROUND + util.c - environ WORKAROUND + unixish.h - environ WORKAROUND + +=item Compiled Module Source + + ext/POSIX/POSIX.xs - tzname defined externally + ext/SDBM_File/sdbm/pair.c + - EXTCONST needs to be redefined from EXTERN.h + ext/SDBM_File/sdbm/sdbm.c + - binary open + +=item Perl Modules/Scripts + + lib/perl5db.pl - use stdin not /dev/tty + utils/perlcc.PL - DynaLoader.a in compile, -DUSEIMPORTLIB + utils/perldoc.PL - version comment + lib/File/Spec/Unix.pm - preserve //unc + lib/ExtUtils/MakeMaker.pm + - require MM_Cygwin.pm + lib/ExtUtils/MM_Cygwin.pm + - canonpath, cflags, manifypods, perl_archive + lib/Cwd.pm - `pwd` =back -=cut +=head1 BUGS + +Upon each start, I warns that a rule for F is overridden +(but there seems to be no better solution than adding an explicit define). + +`C' does not remove library F<.def> and F<.exe.stackdump> +files. + +The I script contains references to the source directory. You should +change these to C (or whatever) after install. + +=head1 AUTHORS + +Charles Wilson Ecwilson@ece.gatech.eduE, +Eric Fifer Eefifer@sanwaint.comE, +alexander smishlajev Eals@turnhere.comE, +Steven Morlock Enewspost@morlock.netE, +Sebastien Barre ESebastien.Barre@utc.frE, +Teun Burgers Eburgers@ecn.nlE. + +=head1 HISTORY + +Last updated: 28 January 2000 diff --git a/README.os2 b/README.os2 index cd07ca1..46f032a 100644 --- a/README.os2 +++ b/README.os2 @@ -1136,7 +1136,7 @@ Really really odious function to implement. Returns absolute name of file which would have C if CWD were C. C defaults to the current dir. -=item C Get current value of extended library search path. If C is present and I, works with END_LIBPATH, otherwise with diff --git a/README.threads b/README.threads index b02e607..1f5f7ea 100644 --- a/README.threads +++ b/README.threads @@ -1,7 +1,20 @@ -NOTE +NOTE: This documentation describes the style of threading that was +available in 5.005. Perl v5.6 also has the early beginnings of +interpreter-based threads support (which is what will be enabled by +default when you simply ask for -Dusethreads). However, be advised +that interpreter threads cannot as yet be created from the Perl level +yet. If you're looking to create threads from within Perl, chances +are you _don't_ want interpreter threads, but want the older support +for threads described below, enabled with: + + sh Configure -Dusethreads -Duse5005threads + +The rest of this document only applies to the use5005threads style of +threads. +--------------------------------------------------------------------------- -Threading is a highly experimental feature. There are still a -few race conditions that show up under high contention on SMP +Support for threading is still in the highly experimental stages. There +are known race conditions that show up under high contention on SMP machines. Internal implementation is still subject to changes. It is not recommended for production use at this time. @@ -11,7 +24,7 @@ Building If your system is in the following list you should be able to just: - ./Configure -Dusethreads -des + ./Configure -Dusethreads -Duse5005threads -des make and ignore the rest of this "Building" section. If not, continue @@ -58,7 +71,7 @@ subdirectory. On platforms that use Configure to build perl, omit the -d from your ./Configure arguments. For example, use: - ./Configure -Dusethreads + ./Configure -Dusethreads -Duse5005threads When Configure prompts you for ccflags, insert any other arguments in there that your compiler needs to use POSIX threads (-D_REENTRANT, @@ -168,8 +181,8 @@ has this fixed but the following patch can be applied to 0.5 for now: Building the Thread extension The Thread extension is now part of the main perl distribution tree. -If you did Configure -Dusethreads then it will have been added to -the list of extensions automatically. +If you did Configure -Dusethreads -Duse5005threads then it will have been +added to the list of extensions automatically. You can try some of the tests with cd ext/Thread diff --git a/README.vos b/README.vos index ab9d99d..99abf0d 100644 --- a/README.vos +++ b/README.vos @@ -1,10 +1,11 @@ Perl 5 README file for the Stratus VOS operating system. Paul Green (Paul_Green@stratus.com) -August 12, 1998 +February 3, 2000 + Introduction ------------ -This is a port of Perl version 5, revision 005-02, to VOS. Perl +This is a port of Perl version 5, revision 005-63, to VOS. Perl is a scripting or macro language that is popular on many systems. See your local computer bookstore for a number of good books on Perl. @@ -12,8 +13,12 @@ books on Perl. Most of the Perl features should work on VOS. However, any attempt by perl.pm to call the following unimplemented POSIX functions will result in an error message and an immediate and -fatal call to the VOS debugger. They are "dup", "execlp", -"execl", "execvp", "fork", and "waitpid". +fatal call to the VOS debugger. They are "dup", "fork", and +"waitpid". The lack of these functions pretty much prevents you +from starting VOS commands and grabbing their output in perl. +The workaround is to run the commands outside of perl, then have +perl process the output file. + Compiling Perl 5 on VOS ----------------------- @@ -23,65 +28,124 @@ following additional items. 1. The VOS Standard C Compiler and Runtime, or the VOS Standard C Cross-Compiler. This is a standard Stratus product. -2. The VOS OS TCP/IP product set. While the necessary header files - are included in this distribution, you still need the appropriate - object files in order to bind perl.pm. This is a standard - Stratus product. +2. The VOS OS TCP/IP product set. While the necessary header + files are included with VOS POSIX.1, you still need the + appropriate object files in order to bind perl.pm. This is + a standard Stratus product. 3. The VOS POSIX.1 environment. As of this writing, this is - available on the VOS FTP site. Login to ftp.stratus.com - anonymously and get the file /pub/vos/alpha/posix.save.evf.gz in - binary file-transfer mode. Or use the Uniform Resource Locator - (URL) ftp://ftp.stratus.com/pub/vos/alpha/posix.save.evf.gz from + available on the VOS FTP site. Login anonymously to + ftp.stratus.com and get the file + /pub/vos/alpha/posix.save.evf.gz in binary file-transfer + mode. Or use the Uniform Resource Locator (URL) + ftp://ftp.stratus.com/pub/vos/alpha/posix.save.evf.gz from your web browser. This is not a standard Stratus product. -To build build 5, change to one of the VOS object directories -(e.g., perl5.005_02>vos>obj), and give the command "system>ported>command_library. + +2. Copy the appropriate version of the perl program module to + this directory. For example, with your current directory + set to the top-level directory of Perl 5, to install the + executable program module for the Motorola 68K + architecture, enter: + + !copy_file vos>obj>perl.pm >system>ported>command_library>* + + (If you wish to use both Perl version 4 and Perl version 5, + you must give them different names; for example, perl.pm + and perl5.pm). + +3. Create the directory >system>ported>perl>lib. + +4. Copy all of the files and subdirectories from the lib + subdirectory into this new directory. For example, with + the current directory set to the top-level directory of the + perl distribution, enter: + + !copy_dir lib >system>ported>perl>lib>5.005 + +5. While there are currently no architecture-specific + extensions or modules distributed with perl, the following + directories can be used to hold such files: + + >system>ported>perl>lib>5.005.68k + >system>ported>perl>lib>5.005.860 + >system>ported>perl>lib>5.005.7100 + >system>ported>perl>lib>5.005.8000 + +6. Site-specific perl extensions and modules can be installed + in one of two places. Put architecture-independent files + into: + + >system>ported>perl>lib>site>5.005 + + Put architecture-dependent files into one of the following + directories: + + >system>ported>perl>lib>site>5.005.68k + >system>ported>perl>lib>site>5.005.860 + >system>ported>perl>lib>site>5.005.7100 + >system>ported>perl>lib>site>5.005.8000 + +7. You can examine the @INC variable from within a perl program + to see the order in which Perl searches these directories. -Changes to Perl for VOS ------------------------ -1. The header perl.h was changed to include vosish.h instead - of unixish.h. This change is necessary because VOS POSIX.1 - does not (yet) implement the getgrname() or getgrgid() - functions. Unimplemented Features ---------------------- -If Perl 5 attempts to call an unimplemented VOS POSIX.1 -function, it will print a fatal error message and enter the VOS -debugger. This error is not recoverable. See vos_dummies.c for -a list of the unimplemented POSIX.1 functions. To see what the -error message looks like, compile and execute -"test_vos_dummies.c". +If Perl 5 attempts to call an unimplemented VOS POSIX.1 function, +it will print a fatal error message and enter the VOS debugger. +This error is not recoverable. See vos_dummies.c for a list of +the unimplemented POSIX.1 functions. To see what functions are +unimplemented and what the error message looks like, compile and +execute "test_vos_dummies.c". + Restrictions ------------ -This port of Perl version 5 to VOS uses Unix-style, -slash-separated pathnames, not VOS-style greater-than-separated -pathnames. If you wish to have it use VOS-style pathnames, try -setting the external variable s$c_options to 4 with the -following command line. Note that this way of configuring Perl -5 has not been tested; I don't know if Perl can handle the -presence of the greater-thans, and the absence of the slashes. +This port of Perl version 5 to VOS prefers Unix-style, +slash-separated pathnames over VOS-style greater-than-separated +pathnames. VOS-style pathnames should work in most contexts, but +if you have trouble, replace all greater-than characters by slash +characters. Because the slash character is used as a pathname +delimiter, Perl cannot process VOS pathnames containing a slash +character in a directory or file name; these must be renamed. - set_external_variable s$c_options -in perl.pm -type integer -to 4 +This port of Perl also uses Unix-epoch date values internally. +As long as you are dealing with ASCII character string +representations of dates, this should not be an issue. The +supported epoch is January 1, 1980 to January 17, 2038. -The following command can be used to check the value: +See the file pod/perlport.pod for more information about the VOS +port of Perl. - get_external_variable s$c_options -in perl.pm -type integer - -See the documentation for VOS POSIX.1 for the full set of option -values. Support Status -------------- I'm offering this port "as is". You can ask me questions, but I can't guarantee I'll be able to answer them; I don't know much -about Perl itself; I'm still learning that. +about Perl itself; I'm still learning that. There are some +excellent books available on the Perl language; consult a book +seller. (end) - diff --git a/README.win32 b/README.win32 index 1623acf..6889ab7 100644 --- a/README.win32 +++ b/README.win32 @@ -90,7 +90,7 @@ work for MakeMaker builds.) A port of dmake for win32 platforms is available from: - ftp://ftp.linux.activestate.com/pub/staff/gsar/dmake-4.1-win32.zip + http://cpan.perl.org/authors/id/GSAR/dmake-4.1pl1-win32.zip (This is a fixed version of original dmake sources obtained from http://www.wticorp.com/dmake/. As of version 4.1PL1, the original @@ -177,7 +177,7 @@ If you have either the source or a library that contains des_fcrypt(), enable the appropriate option in the makefile. des_fcrypt() is not bundled with the distribution due to US Government restrictions on the export of cryptographic software. Nevertheless, this routine -is part of the "libdes" library (written by Ed Young) which is widely +is part of the "libdes" library (written by Eric Young) which is widely available worldwide, usually along with SSLeay (for example: "ftp://fractal.mta.ca/pub/crypto/SSLeay/DES/"). Set CRYPT_SRC to the name of the file that implements des_fcrypt(). Alternatively, if @@ -215,21 +215,6 @@ The build process may produce "harmless" compiler warnings (more or less copiously, depending on how picky your compiler gets). The maintainers are aware of these warnings, thankyouverymuch. :) -When building using Visual C++, a perl95.exe will also get built. This -executable is only needed on Windows95, and should be used instead of -perl.exe, and then only if you want sockets to work properly on Windows95. -This is necessitated by a bug in the Microsoft C Runtime that cannot be -worked around in the "normal" perl.exe. perl95.exe gets built with its -own private copy of the C Runtime that is not accessible to extensions -(which see the DLL version of the CRT). Be aware, therefore, that this -perl95.exe will have esoteric problems with extensions like perl/Tk that -themselves use the C Runtime heavily, or want to free() pointers -malloc()-ed by perl. - -You can avoid the perl95.exe problems completely if you either enable -USE_PERLCRT with Visual C++, or use Borland C++ for building perl. In -those cases, perl95.exe is not needed and will not be built. - =back =head2 Testing diff --git a/Todo-5.005 b/Todo-5.6 similarity index 50% rename from Todo-5.005 rename to Todo-5.6 index e06add9..44e26a7 100644 --- a/Todo-5.005 +++ b/Todo-5.6 @@ -1,10 +1,26 @@ +Unicode support + finish byte <-> utf8 and localencoding <-> utf8 conversions + make "$bytestr$charstr" do the right conversion + add Unicode::Map equivivalent to core + add support for I/O disciplines + - open(F, " + make C mean C (if !exists(&v123)) + autoload utf8_heavy.pl's swash routines in swash_init() + Multi-threading - $AUTOLOAD. Hmm. - consistent semantics for exit/die in threads - SvREFCNT_dec(curstack) in threadstart() in Thread.xs - better support for externally created threads - Thread::Pool - spot-check globals like statcache and global GVs for thread-safety + support "use Thread;" under useithreads + add mechanism to: + - create new interpreter in a different thread + - exchange data between interpreters/threads + - share namespaces between interpreters/threads + work out consistent semantics for exit/die in threads + support for externally created threads? + Thread::Pool? Compiler auto-produce executable @@ -16,13 +32,9 @@ Compiler from where newASSIGNOP steals the field) Namespace cleanup - CPP-space: restrict what we export from headers - header-space: move into CORE/perl/ - API-space: begin list of things that constitute public api - -MULTIPLICITY support - complete work on safe recursive interpreters, Cnew()> - revisit extra implicit arg that provides curthread/curinterp context + CPP-space: restrict what we export from headers when !PERL_CORE + header-space: move into CORE/perl/? + API-space: complete the list of things that constitute public api Configure make configuring+building away from source directory work (VPATH et al) @@ -31,9 +43,12 @@ Configure POSIX 1003.1 1996 Edition support Locales + deprecate traditional/legacy locales? + figure out how to support Unicode locales locales across packages? Regexen + make RE engine thread-safe POSIX [=bar=] and [.zap.] would nice too but there's no API for them (=bar= could be done with Unicode, though) approximate matching @@ -42,22 +57,16 @@ Reliable Signals custom opcodes alternate runops() for signal despatch figure out how to die() in delayed sighandler - add tests for Thread::Signal + make Thread::Signal work under useithreads Win32 stuff - get PERL_OBJECT building under gcc - get PERL_OBJECT building on non-win32 - automate generation of 'protected' prototypes for CPerlObj - rename new headers to be consistent with the rest - sort out the spawnvp() mess + sort out the spawnvp() mess for system('a','b','c') compatibility work out DLL versioning - style-check Miscellaneous - rename and alter ISA.pm magic_setisa should be made to update %FIELDS [???] add new modules (Archive::Tar, Compress::Zlib, CPAN::FTP?) - fix pod2html to generate relative URLs (replace with new PodtoHtml?) + replace pod2html with new PodtoHtml? (requires other modules from CPAN) automate testing with large parts of CPAN Ongoing diff --git a/XSUB.h b/XSUB.h index 53ff98d..cfcad5d 100644 --- a/XSUB.h +++ b/XSUB.h @@ -1,9 +1,53 @@ #ifndef _INC_PERL_XSUB_H #define _INC_PERL_XSUB_H 1 +/* first, some documentation for xsubpp-generated items */ + +/* +=for apidoc Amn|char*|CLASS +Variable which is setup by C to indicate the +class name for a C++ XS constructor. This is always a C. See C. + +=for apidoc Amn|(whatever)|RETVAL +Variable which is setup by C to hold the return value for an +XSUB. This is always the proper type for the XSUB. See +L. + +=for apidoc Amn|(whatever)|THIS +Variable which is setup by C to designate the object in a C++ +XSUB. This is always the proper type for the C++ object. See C and +L. + +=for apidoc Amn|I32|items +Variable which is setup by C to indicate the number of +items on the stack. See L. + +=for apidoc Amn|I32|ix +Variable which is setup by C to indicate which of an +XSUB's aliases was used to invoke it. See L. + +=for apidoc Am|SV*|ST|int ix +Used to access elements on the XSUB's stack. + +=for apidoc AmU||XS +Macro to declare an XSUB and its C parameter list. This is handled by +C. + +=for apidoc Ams||dXSARGS +Sets up stack and mark pointers for an XSUB, calling dSP and dMARK. This +is usually handled automatically by C. Declares the C +variable to indicate the number of items on the stack. + +=for apidoc Ams||dXSI32 +Sets up the C variable for an XSUB which has aliases. This is usually +handled automatically by C. + +=cut +*/ + #define ST(off) PL_stack_base[ax + (off)] -#if defined(CYGWIN) && defined(USE_DYNAMIC_LOADING) +#if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING) # define XS(name) __declspec(dllexport) void name(pTHXo_ CV* cv) #else # define XS(name) void name(pTHXo_ CV* cv) @@ -34,14 +78,75 @@ #define XSINTERFACE_FUNC_SET(cv,f) \ CvXSUBANY(cv).any_dptr = (void (*) (pTHXo_ void*))(f) -#define XSRETURN(off) \ - STMT_START { \ - PL_stack_sp = PL_stack_base + ax + ((off) - 1); \ - return; \ - } STMT_END - /* Simple macros to put new mortal values onto the stack. */ /* Typically used to return values from XS functions. */ + +/* +=for apidoc Am|void|XST_mIV|int pos|IV iv +Place an integer into the specified position C on the stack. The +value is stored in a new mortal SV. + +=for apidoc Am|void|XST_mNV|int pos|NV nv +Place a double into the specified position C on the stack. The value +is stored in a new mortal SV. + +=for apidoc Am|void|XST_mPV|int pos|char* str +Place a copy of a string into the specified position C on the stack. +The value is stored in a new mortal SV. + +=for apidoc Am|void|XST_mNO|int pos +Place C<&PL_sv_no> into the specified position C on the +stack. + +=for apidoc Am|void|XST_mYES|int pos +Place C<&PL_sv_yes> into the specified position C on the +stack. + +=for apidoc Am|void|XST_mUNDEF|int pos +Place C<&PL_sv_undef> into the specified position C on the +stack. + +=for apidoc Am|void|XSRETURN|int nitems +Return from XSUB, indicating number of items on the stack. This is usually +handled by C. + +=for apidoc Am|void|XSRETURN_IV|IV iv +Return an integer from an XSUB immediately. Uses C. + +=for apidoc Am|void|XSRETURN_NV|NV nv +Return an double from an XSUB immediately. Uses C. + +=for apidoc Am|void|XSRETURN_PV|char* str +Return a copy of a string from an XSUB immediately. Uses C. + +=for apidoc Ams||XSRETURN_NO +Return C<&PL_sv_no> from an XSUB immediately. Uses C. + +=for apidoc Ams||XSRETURN_YES +Return C<&PL_sv_yes> from an XSUB immediately. Uses C. + +=for apidoc Ams||XSRETURN_UNDEF +Return C<&PL_sv_undef> from an XSUB immediately. Uses C. + +=for apidoc Ams||XSRETURN_EMPTY +Return an empty list from an XSUB immediately. + +=for apidoc AmU||newXSproto +Used by C to hook up XSUBs as Perl subs. Adds Perl prototypes to +the subs. + +=for apidoc AmU||XS_VERSION +The version identifier for an XS module. This is usually +handled automatically by C. See C. + +=for apidoc Ams||XS_VERSION_BOOTCHECK +Macro to verify that a PM module's $VERSION variable matches the XS +module's C variable. This is usually handled automatically by +C. See L. + +=cut +*/ + #define XST_mIV(i,v) (ST(i) = sv_2mortal(newSViv(v)) ) #define XST_mNV(i,v) (ST(i) = sv_2mortal(newSVnv(v)) ) #define XST_mPV(i,v) (ST(i) = sv_2mortal(newSVpv(v,0))) @@ -49,11 +154,17 @@ #define XST_mNO(i) (ST(i) = &PL_sv_no ) #define XST_mYES(i) (ST(i) = &PL_sv_yes ) #define XST_mUNDEF(i) (ST(i) = &PL_sv_undef) - + +#define XSRETURN(off) \ + STMT_START { \ + PL_stack_sp = PL_stack_base + ax + ((off) - 1); \ + return; \ + } STMT_END + #define XSRETURN_IV(v) STMT_START { XST_mIV(0,v); XSRETURN(1); } STMT_END #define XSRETURN_NV(v) STMT_START { XST_mNV(0,v); XSRETURN(1); } STMT_END #define XSRETURN_PV(v) STMT_START { XST_mPV(0,v); XSRETURN(1); } STMT_END -#define XSRETURN_PVN(v) STMT_START { XST_mPVN(0,v,n); XSRETURN(1); } STMT_END +#define XSRETURN_PVN(v,n) STMT_START { XST_mPVN(0,v,n); XSRETURN(1); } STMT_END #define XSRETURN_NO STMT_START { XST_mNO(0); XSRETURN(1); } STMT_END #define XSRETURN_YES STMT_START { XST_mYES(0); XSRETURN(1); } STMT_END #define XSRETURN_UNDEF STMT_START { XST_mUNDEF(0); XSRETURN(1); } STMT_END @@ -77,7 +188,7 @@ vn = "VERSION"), FALSE); \ } \ if (tmpsv && (!SvOK(tmpsv) || strNE(XS_VERSION, SvPV(tmpsv, n_a)))) \ - Perl_croak(aTHX_ "%s object version %s does not match %s%s%s%s %_", \ + Perl_croak(aTHX_ "%s object version %s does not match %s%s%s%s %"SVf,\ module, XS_VERSION, \ vn ? "$" : "", vn ? module : "", vn ? "::" : "", \ vn ? vn : "bootstrap parameter", tmpsv); \ @@ -119,10 +230,8 @@ # define VTBL_amagicelem &PL_vtbl_amagicelem #endif -#if defined(PERL_OBJECT) || defined(PERL_CAPI) -# include "perlapi.h" -# include "objXSUB.h" -#endif /* PERL_OBJECT || PERL_CAPI */ +#include "perlapi.h" +#include "objXSUB.h" #if defined(PERL_IMPLICIT_CONTEXT) && !defined(PERL_NO_GET_CONTEXT) && !defined(PERL_CORE) # undef aTHX diff --git a/av.c b/av.c index af8296a..29afaff 100644 --- a/av.c +++ b/av.c @@ -1,6 +1,6 @@ /* av.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -46,6 +46,15 @@ Perl_av_reify(pTHX_ AV *av) AvREAL_on(av); } +/* +=for apidoc av_extend + +Pre-extend an array. The C is the index to which the array should be +extended. + +=cut +*/ + void Perl_av_extend(pTHX_ AV *av, I32 key) { @@ -151,6 +160,19 @@ Perl_av_extend(pTHX_ AV *av, I32 key) } } +/* +=for apidoc av_fetch + +Returns the SV at the specified index in the array. The C is the +index. If C is set then the fetch will be part of a store. Check +that the return value is non-null before dereferencing it to a C. + +See L for +more information on how to use this function on tied arrays. + +=cut +*/ + SV** Perl_av_fetch(pTHX_ register AV *av, I32 key, I32 lval) { @@ -198,6 +220,23 @@ Perl_av_fetch(pTHX_ register AV *av, I32 key, I32 lval) return &AvARRAY(av)[key]; } +/* +=for apidoc av_store + +Stores an SV in an array. The array index is specified as C. The +return value will be NULL if the operation failed or if the value did not +need to be actually stored within the array (as in the case of tied +arrays). Otherwise it can be dereferenced to get the original C. Note +that the caller is responsible for suitably incrementing the reference +count of C before the call, and decrementing it if the function +returned NULL. + +See L for +more information on how to use this function on tied arrays. + +=cut +*/ + SV** Perl_av_store(pTHX_ register AV *av, I32 key, SV *val) { @@ -257,6 +296,14 @@ Perl_av_store(pTHX_ register AV *av, I32 key, SV *val) return &ary[key]; } +/* +=for apidoc newAV + +Creates a new AV. The reference count is set to 1. + +=cut +*/ + AV * Perl_newAV(pTHX) { @@ -271,6 +318,16 @@ Perl_newAV(pTHX) return av; } +/* +=for apidoc av_make + +Creates a new AV and populates it with a list of SVs. The SVs are copied +into the array, so they may be freed after the call to av_make. The new AV +will have a reference count of 1. + +=cut +*/ + AV * Perl_av_make(pTHX_ register I32 size, register SV **strp) { @@ -320,6 +377,15 @@ Perl_av_fake(pTHX_ register I32 size, register SV **strp) return av; } +/* +=for apidoc av_clear + +Clears an array, making it empty. Does not free the memory used by the +array itself. + +=cut +*/ + void Perl_av_clear(pTHX_ register AV *av) { @@ -361,6 +427,14 @@ Perl_av_clear(pTHX_ register AV *av) } +/* +=for apidoc av_undef + +Undefines the array. Frees the memory used by the array itself. + +=cut +*/ + void Perl_av_undef(pTHX_ register AV *av) { @@ -389,6 +463,15 @@ Perl_av_undef(pTHX_ register AV *av) } } +/* +=for apidoc av_push + +Pushes an SV onto the end of the array. The array will grow automatically +to accommodate the addition. + +=cut +*/ + void Perl_av_push(pTHX_ register AV *av, SV *val) { @@ -415,6 +498,15 @@ Perl_av_push(pTHX_ register AV *av, SV *val) av_store(av,AvFILLp(av)+1,val); } +/* +=for apidoc av_pop + +Pops an SV off the end of the array. Returns C<&PL_sv_undef> if the array +is empty. + +=cut +*/ + SV * Perl_av_pop(pTHX_ register AV *av) { @@ -448,6 +540,16 @@ Perl_av_pop(pTHX_ register AV *av) return retval; } +/* +=for apidoc av_unshift + +Unshift the given number of C values onto the beginning of the +array. The array will grow automatically to accommodate the addition. You +must then use C to assign values to these new elements. + +=cut +*/ + void Perl_av_unshift(pTHX_ register AV *av, register I32 num) { @@ -501,6 +603,14 @@ Perl_av_unshift(pTHX_ register AV *av, register I32 num) } } +/* +=for apidoc av_shift + +Shifts an SV off the beginning of the array. + +=cut +*/ + SV * Perl_av_shift(pTHX_ register AV *av) { @@ -538,6 +648,15 @@ Perl_av_shift(pTHX_ register AV *av) return retval; } +/* +=for apidoc av_len + +Returns the highest index in the array. Returns -1 if the array is +empty. + +=cut +*/ + I32 Perl_av_len(pTHX_ register AV *av) { diff --git a/av.h b/av.h index 14e8765..6b66bfd 100644 --- a/av.h +++ b/av.h @@ -1,6 +1,6 @@ /* av.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -45,6 +45,16 @@ struct xpvav { /* XXX this is not used anywhere */ #define AVf_REUSED 4 /* got undeffed--don't turn old memory into SVs now */ +/* +=for apidoc AmU||Nullav +Null AV pointer. + +=for apidoc Am|int|AvFILL|AV* av +Same as C. Deprecated, use C instead. + +=cut +*/ + #define Nullav Null(AV*) #define AvARRAY(av) ((SV**)((XPVAV*) SvANY(av))->xav_array) diff --git a/cflags.SH b/cflags.SH index 54e19d5..ec6dc35 100755 --- a/cflags.SH +++ b/cflags.SH @@ -105,6 +105,7 @@ for file do miniperlmain) ;; op) ;; perl) ;; + perlapi) ;; perlmain) ;; perly) ;; pp) ;; diff --git a/config_h.SH b/config_h.SH index 712b38e..8dfb5db 100644 --- a/config_h.SH +++ b/config_h.SH @@ -1226,9 +1226,14 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- * available directly to the user. Note that it may well be different from * the preprocessor used to compile the C program. */ +/* CPPLAST: + * This symbol is intended to be used along with CPPRUN in the same manner + * symbol CPPMINUS is used with CPPSTDIN. It contains either "-" or "". + */ #define CPPSTDIN "$cppstdin" #define CPPMINUS "$cppminus" #define CPPRUN "$cpprun" +#define CPPLAST "$cpplast" /* HAS_ACCESS: * This manifest constant lets the C program know that the access() @@ -1420,9 +1425,14 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- * so that it is safe even if used by a process with super-user * privileges. */ +/* HAS_PHOSTNAME: + * This symbol, if defined, indicates that the C program may use the + * contents of PHOSTNAME as a command to feed to the popen() routine + * to derive the host name. + */ #$d_gethname HAS_GETHOSTNAME /**/ #$d_uname HAS_UNAME /**/ -#$d_phostname HAS_PHOSTNAME +#$d_phostname HAS_PHOSTNAME /**/ #ifdef HAS_PHOSTNAME #define PHOSTNAME "$aphostname" /* How to get the host name */ #endif @@ -1547,6 +1557,9 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- * the GNU C library is being used. */ #$d_gnulibc HAS_GNULIBC /**/ +#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE) +# define _GNU_SOURCE +#endif /* HAS_HASMNTOPT: * This symbol, if defined, indicates that the hasmntopt routine is * available to query the mount options of file systems. @@ -1578,6 +1591,12 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #$d_htonl HAS_NTOHL /**/ #$d_htonl HAS_NTOHS /**/ +/* HAS_ICONV: + * This symbol, if defined, indicates that the iconv routine is + * available to do character set conversions. + */ +#$d_iconv HAS_ICONV /**/ + /* HAS_ISASCII: * This manifest constant lets the C program know that isascii * is available. @@ -2165,6 +2184,12 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #$i_grp I_GRP /**/ #$d_grpasswd GRPASSWD /**/ +/* I_ICONV: + * This symbol, if defined, indicates that exists and + * should be included. + */ +#$i_iconv I_ICONV /**/ + /* I_INTTYPES: * This symbol, if defined, indicates to the C program that it should * include . @@ -2323,7 +2348,7 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- * for a C initialization string. See the inc_version_list entry * in Porting/Glossary for more details. */ -#define PERL_INC_VERSION_LIST $inc_version_list /**/ +#define PERL_INC_VERSION_LIST $inc_version_list_init /**/ /* HAS_OFF64_T: * This symbol will be defined if the C compiler supports off64_t. @@ -2494,6 +2519,10 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- /* U64SIZE: * This symbol contains the sizeof(U64). */ +/* NV_PRESERVES_UV: + * This symbol, if defined, indicates that a variable of type NVTYPE + * can preserve all the bit of a variable of type UVSIZE. + */ #define IVTYPE $ivtype /**/ #define UVTYPE $uvtype /**/ #define I8TYPE $i8type /**/ @@ -2519,6 +2548,7 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #define I64SIZE $i64size /**/ #define U64SIZE $u64size /**/ #endif +#$d_nv_preserves_uv NV_PRESERVES_UV /* IVdf: * This symbol defines the format string used for printing a Perl IV @@ -2765,6 +2795,10 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #$uselonglong USE_LONG_LONG /**/ #endif +/* USE_MORE_BITS: + * This symbol, if defined, indicates that 64-bit interfaces and + * long doubles should be used when available. + */ #ifndef USE_MORE_BITS #$usemorebits USE_MORE_BITS /**/ #endif @@ -2773,7 +2807,7 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- * This symbol, if defined, indicates that Perl should * be built to use multiplicity. */ -#ifndef MULTIPLICTY +#ifndef MULTIPLICITY #$usemultiplicity MULTIPLICITY /**/ #endif diff --git a/configure.com b/configure.com index 3c121e0..27253b3 100644 --- a/configure.com +++ b/configure.com @@ -1876,11 +1876,13 @@ $ echo "" $ echo "It's time to specify which modules you want to build into $ echo "perl. Most of these are standard and should be chosen, though $ echo "you might, for example, want to build GDBM_File instead of -$ echo "SDBM_File if you have the GDBM library built on your machine +$ echo "SDBM_File if you have the GDBM library built on your machine. +$ echo "Whatever you do, make sure the re module is first or things will +$ echo "break badly" $ echo " $ echo "Which modules do you want to build into perl?" $! dflt = "Fcntl Errno File::Glob IO Opcode Byteloader Devel::Peek Devel::DProf Data::Dumper attrs re VMS::Stdio VMS::DCLsym B SDBM_File" -$ dflt = "Fcntl Errno File::Glob IO Opcode Devel::Peek Devel::DProf Data::Dumper attrs re VMS::Stdio VMS::DCLsym B SDBM_File" +$ dflt = "re Fcntl Errno File::Glob IO Opcode Devel::Peek Devel::DProf Data::Dumper attrs VMS::Stdio VMS::DCLsym B SDBM_File" $ if Using_Dec_C.eqs."Yes" $ THEN $ dflt = dflt + " POSIX" diff --git a/cop.h b/cop.h index ede2fce..734d2ea 100644 --- a/cop.h +++ b/cop.h @@ -1,6 +1,6 @@ /* cop.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -373,6 +373,36 @@ struct context { #define CXINC (cxstack_ix < cxstack_max ? ++cxstack_ix : (cxstack_ix = cxinc())) /* "gimme" values */ + +/* +=for apidoc AmU||G_SCALAR +Used to indicate scalar context. See C, C, and +L. + +=for apidoc AmU||G_ARRAY +Used to indicate array context. See C, C and +L. + +=for apidoc AmU||G_VOID +Used to indicate void context. See C and L. + +=for apidoc AmU||G_DISCARD +Indicates that arguments returned from a callback should be discarded. See +L. + +=for apidoc AmU||G_EVAL + +Used to force a Perl C wrapper around a callback. See +L. + +=for apidoc AmU||G_NOARGS + +Indicates that no arguments are being sent to a callback. See +L. + +=cut +*/ + #define G_SCALAR 0 #define G_ARRAY 1 #define G_VOID 128 /* skip this bit when adding flags below */ diff --git a/cv.h b/cv.h index 06cbb89..adb424e 100644 --- a/cv.h +++ b/cv.h @@ -1,6 +1,6 @@ /* cv.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -36,6 +36,16 @@ struct xpvcv { cv_flags_t xcv_flags; }; +/* +=for apidoc AmU||Nullcv +Null CV pointer. + +=for apidoc Am|HV*|CvSTASH|CV* cv +Returns the stash of the CV. + +=cut +*/ + #define Nullcv Null(CV*) #define CvSTASH(sv) ((XPVCV*)SvANY(sv))->xcv_stash diff --git a/cygwin/Makefile.SHs b/cygwin/Makefile.SHs index d466bde..8d77778 100644 --- a/cygwin/Makefile.SHs +++ b/cygwin/Makefile.SHs @@ -33,12 +33,9 @@ ld2: $& Makefile perlld ${src}/cygwin/ld2.in # install is included in Cygwin distributions, and we make a note of th # requirement in the README.cygwin file. However, let's give them # a warning. - @if test -n "`type $1 2>&1 | sed -n -e '/'$1'$/p'`" ; then \ - install -c -m 755 ld2 ${installbin}/ld2 ; \ - else \ + @install -c -m 755 ld2 ${installbin}/ld2 + @if test ! -f ${installbin}/ld2; then \ echo "*************************************************" ; \ - echo "Oh, no! You didn't read the README.cygwin" ; \ - echo "file, which stated that \"install\" was required." ; \ echo "Make will probably fail in a few more steps." ; \ echo "When it does, copy \"ld2\" to a directory in" ; \ echo "your path, other than \".\"." ; \ diff --git a/deb.c b/deb.c index 36b8ca3..0928c01 100644 --- a/deb.c +++ b/deb.c @@ -1,6 +1,6 @@ /* deb.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/doio.c b/doio.c index d2385f0..cb5f3e2 100644 --- a/doio.c +++ b/doio.c @@ -1,6 +1,6 @@ /* doio.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -217,7 +217,7 @@ Perl_do_open9(pTHX_ GV *gv, register char *name, I32 len, int as_raw, if (*type == '|') { if (num_svs && (tlen != 2 || type[1] != '-')) { unknown_desr: - Perl_croak(aTHX_ "Unknown open() mode '%.*s'", olen, oname); + Perl_croak(aTHX_ "Unknown open() mode '%.*s'", (int)olen, oname); } /*SUPPRESS 530*/ for (type++, tlen--; isSPACE(*type); type++, tlen--) ; @@ -573,7 +573,7 @@ Perl_nextargv(pTHX_ register GV *gv) } #endif #ifdef HAS_RENAME -#if !defined(DOSISH) && !defined(CYGWIN) +#if !defined(DOSISH) && !defined(__CYGWIN__) if (PerlLIO_rename(PL_oldname,SvPVX(sv)) < 0) { if (ckWARN_d(WARN_INPLACE)) Perl_warner(aTHX_ WARN_INPLACE, @@ -1257,7 +1257,7 @@ Perl_do_exec3(pTHX_ char *cmd, int fd, int do_report) if (strnEQ(cmd,"exec",4) && isSPACE(cmd[4])) goto doshell; - for (s = cmd; *s && isALPHA(*s); s++) ; /* catch VAR=val gizmo */ + for (s = cmd; *s && isALNUM(*s); s++) ; /* catch VAR=val gizmo */ if (*s == '=') goto doshell; diff --git a/doop.c b/doop.c index 990898d..a0fa729 100644 --- a/doop.c +++ b/doop.c @@ -1,6 +1,6 @@ /* doop.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -933,7 +933,7 @@ Perl_do_chop(pTHX_ register SV *astr, register SV *sv) s = SvPV(sv, len); if (len && !SvPOK(sv)) s = SvPV_force(sv, len); - if (IN_UTF8) { + if (DO_UTF8(sv)) { if (s && len) { char *send = s + len; char *start = s; @@ -946,12 +946,12 @@ Perl_do_chop(pTHX_ register SV *astr, register SV *sv) *s = '\0'; SvCUR_set(sv, s - start); SvNIOK_off(sv); + SvUTF8_on(astr); } else sv_setpvn(astr, "", 0); } - else - if (s && len) { + else if (s && len) { s += --len; sv_setpvn(astr, s, 1); *s = '\0'; @@ -961,7 +961,7 @@ Perl_do_chop(pTHX_ register SV *astr, register SV *sv) else sv_setpvn(astr, "", 0); SvSETMAGIC(sv); -} +} I32 Perl_do_chomp(pTHX_ register SV *sv) diff --git a/dump.c b/dump.c index ee64af5..569dc8c 100644 --- a/dump.c +++ b/dump.c @@ -1,6 +1,6 @@ /* dump.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -78,9 +78,9 @@ Perl_dump_sub(pTHX_ GV *gv) gv_fullname3(sv, gv, Nullch); Perl_dump_indent(aTHX_ 0, Perl_debug_log, "\nSUB %s = ", SvPVX(sv)); if (CvXSUB(GvCV(gv))) - Perl_dump_indent(aTHX_ 0, Perl_debug_log, "(xsub 0x%x %d)\n", + Perl_dump_indent(aTHX_ 0, Perl_debug_log, "(xsub 0x%lx %d)\n", (long)CvXSUB(GvCV(gv)), - CvXSUBANY(GvCV(gv)).any_i32); + (int)CvXSUBANY(GvCV(gv)).any_i32); else if (CvROOT(GvCV(gv))) op_dump(CvROOT(GvCV(gv))); else @@ -131,9 +131,9 @@ Perl_pv_display(pTHX_ SV *sv, char *pv, STRLEN cur, STRLEN len, STRLEN pvlim) } else { if (cur && isDIGIT(*(pv+1))) - Perl_sv_catpvf(aTHX_ sv, "\\%03o", *pv); + Perl_sv_catpvf(aTHX_ sv, "\\%03o", (U8)*pv); else - Perl_sv_catpvf(aTHX_ sv, "\\%o", *pv); + Perl_sv_catpvf(aTHX_ sv, "\\%o", (U8)*pv); } } sv_catpvn(sv, "\"", 1); @@ -392,7 +392,7 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, OP *o) if (o->op_type == OP_NULL) Perl_dump_indent(aTHX_ level, file, " (was %s)\n", PL_op_name[o->op_targ]); else - Perl_dump_indent(aTHX_ level, file, "TARG = %d\n", o->op_targ); + Perl_dump_indent(aTHX_ level, file, "TARG = %ld\n", (long)o->op_targ); } #ifdef DUMPADDR Perl_dump_indent(aTHX_ level, file, "ADDR = 0x%"UVxf" => 0x%"UVxf"\n", (UV)o, (UV)o->op_next); @@ -701,7 +701,7 @@ Perl_do_magic_dump(pTHX_ I32 level, PerlIO *file, MAGIC *mg, I32 nest, I32 maxne do_sv_dump(level+2, file, mg->mg_obj, nest+1, maxnest, dumpops, pvlim); /* MG is already +1 */ } if (mg->mg_len) - Perl_dump_indent(aTHX_ level, file, " MG_LEN = %d\n", mg->mg_len); + Perl_dump_indent(aTHX_ level, file, " MG_LEN = %ld\n", (long)mg->mg_len); if (mg->mg_ptr) { Perl_dump_indent(aTHX_ level, file, " MG_PTR = 0x%"UVxf, PTR2UV(mg->mg_ptr)); if (mg->mg_len >= 0) { @@ -782,8 +782,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo Perl_sv_setpvf(aTHX_ d, "(0x%"UVxf") at 0x%"UVxf"\n%*s REFCNT = %"IVdf"\n%*s FLAGS = (", PTR2UV(SvANY(sv)), PTR2UV(sv), - PL_dumpindent*level, "", (IV)SvREFCNT(sv), - PL_dumpindent*level, ""); + (int)(PL_dumpindent*level), "", (IV)SvREFCNT(sv), + (int)(PL_dumpindent*level), ""); if (flags & SVs_PADBUSY) sv_catpv(d, "PADBUSY,"); if (flags & SVs_PADTMP) sv_catpv(d, "PADTMP,"); @@ -846,6 +846,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo default: if (SvEVALED(sv)) sv_catpv(d, "EVALED,"); if (SvIsUV(sv)) sv_catpv(d, "IsUV,"); + if (SvUTF8(sv)) sv_catpv(d, "UTF8"); break; case SVt_PVBM: if (SvTAIL(sv)) sv_catpv(d, "TAIL,"); @@ -1089,7 +1090,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo Perl_dump_indent(aTHX_ level, file, " MUTEXP = 0x%"UVxf"\n", PTR2UV(CvMUTEXP(sv))); Perl_dump_indent(aTHX_ level, file, " OWNER = 0x%"UVxf"\n", PTR2UV(CvOWNER(sv))); #endif /* USE_THREADS */ - Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%"UVxf"\n", CvFLAGS(sv)); + Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%"UVxf"\n", (UV)CvFLAGS(sv)); if (type == SVt_PVFM) Perl_dump_indent(aTHX_ level, file, " LINES = %"IVdf"\n", (IV)FmLINES(sv)); Perl_dump_indent(aTHX_ level, file, " PADLIST = 0x%"UVxf"\n", PTR2UV(CvPADLIST(sv))); @@ -1107,7 +1108,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo /* %5d below is enough whitespace. */ file, "%5d. 0x%"UVxf" (%s\"%s\" %"IVdf"-%"IVdf")\n", - ix, PTR2UV(ppad[ix]), + (int)ix, PTR2UV(ppad[ix]), SvFAKE(pname[ix]) ? "FAKE " : "", SvPVX(pname[ix]), (IV)SvNVX(pname[ix]), diff --git a/eg/cgi/index.html b/eg/cgi/index.html index 4125b28..133ecc4 100644 --- a/eg/cgi/index.html +++ b/eg/cgi/index.html @@ -108,12 +108,12 @@ or Internet Explorer 3.0 and higher
  • CGI.pm documentation -
  • Download the CGI.pm distribution +
  • Download the CGI.pm distribution

  • Lincoln D. Stein, lstein@genome.wi.mit.edu
    Whitehead Institute/MIT Center for Genome Research
    -Last modified: Tue Nov 24 18:07:15 MET 1998 +Last modified: Wed Jun 23 15:31:47 EDT 1999 diff --git a/embed.h b/embed.h index 27685ff..61ffadf 100644 --- a/embed.h +++ b/embed.h @@ -712,6 +712,7 @@ #define vivify_defelem Perl_vivify_defelem #define vivify_ref Perl_vivify_ref #define wait4pid Perl_wait4pid +#define report_closed_fh Perl_report_closed_fh #define report_uninit Perl_report_uninit #define warn Perl_warn #define vwarn Perl_vwarn @@ -857,6 +858,7 @@ #define too_many_arguments S_too_many_arguments #define op_clear S_op_clear #define null S_null +#define pad_addlex S_pad_addlex #define pad_findlex S_pad_findlex #define newDEFSVOP S_newDEFSVOP #define new_logop S_new_logop @@ -2129,6 +2131,7 @@ #define vivify_defelem(a) Perl_vivify_defelem(aTHX_ a) #define vivify_ref(a,b) Perl_vivify_ref(aTHX_ a,b) #define wait4pid(a,b,c) Perl_wait4pid(aTHX_ a,b,c) +#define report_closed_fh(a,b,c,d) Perl_report_closed_fh(aTHX_ a,b,c,d) #define report_uninit() Perl_report_uninit(aTHX) #define vwarn(a,b) Perl_vwarn(aTHX_ a,b) #define vwarner(a,b,c) Perl_vwarner(aTHX_ a,b,c) @@ -2268,6 +2271,7 @@ #define too_many_arguments(a,b) S_too_many_arguments(aTHX_ a,b) #define op_clear(a) S_op_clear(aTHX_ a) #define null(a) S_null(aTHX_ a) +#define pad_addlex(a) S_pad_addlex(aTHX_ a) #define pad_findlex(a,b,c,d,e,f,g) S_pad_findlex(aTHX_ a,b,c,d,e,f,g) #define newDEFSVOP() S_newDEFSVOP(aTHX) #define new_logop(a,b,c,d) S_new_logop(aTHX_ a,b,c,d) @@ -4172,6 +4176,8 @@ #define vivify_ref Perl_vivify_ref #define Perl_wait4pid CPerlObj::Perl_wait4pid #define wait4pid Perl_wait4pid +#define Perl_report_closed_fh CPerlObj::Perl_report_closed_fh +#define report_closed_fh Perl_report_closed_fh #define Perl_report_uninit CPerlObj::Perl_report_uninit #define report_uninit Perl_report_uninit #define Perl_warn CPerlObj::Perl_warn @@ -4435,6 +4441,8 @@ #define op_clear S_op_clear #define S_null CPerlObj::S_null #define null S_null +#define S_pad_addlex CPerlObj::S_pad_addlex +#define pad_addlex S_pad_addlex #define S_pad_findlex CPerlObj::S_pad_findlex #define pad_findlex S_pad_findlex #define S_newDEFSVOP CPerlObj::S_newDEFSVOP diff --git a/embed.pl b/embed.pl index 84d689e..80dda09 100755 --- a/embed.pl +++ b/embed.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl -w -require 5.003; +require 5.003; # keep this compatible, an old perl is all we may have before + # we build the new one # # See database of global and static function prototypes at the __END__. @@ -134,17 +135,25 @@ sub write_protos { } $ret .= ")"; $ret .= " __attribute__((noreturn))" if $flags =~ /r/; + if( $flags =~ /f/ ) { + my $prefix = $flags =~ /n/ ? '' : 'pTHX_'; + my $args = scalar @args; + $ret .= "\n#ifdef CHECK_FORMAT\n"; + $ret .= sprintf " __attribute__((format(printf,%s%d,%s%d)))", + $prefix, $args - 1, $prefix, $args; + $ret .= "\n#endif\n"; + } $ret .= ";\n"; } $ret; } -# generates global.sym, and populates %global with global symbols +# generates global.sym (API export list), and populates %global with global symbols sub write_global_sym { my $ret = ""; if (@_ > 1) { my ($flags,$retval,$func,@args) = @_; - unless ($flags =~ /[sx]/) { + if ($flags =~ /A/ && $flags !~ /x/) { # public API, so export $func = "Perl_$func" if $flags =~ /p/; $ret = "$func\n"; } @@ -251,7 +260,7 @@ sub hide ($$) { "#define $from" . "\t" x ($t < 3 ? 3 - $t : 1) . "$to\n"; } -sub objxsub_var ($$) { +sub bincompat_var ($$) { my ($pfx, $sym) = @_; my $arg = ($pfx eq 'G' ? 'NULL' : 'aTHXo'); undefine("PL_$sym") . hide("PL_$sym", "(*Perl_${pfx}${sym}_ptr($arg))"); @@ -702,27 +711,9 @@ print OBX <<'EOT'; #ifndef __objXSUB_h__ #define __objXSUB_h__ -/* Variables */ - -EOT +/* method calls via pPerl (static functions without a "this" pointer need these) */ -foreach my $sym (sort keys %intrp) { - print OBX objxsub_var('I',$sym); -} - -foreach my $sym (sort keys %thread) { - print OBX objxsub_var('T',$sym); -} - -foreach my $sym (sort keys %globvar) { - print OBX objxsub_var('G',$sym); -} - -print OBX <<'EOT'; - -/* Functions */ - -#if defined(PERL_OBJECT) +#if defined(PERL_CORE) && defined(PERL_OBJECT) /* XXX soon to be eliminated, only a few things in PERLCORE need these now */ @@ -736,7 +727,7 @@ walk_table { } else { my ($flags,$retval,$func,@args) = @_; - unless ($flags =~ /[js]/) { + if ($flags =~ /A/ && $flags !~ /j/) { # API function needing macros if ($flags =~ /p/) { $ret .= undefine("Perl_$func") . hide("Perl_$func","pPerl->Perl_$func"); $ret .= undefine($func) . hide($func,"Perl_$func"); @@ -749,15 +740,16 @@ walk_table { $ret; } \*OBX; -for $sym (sort keys %ppsym) { - $sym =~ s/^Perl_//; - print OBX undefine("Perl_$sym") . hide("Perl_$sym", "pPerl->Perl_$sym"); - print OBX undefine($sym) . hide($sym, "Perl_$sym"); -} +# NOTE: not part of API +#for $sym (sort keys %ppsym) { +# $sym =~ s/^Perl_//; +# print OBX undefine("Perl_$sym") . hide("Perl_$sym", "pPerl->Perl_$sym"); +# print OBX undefine($sym) . hide($sym, "Perl_$sym"); +#} print OBX <<'EOT'; -#endif /* PERL_OBJECT */ +#endif /* PERL_CORE && PERL_OBJECT */ #endif /* __objXSUB_h__ */ EOT @@ -775,8 +767,10 @@ print CAPIH <<'EOT'; */ /* declare accessor functions for Perl variables */ +#ifndef __perlapi_h__ +#define __perlapi_h__ -#if defined(PERL_OBJECT) || defined (PERL_CAPI) +#if defined(PERL_OBJECT) || defined (MULTIPLICITY) #if defined(PERL_OBJECT) # undef aTHXo @@ -808,10 +802,69 @@ START_EXTERN_C END_EXTERN_C -#endif /* PERL_OBJECT || PERL_CAPI */ +#if defined(PERL_CORE) + +/* accessor functions for Perl variables (provide binary compatibility) */ + +/* these need to be mentioned here, or most linkers won't put them in + the perl executable */ + +#ifndef PERL_NO_FORCE_LINK + +START_EXTERN_C + +#ifndef DOINIT +EXT void *PL_force_link_funcs[]; +#else +EXT void *PL_force_link_funcs[] = { +#undef PERLVAR +#undef PERLVARA +#undef PERLVARI +#undef PERLVARIC +#define PERLVAR(v,t) (void*)Perl_##v##_ptr, +#define PERLVARA(v,n,t) PERLVAR(v,t) +#define PERLVARI(v,t,i) PERLVAR(v,t) +#define PERLVARIC(v,t,i) PERLVAR(v,t) + +#include "thrdvar.h" +#include "intrpvar.h" +#include "perlvars.h" + +#undef PERLVAR +#undef PERLVARA +#undef PERLVARI +#undef PERLVARIC +}; +#endif /* DOINIT */ + +START_EXTERN_C + +#endif /* PERL_NO_FORCE_LINK */ + +#else /* !PERL_CORE */ EOT +foreach my $sym (sort keys %intrp) { + print CAPIH bincompat_var('I',$sym); +} + +foreach my $sym (sort keys %thread) { + print CAPIH bincompat_var('T',$sym); +} + +foreach my $sym (sort keys %globvar) { + print CAPIH bincompat_var('G',$sym); +} + +print CAPIH <<'EOT'; + +#endif /* !PERL_CORE */ +#endif /* PERL_OBJECT || MULTIPLICITY */ + +#endif /* __perlapi_h__ */ + +EOT print CAPI <<'EOT'; /* !!!!!!! DO NOT EDIT THIS FILE !!!!!!! @@ -823,7 +876,7 @@ print CAPI <<'EOT'; #include "perl.h" #include "perlapi.h" -#if defined(PERL_OBJECT) +#if defined(PERL_OBJECT) || defined (MULTIPLICITY) /* accessor functions for Perl variables (provides binary compatibility) */ START_EXTERN_C @@ -832,10 +885,19 @@ START_EXTERN_C #undef PERLVARA #undef PERLVARI #undef PERLVARIC + +#if defined(PERL_OBJECT) #define PERLVAR(v,t) t* Perl_##v##_ptr(pTHXo) \ { return &(aTHXo->interp.v); } #define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHXo) \ { return &(aTHXo->interp.v); } +#else /* MULTIPLICITY */ +#define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \ + { return &(aTHX->v); } +#define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \ + { return &(aTHX->v); } +#endif + #define PERLVARI(v,t,i) PERLVAR(v,t) #define PERLVARIC(v,t,i) PERLVAR(v, const t) @@ -855,6 +917,10 @@ START_EXTERN_C #undef PERLVARI #undef PERLVARIC +#if defined(PERL_OBJECT) + +/* C-API layer for PERL_OBJECT */ + EOT # functions that take va_list* for implementing vararg functions @@ -879,7 +945,8 @@ my %vfuncs = qw( sub emit_func { my ($addcontext, $rettype,$func,@args) = @_; my @aargs = @args; - for my $a (@aargs) { $a =~ s/^.*\b(\w+)$/$1/ } + my $a; + for $a (@aargs) { $a =~ s/^.*\b(\w+)$/$1/ } my $ctxarg = ''; if (not $addcontext) { $ctxarg = 'pTHXo'; @@ -928,7 +995,8 @@ EOT } # XXXX temporary hack -for my $sym (qw( +my $sym; +for $sym (qw( perl_construct perl_destruct perl_free @@ -948,7 +1016,7 @@ walk_table { else { my ($flags,$retval,$func,@args) = @_; return $ret if exists $skipapi_funcs{$func}; - unless ($flags =~ /[js]/) { + if ($flags =~ /A/ && $flags !~ /j/) { # in public API, needed for XSUBS $ret .= "\n"; my $addctx = 1 if $flags =~ /n/; if ($flags =~ /p/) { @@ -964,17 +1032,18 @@ walk_table { $ret; } \*CAPI; -for $sym (sort keys %ppsym) { - $sym =~ s/^Perl_//; - print CAPI "\n"; - print CAPI undefine("Perl_$sym"); - if ($sym =~ /^ck_/) { - print CAPI emit_func(0, 'OP *',"Perl_$sym",'OP *o'); - } - else { # pp_foo - print CAPI emit_func(0, 'OP *',"Perl_$sym"); - } -} +# NOTE: not part of the API +#for $sym (sort keys %ppsym) { +# $sym =~ s/^Perl_//; +# print CAPI "\n"; +# print CAPI undefine("Perl_$sym"); +# if ($sym =~ /^ck_/) { +# print CAPI emit_func(0, 'OP *',"Perl_$sym",'OP *o'); +# } +# else { # pp_foo +# print CAPI emit_func(0, 'OP *',"Perl_$sym"); +# } +#} print CAPI <<'EOT'; @@ -991,8 +1060,204 @@ Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...) END_EXTERN_C #endif /* PERL_OBJECT */ +#endif /* PERL_OBJECT || MULTIPLICITY */ EOT +close(CAPI); + +# autogenerate documentation from comments in source files + +my %apidocs; +my %gutsdocs; +my %docfuncs; + +sub autodoc ($) { # parse a file and extract documentation info + my($fh) = @_; + my($in, $doc); + +FUNC: + while (defined($in = <$fh>)) { + if ($in =~ /^=for\s+apidoc\s+(.*)\n/) { + my $proto = $1; + $proto = "||$proto" unless $proto =~ /\|/; + my($flags, $ret, $name, @args) = split /\|/, $proto; + my $docs = ""; +DOC: + while (defined($doc = <$fh>)) { + last DOC if $doc =~ /^=\w+/; + $docs .= $doc; + } + $docs = "\n$docs" if $docs and $docs !~ /^\n/; + if ($flags =~ /m/) { + if ($flags =~ /A/) { + $apidocs{$name} = [$flags, $docs, $ret, @args]; + } + else { + $gutsdocs{$name} = [$flags, $docs, $ret, @args]; + } + } + else { + $docfuncs{$name} = [$flags, $docs, $ret, @args]; + } + if ($doc =~ /^=for/) { + $in = $doc; + redo FUNC; + } + } + } +} + +sub docout ($$$) { # output the docs for one function + my($fh, $name, $docref) = @_; + my($flags, $docs, $ret, @args) = @$docref; + + $docs .= "NOTE: the perl_ form of this function is deprecated.\n\n" + if $flags =~ /p/; + + print $fh "=item $name\n$docs"; + + if ($flags =~ /U/) { # no usage + # nothing + } elsif ($flags =~ /s/) { # semicolon ("dTHR;") + print $fh "\t\t$name;\n\n"; + } elsif ($flags =~ /n/) { # no args + print $fh "\t$ret\t$name\n\n"; + } else { # full usage + print $fh "\t$ret\t$name"; + print $fh "(" . join(", ", @args) . ")"; + print $fh "\n\n"; + } +} + +my $file; +for $file (glob('*.c'), glob('*.h')) { + open F, "< $file" or die "Cannot open $file for docs: $!\n"; + autodoc(\*F); + close F or die "Error closing $file: $!\n"; +} + +unlink "pod/perlapi.pod"; +open (DOC, ">pod/perlapi.pod") or + die "Can't create pod/perlapi.pod: $!\n"; + +walk_table { # load documented functions into approriate hash + if (@_ > 1) { + my($flags, $retval, $func, @args) = @_; + return "" unless $flags =~ /d/; + $func =~ s/\t//g; $flags =~ s/p//; # clean up fields from embed.pl + $retval =~ s/\t//; + if ($flags =~ /A/) { + my $docref = delete $docfuncs{$func}; + warn "no docs for $func\n" unless $docref and @$docref; + $apidocs{$func} = [$docref->[0] . 'A', $docref->[1], $retval, @args]; + } else { + my $docref = delete $docfuncs{$func}; + $gutsdocs{$func} = [$docref->[0], $docref->[1], $retval, @args]; + } + } + return ""; +} \*DOC; + +for (sort keys %docfuncs) { + warn "Unable to place $_!\n"; +} + +print DOC <<'_EOB_'; +=head1 NAME + +perlapi - autogenerated documentation for the perl public API + +=head1 DESCRIPTION + +This file contains the documentation of the perl public API generated by +embed.pl, specifically a listing of functions, macros, flags, and variables +that may be used by extension writers. The interfaces of any functions that +are not listed here are subject to change without notice. For this reason, +blindly using functions listed in proto.h is to be avoided when writing +extensions. + +Note that all Perl API global variables must be referenced with the C +prefix. Some macros are provided for compatibility with the older, +unadorned names, but this support may be disabled in a future release. + +The listing is alphabetical, case insensitive. + +=over 8 + +_EOB_ + +my $key; +for $key (sort { uc($a) cmp uc($b); } keys %apidocs) { # case insensitive sort + docout(\*DOC, $key, $apidocs{$key}); +} + +print DOC <<'_EOE_'; +=back + +=head1 AUTHORS + +Until May 1997, this document was maintained by Jeff Okamoto +. It is now maintained as part of Perl itself. + +With lots of help and suggestions from Dean Roehrich, Malcolm Beattie, +Andreas Koenig, Paul Hudson, Ilya Zakharevich, Paul Marquess, Neil +Bowers, Matthew Green, Tim Bunce, Spider Boardman, Ulrich Pfeifer, +Stephen McCamant, and Gurusamy Sarathy. + +API Listing originally by Dean Roehrich . + +Updated to be autogenerated from comments in the source by Benjamin Stuhl. + +=head1 SEE ALSO + +perlguts(1), perlxs(1), perlxstut(1), perlintern(1) + +_EOE_ + + +close(DOC); + +open(GUTS, ">pod/perlintern.pod") or + die "Unable to create pod/perlintern.pod: $!\n"; +print GUTS <<'END'; +=head1 NAME + +perlintern - autogenerated documentation of purely B + Perl functions + +=head1 DESCRIPTION + +This file is the autogenerated documentation of functions in the +Perl intrepreter that are documented using Perl's internal documentation +format but are not marked as part of the Perl API. In other words, +B! + +=over 8 + +END + +for $key (sort { uc($a) cmp uc($b); } keys %gutsdocs) { + docout(\*GUTS, $key, $gutsdocs{$key}); +} + +print GUTS <<'END'; +=back + +=head1 AUTHORS + +The autodocumentation system was orignally added to the Perl core by +Benjamin Stuhl. Documentation is by whoever was kind enough to +document their functions. + +=head1 SEE ALSO + +perlguts(1), perlapi(1) + +END + +close GUTS; + + __END__ : Lines are of the form: @@ -1002,10 +1267,13 @@ __END__ : Leading and trailing whitespace will be ignored in each component. : : flags are single letters with following meanings: +: A member of public API +: d function has documentation with its source : s static function, should have an S_ prefix in source -: file +: file : n has no implicit interpreter/thread context argument : p function has a Perl_ prefix +: f function takes printf style format string, varargs : r function never returns : o has no compatibility macro (#define foo Perl_foo) : j not a member of CPerlObj @@ -1015,33 +1283,30 @@ __END__ : : New global functions should be added at the end for binary compatibility : in some configurations. -: -: TODO: 1) Add a flag to mark the functions that are part of the public API. -: 2) Add a field for documentation, so that L -: may be autogenerated. START_EXTERN_C #if defined(PERL_IMPLICIT_SYS) -jno |PerlInterpreter* |perl_alloc_using \ +Ajno |PerlInterpreter* |perl_alloc_using \ |struct IPerlMem* m|struct IPerlMem* ms \ |struct IPerlMem* mp|struct IPerlEnv* e \ |struct IPerlStdIO* io|struct IPerlLIO* lio \ |struct IPerlDir* d|struct IPerlSock* s \ |struct IPerlProc* p #else -jno |PerlInterpreter* |perl_alloc +Ajnod |PerlInterpreter* |perl_alloc #endif -jno |void |perl_construct |PerlInterpreter* interp -jno |void |perl_destruct |PerlInterpreter* interp -jno |void |perl_free |PerlInterpreter* interp -jno |int |perl_run |PerlInterpreter* interp -jno |int |perl_parse |PerlInterpreter* interp|XSINIT_t xsinit \ +Ajnod |void |perl_construct |PerlInterpreter* interp +Ajnod |void |perl_destruct |PerlInterpreter* interp +Ajnod |void |perl_free |PerlInterpreter* interp +Ajnod |int |perl_run |PerlInterpreter* interp +Ajnod |int |perl_parse |PerlInterpreter* interp|XSINIT_t xsinit \ |int argc|char** argv|char** env #if defined(USE_ITHREADS) -jno |PerlInterpreter*|perl_clone|PerlInterpreter* interp, UV flags +: XXX: perl_clone needs docs +Ajno |PerlInterpreter*|perl_clone|PerlInterpreter* interp, UV flags # if defined(PERL_IMPLICIT_SYS) -jno |PerlInterpreter*|perl_clone_using|PerlInterpreter *interp|UV flags \ +Ajno |PerlInterpreter*|perl_clone_using|PerlInterpreter *interp|UV flags \ |struct IPerlMem* m|struct IPerlMem* ms \ |struct IPerlMem* mp|struct IPerlEnv* e \ |struct IPerlStdIO* io|struct IPerlLIO* lio \ @@ -1051,10 +1316,10 @@ jno |PerlInterpreter*|perl_clone_using|PerlInterpreter *interp|UV flags \ #endif #if defined(MYMALLOC) -jnop |Malloc_t|malloc |MEM_SIZE nbytes -jnop |Malloc_t|calloc |MEM_SIZE elements|MEM_SIZE size -jnop |Malloc_t|realloc |Malloc_t where|MEM_SIZE nbytes -jnop |Free_t |mfree |Malloc_t where +Ajnop |Malloc_t|malloc |MEM_SIZE nbytes +Ajnop |Malloc_t|calloc |MEM_SIZE elements|MEM_SIZE size +Ajnop |Malloc_t|realloc |Malloc_t where|MEM_SIZE nbytes +Ajnop |Free_t |mfree |Malloc_t where jnp |MEM_SIZE|malloced_size |void *p #endif @@ -1079,99 +1344,99 @@ public: START_EXTERN_C #endif # include "pp_proto.h" -p |SV* |amagic_call |SV* left|SV* right|int method|int dir -p |bool |Gv_AMupdate |HV* stash +Ap |SV* |amagic_call |SV* left|SV* right|int method|int dir +Ap |bool |Gv_AMupdate |HV* stash p |OP* |append_elem |I32 optype|OP* head|OP* tail p |OP* |append_list |I32 optype|LISTOP* first|LISTOP* last p |I32 |apply |I32 type|SV** mark|SV** sp -p |SV* |avhv_delete_ent|AV *ar|SV* keysv|I32 flags|U32 hash -p |bool |avhv_exists_ent|AV *ar|SV* keysv|U32 hash -p |SV** |avhv_fetch_ent |AV *ar|SV* keysv|I32 lval|U32 hash -p |HE* |avhv_iternext |AV *ar -p |SV* |avhv_iterval |AV *ar|HE* entry -p |HV* |avhv_keys |AV *ar -p |void |av_clear |AV* ar -p |SV* |av_delete |AV* ar|I32 key|I32 flags -p |bool |av_exists |AV* ar|I32 key -p |void |av_extend |AV* ar|I32 key -p |AV* |av_fake |I32 size|SV** svp -p |SV** |av_fetch |AV* ar|I32 key|I32 lval -p |void |av_fill |AV* ar|I32 fill -p |I32 |av_len |AV* ar -p |AV* |av_make |I32 size|SV** svp -p |SV* |av_pop |AV* ar -p |void |av_push |AV* ar|SV* val -p |void |av_reify |AV* ar -p |SV* |av_shift |AV* ar -p |SV** |av_store |AV* ar|I32 key|SV* val -p |void |av_undef |AV* ar -p |void |av_unshift |AV* ar|I32 num +Ap |SV* |avhv_delete_ent|AV *ar|SV* keysv|I32 flags|U32 hash +Ap |bool |avhv_exists_ent|AV *ar|SV* keysv|U32 hash +Ap |SV** |avhv_fetch_ent |AV *ar|SV* keysv|I32 lval|U32 hash +Ap |HE* |avhv_iternext |AV *ar +Ap |SV* |avhv_iterval |AV *ar|HE* entry +Ap |HV* |avhv_keys |AV *ar +Apd |void |av_clear |AV* ar +Ap |SV* |av_delete |AV* ar|I32 key|I32 flags +Ap |bool |av_exists |AV* ar|I32 key +Apd |void |av_extend |AV* ar|I32 key +Ap |AV* |av_fake |I32 size|SV** svp +Apd |SV** |av_fetch |AV* ar|I32 key|I32 lval +Ap |void |av_fill |AV* ar|I32 fill +Apd |I32 |av_len |AV* ar +Apd |AV* |av_make |I32 size|SV** svp +Apd |SV* |av_pop |AV* ar +Apd |void |av_push |AV* ar|SV* val +Ap |void |av_reify |AV* ar +Apd |SV* |av_shift |AV* ar +Apd |SV** |av_store |AV* ar|I32 key|SV* val +Apd |void |av_undef |AV* ar +Apd |void |av_unshift |AV* ar|I32 num p |OP* |bind_match |I32 type|OP* left|OP* pat p |OP* |block_end |I32 floor|OP* seq -p |I32 |block_gimme +Ap |I32 |block_gimme p |int |block_start |int full p |void |boot_core_UNIVERSAL -p |void |call_list |I32 oldscope|AV* av_list +Ap |void |call_list |I32 oldscope|AV* av_list p |bool |cando |Mode_t mode|Uid_t effective|Stat_t* statbufp -p |U32 |cast_ulong |NV f -p |I32 |cast_i32 |NV f -p |IV |cast_iv |NV f -p |UV |cast_uv |NV f +Ap |U32 |cast_ulong |NV f +Ap |I32 |cast_i32 |NV f +Ap |IV |cast_iv |NV f +Ap |UV |cast_uv |NV f #if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP) -p |I32 |my_chsize |int fd|Off_t length +Ap |I32 |my_chsize |int fd|Off_t length #endif #if defined(USE_THREADS) -p |MAGIC* |condpair_magic |SV *sv +Ap |MAGIC* |condpair_magic |SV *sv #endif p |OP* |convert |I32 optype|I32 flags|OP* o -pr |void |croak |const char* pat|... -pr |void |vcroak |const char* pat|va_list* args +Afprd |void |croak |const char* pat|... +Apr |void |vcroak |const char* pat|va_list* args #if defined(PERL_IMPLICIT_CONTEXT) -nrp |void |croak_nocontext|const char* pat|... -np |OP* |die_nocontext |const char* pat|... -np |void |deb_nocontext |const char* pat|... -np |char* |form_nocontext |const char* pat|... -np |SV* |mess_nocontext |const char* pat|... -np |void |warn_nocontext |const char* pat|... -np |void |warner_nocontext|U32 err|const char* pat|... -np |SV* |newSVpvf_nocontext|const char* pat|... -np |void |sv_catpvf_nocontext|SV* sv|const char* pat|... -np |void |sv_setpvf_nocontext|SV* sv|const char* pat|... -np |void |sv_catpvf_mg_nocontext|SV* sv|const char* pat|... -np |void |sv_setpvf_mg_nocontext|SV* sv|const char* pat|... -np |int |fprintf_nocontext|PerlIO* stream|const char* fmt|... +Afnrp |void |croak_nocontext|const char* pat|... +Afnp |OP* |die_nocontext |const char* pat|... +Afnp |void |deb_nocontext |const char* pat|... +Afnp |char* |form_nocontext |const char* pat|... +Afnp |SV* |mess_nocontext |const char* pat|... +Afnp |void |warn_nocontext |const char* pat|... +Afnp |void |warner_nocontext|U32 err|const char* pat|... +Afnp |SV* |newSVpvf_nocontext|const char* pat|... +Afnp |void |sv_catpvf_nocontext|SV* sv|const char* pat|... +Afnp |void |sv_setpvf_nocontext|SV* sv|const char* pat|... +Afnp |void |sv_catpvf_mg_nocontext|SV* sv|const char* pat|... +Afnp |void |sv_setpvf_mg_nocontext|SV* sv|const char* pat|... +Afnp |int |fprintf_nocontext|PerlIO* stream|const char* fmt|... #endif p |void |cv_ckproto |CV* cv|GV* gv|char* p p |CV* |cv_clone |CV* proto p |SV* |cv_const_sv |CV* cv p |SV* |op_const_sv |OP* o|CV* cv p |void |cv_undef |CV* cv -p |void |cx_dump |PERL_CONTEXT* cs -p |SV* |filter_add |filter_t funcp|SV* datasv -p |void |filter_del |filter_t funcp -p |I32 |filter_read |int idx|SV* buffer|int maxlen -p |char** |get_op_descs -p |char** |get_op_names +Ap |void |cx_dump |PERL_CONTEXT* cs +Ap |SV* |filter_add |filter_t funcp|SV* datasv +Ap |void |filter_del |filter_t funcp +Ap |I32 |filter_read |int idx|SV* buffer|int maxlen +Ap |char** |get_op_descs +Ap |char** |get_op_names p |char* |get_no_modify p |U32* |get_opargs -p |PPADDR_t*|get_ppaddr +Ap |PPADDR_t*|get_ppaddr p |I32 |cxinc -p |void |deb |const char* pat|... -p |void |vdeb |const char* pat|va_list* args -p |void |debprofdump -p |I32 |debop |OP* o -p |I32 |debstack -p |I32 |debstackptrs -p |char* |delimcpy |char* to|char* toend|char* from \ +Afp |void |deb |const char* pat|... +Ap |void |vdeb |const char* pat|va_list* args +Ap |void |debprofdump +Ap |I32 |debop |OP* o +Ap |I32 |debstack +Ap |I32 |debstackptrs +Ap |char* |delimcpy |char* to|char* toend|char* from \ |char* fromend|int delim|I32* retlen p |void |deprecate |char* s -p |OP* |die |const char* pat|... +Afp |OP* |die |const char* pat|... p |OP* |vdie |const char* pat|va_list* args p |OP* |die_where |char* message|STRLEN msglen -p |void |dounwind |I32 cxix +Ap |void |dounwind |I32 cxix p |bool |do_aexec |SV* really|SV** mark|SV** sp p |bool |do_aexec5 |SV* really|SV** mark|SV** sp|int fd|int flag -p |int |do_binmode |PerlIO *fp|int iotype|int flag +Ap |int |do_binmode |PerlIO *fp|int iotype|int flag p |void |do_chop |SV* asv|SV* sv p |bool |do_close |GV* gv|bool not_implicit p |bool |do_eof |GV* gv @@ -1190,9 +1455,9 @@ p |I32 |do_shmio |I32 optype|SV** mark|SV** sp #endif p |void |do_join |SV* sv|SV* del|SV** mark|SV** sp p |OP* |do_kv -p |bool |do_open |GV* gv|char* name|I32 len|int as_raw \ +Ap |bool |do_open |GV* gv|char* name|I32 len|int as_raw \ |int rawmode|int rawperm|PerlIO* supplied_fp -p |bool |do_open9 |GV *gv|char *name|I32 len|int as_raw \ +Ap |bool |do_open9 |GV *gv|char *name|I32 len|int as_raw \ |int rawmode|int rawperm|PerlIO *supplied_fp \ |SV *svs|I32 num p |void |do_pipe |SV* sv|GV* rgv|GV* wgv @@ -1208,20 +1473,20 @@ p |UV |do_vecget |SV* sv|I32 offset|I32 size p |void |do_vecset |SV* sv p |void |do_vop |I32 optype|SV* sv|SV* left|SV* right p |OP* |dofile |OP* term -p |I32 |dowantarray -p |void |dump_all -p |void |dump_eval +Ap |I32 |dowantarray +Ap |void |dump_all +Ap |void |dump_eval #if defined(DUMP_FDS) -p |void |dump_fds |char* s +Ap |void |dump_fds |char* s #endif -p |void |dump_form |GV* gv -p |void |gv_dump |GV* gv -p |void |op_dump |OP* arg -p |void |pmop_dump |PMOP* pm -p |void |dump_packsubs |HV* stash -p |void |dump_sub |GV* gv -p |void |fbm_compile |SV* sv|U32 flags -p |char* |fbm_instr |unsigned char* big|unsigned char* bigend \ +Ap |void |dump_form |GV* gv +Ap |void |gv_dump |GV* gv +Ap |void |op_dump |OP* arg +Ap |void |pmop_dump |PMOP* pm +Ap |void |dump_packsubs |HV* stash +Ap |void |dump_sub |GV* gv +Apd |void |fbm_compile |SV* sv|U32 flags +Apd |char* |fbm_instr |unsigned char* big|unsigned char* bigend \ |SV* littlesv|U32 flags p |char* |find_script |char *scriptname|bool dosearch \ |char **search_ext|I32 flags @@ -1230,126 +1495,126 @@ p |PADOFFSET|find_threadsv|const char *name #endif p |OP* |force_list |OP* arg p |OP* |fold_constants |OP* arg -p |char* |form |const char* pat|... -p |char* |vform |const char* pat|va_list* args -p |void |free_tmps +Afp |char* |form |const char* pat|... +Ap |char* |vform |const char* pat|va_list* args +Ap |void |free_tmps p |OP* |gen_constant_list|OP* o #if !defined(HAS_GETENV_LEN) p |char* |getenv_len |char* key|unsigned long *len #endif -p |void |gp_free |GV* gv -p |GP* |gp_ref |GP* gp -p |GV* |gv_AVadd |GV* gv -p |GV* |gv_HVadd |GV* gv -p |GV* |gv_IOadd |GV* gv -p |GV* |gv_autoload4 |HV* stash|const char* name|STRLEN len \ +Ap |void |gp_free |GV* gv +Ap |GP* |gp_ref |GP* gp +Ap |GV* |gv_AVadd |GV* gv +Ap |GV* |gv_HVadd |GV* gv +Ap |GV* |gv_IOadd |GV* gv +Ap |GV* |gv_autoload4 |HV* stash|const char* name|STRLEN len \ |I32 method -p |void |gv_check |HV* stash -p |void |gv_efullname |SV* sv|GV* gv -p |void |gv_efullname3 |SV* sv|GV* gv|const char* prefix -p |GV* |gv_fetchfile |const char* name -p |GV* |gv_fetchmeth |HV* stash|const char* name|STRLEN len \ +Ap |void |gv_check |HV* stash +Ap |void |gv_efullname |SV* sv|GV* gv +Ap |void |gv_efullname3 |SV* sv|GV* gv|const char* prefix +Ap |GV* |gv_fetchfile |const char* name +Apd |GV* |gv_fetchmeth |HV* stash|const char* name|STRLEN len \ |I32 level -p |GV* |gv_fetchmethod |HV* stash|const char* name -p |GV* |gv_fetchmethod_autoload|HV* stash|const char* name \ +Apd |GV* |gv_fetchmethod |HV* stash|const char* name +Apd |GV* |gv_fetchmethod_autoload|HV* stash|const char* name \ |I32 autoload -p |GV* |gv_fetchpv |const char* name|I32 add|I32 sv_type -p |void |gv_fullname |SV* sv|GV* gv -p |void |gv_fullname3 |SV* sv|GV* gv|const char* prefix -p |void |gv_init |GV* gv|HV* stash|const char* name \ +Ap |GV* |gv_fetchpv |const char* name|I32 add|I32 sv_type +Ap |void |gv_fullname |SV* sv|GV* gv +Ap |void |gv_fullname3 |SV* sv|GV* gv|const char* prefix +Ap |void |gv_init |GV* gv|HV* stash|const char* name \ |STRLEN len|int multi -p |HV* |gv_stashpv |const char* name|I32 create -p |HV* |gv_stashpvn |const char* name|U32 namelen|I32 create -p |HV* |gv_stashsv |SV* sv|I32 create -p |void |hv_clear |HV* tb -p |void |hv_delayfree_ent|HV* hv|HE* entry -p |SV* |hv_delete |HV* tb|const char* key|U32 klen|I32 flags -p |SV* |hv_delete_ent |HV* tb|SV* key|I32 flags|U32 hash -p |bool |hv_exists |HV* tb|const char* key|U32 klen -p |bool |hv_exists_ent |HV* tb|SV* key|U32 hash -p |SV** |hv_fetch |HV* tb|const char* key|U32 klen|I32 lval -p |HE* |hv_fetch_ent |HV* tb|SV* key|I32 lval|U32 hash -p |void |hv_free_ent |HV* hv|HE* entry -p |I32 |hv_iterinit |HV* tb -p |char* |hv_iterkey |HE* entry|I32* retlen -p |SV* |hv_iterkeysv |HE* entry -p |HE* |hv_iternext |HV* tb -p |SV* |hv_iternextsv |HV* hv|char** key|I32* retlen -p |SV* |hv_iterval |HV* tb|HE* entry -p |void |hv_ksplit |HV* hv|IV newmax -p |void |hv_magic |HV* hv|GV* gv|int how -p |SV** |hv_store |HV* tb|const char* key|U32 klen|SV* val \ +Apd |HV* |gv_stashpv |const char* name|I32 create +Ap |HV* |gv_stashpvn |const char* name|U32 namelen|I32 create +Apd |HV* |gv_stashsv |SV* sv|I32 create +Apd |void |hv_clear |HV* tb +Ap |void |hv_delayfree_ent|HV* hv|HE* entry +Apd |SV* |hv_delete |HV* tb|const char* key|U32 klen|I32 flags +Apd |SV* |hv_delete_ent |HV* tb|SV* key|I32 flags|U32 hash +Apd |bool |hv_exists |HV* tb|const char* key|U32 klen +Apd |bool |hv_exists_ent |HV* tb|SV* key|U32 hash +Apd |SV** |hv_fetch |HV* tb|const char* key|U32 klen|I32 lval +Apd |HE* |hv_fetch_ent |HV* tb|SV* key|I32 lval|U32 hash +Ap |void |hv_free_ent |HV* hv|HE* entry +Apd |I32 |hv_iterinit |HV* tb +Apd |char* |hv_iterkey |HE* entry|I32* retlen +Apd |SV* |hv_iterkeysv |HE* entry +Apd |HE* |hv_iternext |HV* tb +Apd |SV* |hv_iternextsv |HV* hv|char** key|I32* retlen +Apd |SV* |hv_iterval |HV* tb|HE* entry +Ap |void |hv_ksplit |HV* hv|IV newmax +Apd |void |hv_magic |HV* hv|GV* gv|int how +Apd |SV** |hv_store |HV* tb|const char* key|U32 klen|SV* val \ |U32 hash -p |HE* |hv_store_ent |HV* tb|SV* key|SV* val|U32 hash -p |void |hv_undef |HV* tb -p |I32 |ibcmp |const char* a|const char* b|I32 len -p |I32 |ibcmp_locale |const char* a|const char* b|I32 len +Apd |HE* |hv_store_ent |HV* tb|SV* key|SV* val|U32 hash +Apd |void |hv_undef |HV* tb +Ap |I32 |ibcmp |const char* a|const char* b|I32 len +Ap |I32 |ibcmp_locale |const char* a|const char* b|I32 len p |bool |ingroup |Gid_t testgid|Uid_t effective p |void |init_debugger -p |void |init_stacks +Ap |void |init_stacks p |U32 |intro_my -p |char* |instr |const char* big|const char* little +Ap |char* |instr |const char* big|const char* little p |bool |io_close |IO* io|bool not_implicit p |OP* |invert |OP* cmd -p |bool |is_uni_alnum |U32 c -p |bool |is_uni_alnumc |U32 c -p |bool |is_uni_idfirst |U32 c -p |bool |is_uni_alpha |U32 c -p |bool |is_uni_ascii |U32 c -p |bool |is_uni_space |U32 c -p |bool |is_uni_cntrl |U32 c -p |bool |is_uni_graph |U32 c -p |bool |is_uni_digit |U32 c -p |bool |is_uni_upper |U32 c -p |bool |is_uni_lower |U32 c -p |bool |is_uni_print |U32 c -p |bool |is_uni_punct |U32 c -p |bool |is_uni_xdigit |U32 c -p |U32 |to_uni_upper |U32 c -p |U32 |to_uni_title |U32 c -p |U32 |to_uni_lower |U32 c -p |bool |is_uni_alnum_lc|U32 c -p |bool |is_uni_alnumc_lc|U32 c -p |bool |is_uni_idfirst_lc|U32 c -p |bool |is_uni_alpha_lc|U32 c -p |bool |is_uni_ascii_lc|U32 c -p |bool |is_uni_space_lc|U32 c -p |bool |is_uni_cntrl_lc|U32 c -p |bool |is_uni_graph_lc|U32 c -p |bool |is_uni_digit_lc|U32 c -p |bool |is_uni_upper_lc|U32 c -p |bool |is_uni_lower_lc|U32 c -p |bool |is_uni_print_lc|U32 c -p |bool |is_uni_punct_lc|U32 c -p |bool |is_uni_xdigit_lc|U32 c -p |U32 |to_uni_upper_lc|U32 c -p |U32 |to_uni_title_lc|U32 c -p |U32 |to_uni_lower_lc|U32 c -p |bool |is_utf8_alnum |U8 *p -p |bool |is_utf8_alnumc |U8 *p -p |bool |is_utf8_idfirst|U8 *p -p |bool |is_utf8_alpha |U8 *p -p |bool |is_utf8_ascii |U8 *p -p |bool |is_utf8_space |U8 *p -p |bool |is_utf8_cntrl |U8 *p -p |bool |is_utf8_digit |U8 *p -p |bool |is_utf8_graph |U8 *p -p |bool |is_utf8_upper |U8 *p -p |bool |is_utf8_lower |U8 *p -p |bool |is_utf8_print |U8 *p -p |bool |is_utf8_punct |U8 *p -p |bool |is_utf8_xdigit |U8 *p -p |bool |is_utf8_mark |U8 *p +Ap |bool |is_uni_alnum |U32 c +Ap |bool |is_uni_alnumc |U32 c +Ap |bool |is_uni_idfirst |U32 c +Ap |bool |is_uni_alpha |U32 c +Ap |bool |is_uni_ascii |U32 c +Ap |bool |is_uni_space |U32 c +Ap |bool |is_uni_cntrl |U32 c +Ap |bool |is_uni_graph |U32 c +Ap |bool |is_uni_digit |U32 c +Ap |bool |is_uni_upper |U32 c +Ap |bool |is_uni_lower |U32 c +Ap |bool |is_uni_print |U32 c +Ap |bool |is_uni_punct |U32 c +Ap |bool |is_uni_xdigit |U32 c +Ap |U32 |to_uni_upper |U32 c +Ap |U32 |to_uni_title |U32 c +Ap |U32 |to_uni_lower |U32 c +Ap |bool |is_uni_alnum_lc|U32 c +Ap |bool |is_uni_alnumc_lc|U32 c +Ap |bool |is_uni_idfirst_lc|U32 c +Ap |bool |is_uni_alpha_lc|U32 c +Ap |bool |is_uni_ascii_lc|U32 c +Ap |bool |is_uni_space_lc|U32 c +Ap |bool |is_uni_cntrl_lc|U32 c +Ap |bool |is_uni_graph_lc|U32 c +Ap |bool |is_uni_digit_lc|U32 c +Ap |bool |is_uni_upper_lc|U32 c +Ap |bool |is_uni_lower_lc|U32 c +Ap |bool |is_uni_print_lc|U32 c +Ap |bool |is_uni_punct_lc|U32 c +Ap |bool |is_uni_xdigit_lc|U32 c +Ap |U32 |to_uni_upper_lc|U32 c +Ap |U32 |to_uni_title_lc|U32 c +Ap |U32 |to_uni_lower_lc|U32 c +Ap |bool |is_utf8_alnum |U8 *p +Ap |bool |is_utf8_alnumc |U8 *p +Ap |bool |is_utf8_idfirst|U8 *p +Ap |bool |is_utf8_alpha |U8 *p +Ap |bool |is_utf8_ascii |U8 *p +Ap |bool |is_utf8_space |U8 *p +Ap |bool |is_utf8_cntrl |U8 *p +Ap |bool |is_utf8_digit |U8 *p +Ap |bool |is_utf8_graph |U8 *p +Ap |bool |is_utf8_upper |U8 *p +Ap |bool |is_utf8_lower |U8 *p +Ap |bool |is_utf8_print |U8 *p +Ap |bool |is_utf8_punct |U8 *p +Ap |bool |is_utf8_xdigit |U8 *p +Ap |bool |is_utf8_mark |U8 *p p |OP* |jmaybe |OP* arg p |I32 |keyword |char* d|I32 len -p |void |leave_scope |I32 base +Ap |void |leave_scope |I32 base p |void |lex_end p |void |lex_start |SV* line p |OP* |linklist |OP* o p |OP* |list |OP* o p |OP* |listkids |OP* o p |OP* |localize |OP* arg|I32 lexical -p |I32 |looks_like_number|SV* sv +Apd |I32 |looks_like_number|SV* sv p |int |magic_clearenv |SV* sv|MAGIC* mg p |int |magic_clear_all_env|SV* sv|MAGIC* mg p |int |magic_clearpack|SV* sv|MAGIC* mg @@ -1401,112 +1666,112 @@ p |int |magic_set_all_env|SV* sv|MAGIC* mg p |U32 |magic_sizepack |SV* sv|MAGIC* mg p |int |magic_wipepack |SV* sv|MAGIC* mg p |void |magicname |char* sym|char* name|I32 namlen -p |void |markstack_grow +Ap |void |markstack_grow #if defined(USE_LOCALE_COLLATE) p |char* |mem_collxfrm |const char* s|STRLEN len|STRLEN* xlen #endif -p |SV* |mess |const char* pat|... -p |SV* |vmess |const char* pat|va_list* args +Afp |SV* |mess |const char* pat|... +Ap |SV* |vmess |const char* pat|va_list* args p |void |qerror |SV* err -p |int |mg_clear |SV* sv -p |int |mg_copy |SV* sv|SV* nsv|const char* key|I32 klen -p |MAGIC* |mg_find |SV* sv|int type -p |int |mg_free |SV* sv -p |int |mg_get |SV* sv -p |U32 |mg_length |SV* sv -p |void |mg_magical |SV* sv -p |int |mg_set |SV* sv -p |I32 |mg_size |SV* sv +Apd |int |mg_clear |SV* sv +Apd |int |mg_copy |SV* sv|SV* nsv|const char* key|I32 klen +Apd |MAGIC* |mg_find |SV* sv|int type +Apd |int |mg_free |SV* sv +Apd |int |mg_get |SV* sv +Apd |U32 |mg_length |SV* sv +Apd |void |mg_magical |SV* sv +Apd |int |mg_set |SV* sv +Ap |I32 |mg_size |SV* sv p |OP* |mod |OP* o|I32 type -p |char* |moreswitches |char* s +Ap |char* |moreswitches |char* s p |OP* |my |OP* o -p |NV |my_atof |const char *s +Ap |NV |my_atof |const char *s #if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY) -np |char* |my_bcopy |const char* from|char* to|I32 len +Anp |char* |my_bcopy |const char* from|char* to|I32 len #endif #if !defined(HAS_BZERO) && !defined(HAS_MEMSET) -np |char* |my_bzero |char* loc|I32 len +Anp |char* |my_bzero |char* loc|I32 len #endif -pr |void |my_exit |U32 status -pr |void |my_failure_exit -p |I32 |my_fflush_all -p |I32 |my_lstat +Apr |void |my_exit |U32 status +Apr |void |my_failure_exit +Ap |I32 |my_fflush_all +Ap |I32 |my_lstat #if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP) -np |I32 |my_memcmp |const char* s1|const char* s2|I32 len +Anp |I32 |my_memcmp |const char* s1|const char* s2|I32 len #endif #if !defined(HAS_MEMSET) -np |void* |my_memset |char* loc|I32 ch|I32 len +Anp |void* |my_memset |char* loc|I32 ch|I32 len #endif #if !defined(PERL_OBJECT) -p |I32 |my_pclose |PerlIO* ptr -p |PerlIO*|my_popen |char* cmd|char* mode +Ap |I32 |my_pclose |PerlIO* ptr +Ap |PerlIO*|my_popen |char* cmd|char* mode #endif -p |void |my_setenv |char* nam|char* val -p |I32 |my_stat +Ap |void |my_setenv |char* nam|char* val +Ap |I32 |my_stat #if defined(MYSWAP) -p |short |my_swap |short s -p |long |my_htonl |long l -p |long |my_ntohl |long l +Ap |short |my_swap |short s +Ap |long |my_htonl |long l +Ap |long |my_ntohl |long l #endif p |void |my_unexec -p |OP* |newANONLIST |OP* o -p |OP* |newANONHASH |OP* o -p |OP* |newANONSUB |I32 floor|OP* proto|OP* block -p |OP* |newASSIGNOP |I32 flags|OP* left|I32 optype|OP* right -p |OP* |newCONDOP |I32 flags|OP* expr|OP* trueop|OP* falseop -p |void |newCONSTSUB |HV* stash|char* name|SV* sv -p |void |newFORM |I32 floor|OP* o|OP* block -p |OP* |newFOROP |I32 flags|char* label|line_t forline \ +Ap |OP* |newANONLIST |OP* o +Ap |OP* |newANONHASH |OP* o +Ap |OP* |newANONSUB |I32 floor|OP* proto|OP* block +Ap |OP* |newASSIGNOP |I32 flags|OP* left|I32 optype|OP* right +Ap |OP* |newCONDOP |I32 flags|OP* expr|OP* trueop|OP* falseop +Apd |void |newCONSTSUB |HV* stash|char* name|SV* sv +Ap |void |newFORM |I32 floor|OP* o|OP* block +Ap |OP* |newFOROP |I32 flags|char* label|line_t forline \ |OP* sclr|OP* expr|OP*block|OP*cont -p |OP* |newLOGOP |I32 optype|I32 flags|OP* left|OP* right -p |OP* |newLOOPEX |I32 type|OP* label -p |OP* |newLOOPOP |I32 flags|I32 debuggable|OP* expr|OP* block -p |OP* |newNULLLIST -p |OP* |newOP |I32 optype|I32 flags -p |void |newPROG |OP* o -p |OP* |newRANGE |I32 flags|OP* left|OP* right -p |OP* |newSLICEOP |I32 flags|OP* subscript|OP* listop -p |OP* |newSTATEOP |I32 flags|char* label|OP* o -p |CV* |newSUB |I32 floor|OP* o|OP* proto|OP* block -p |CV* |newXS |char* name|XSUBADDR_t f|char* filename -p |AV* |newAV -p |OP* |newAVREF |OP* o -p |OP* |newBINOP |I32 type|I32 flags|OP* first|OP* last -p |OP* |newCVREF |I32 flags|OP* o -p |OP* |newGVOP |I32 type|I32 flags|GV* gv -p |GV* |newGVgen |char* pack -p |OP* |newGVREF |I32 type|OP* o -p |OP* |newHVREF |OP* o -p |HV* |newHV -p |HV* |newHVhv |HV* hv -p |IO* |newIO -p |OP* |newLISTOP |I32 type|I32 flags|OP* first|OP* last -p |OP* |newPADOP |I32 type|I32 flags|SV* sv -p |OP* |newPMOP |I32 type|I32 flags -p |OP* |newPVOP |I32 type|I32 flags|char* pv -p |SV* |newRV |SV* pref -p |SV* |newRV_noinc |SV *sv -p |SV* |newSV |STRLEN len -p |OP* |newSVREF |OP* o -p |OP* |newSVOP |I32 type|I32 flags|SV* sv -p |SV* |newSViv |IV i -p |SV* |newSVnv |NV n -p |SV* |newSVpv |const char* s|STRLEN len -p |SV* |newSVpvn |const char* s|STRLEN len -p |SV* |newSVpvf |const char* pat|... -p |SV* |vnewSVpvf |const char* pat|va_list* args -p |SV* |newSVrv |SV* rv|const char* classname -p |SV* |newSVsv |SV* old -p |OP* |newUNOP |I32 type|I32 flags|OP* first -p |OP* |newWHILEOP |I32 flags|I32 debuggable|LOOP* loop \ +Ap |OP* |newLOGOP |I32 optype|I32 flags|OP* left|OP* right +Ap |OP* |newLOOPEX |I32 type|OP* label +Ap |OP* |newLOOPOP |I32 flags|I32 debuggable|OP* expr|OP* block +Ap |OP* |newNULLLIST +Ap |OP* |newOP |I32 optype|I32 flags +Ap |void |newPROG |OP* o +Ap |OP* |newRANGE |I32 flags|OP* left|OP* right +Ap |OP* |newSLICEOP |I32 flags|OP* subscript|OP* listop +Ap |OP* |newSTATEOP |I32 flags|char* label|OP* o +Ap |CV* |newSUB |I32 floor|OP* o|OP* proto|OP* block +Apd |CV* |newXS |char* name|XSUBADDR_t f|char* filename +Apd |AV* |newAV +Ap |OP* |newAVREF |OP* o +Ap |OP* |newBINOP |I32 type|I32 flags|OP* first|OP* last +Ap |OP* |newCVREF |I32 flags|OP* o +Ap |OP* |newGVOP |I32 type|I32 flags|GV* gv +Ap |GV* |newGVgen |char* pack +Ap |OP* |newGVREF |I32 type|OP* o +Ap |OP* |newHVREF |OP* o +Apd |HV* |newHV +Ap |HV* |newHVhv |HV* hv +Ap |IO* |newIO +Ap |OP* |newLISTOP |I32 type|I32 flags|OP* first|OP* last +Ap |OP* |newPADOP |I32 type|I32 flags|SV* sv +Ap |OP* |newPMOP |I32 type|I32 flags +Ap |OP* |newPVOP |I32 type|I32 flags|char* pv +Ap |SV* |newRV |SV* pref +Apd |SV* |newRV_noinc |SV *sv +Ap |SV* |newSV |STRLEN len +Ap |OP* |newSVREF |OP* o +Ap |OP* |newSVOP |I32 type|I32 flags|SV* sv +Apd |SV* |newSViv |IV i +Apd |SV* |newSVnv |NV n +Apd |SV* |newSVpv |const char* s|STRLEN len +Apd |SV* |newSVpvn |const char* s|STRLEN len +Afpd |SV* |newSVpvf |const char* pat|... +Ap |SV* |vnewSVpvf |const char* pat|va_list* args +Apd |SV* |newSVrv |SV* rv|const char* classname +Apd |SV* |newSVsv |SV* old +Ap |OP* |newUNOP |I32 type|I32 flags|OP* first +Ap |OP* |newWHILEOP |I32 flags|I32 debuggable|LOOP* loop \ |I32 whileline|OP* expr|OP* block|OP* cont -p |PERL_SI*|new_stackinfo|I32 stitems|I32 cxitems +Ap |PERL_SI*|new_stackinfo|I32 stitems|I32 cxitems p |PerlIO*|nextargv |GV* gv -p |char* |ninstr |const char* big|const char* bigend \ +Ap |char* |ninstr |const char* big|const char* bigend \ |const char* little|const char* lend p |OP* |oopsCV |OP* o -p |void |op_free |OP* arg +Ap |void |op_free |OP* arg p |void |package |OP* o p |PADOFFSET|pad_alloc |I32 optype|U32 tmptype p |PADOFFSET|pad_allocmy |char* name @@ -1514,70 +1779,70 @@ p |PADOFFSET|pad_findmy |char* name p |OP* |oopsAV |OP* o p |OP* |oopsHV |OP* o p |void |pad_leavemy |I32 fill -p |SV* |pad_sv |PADOFFSET po +Ap |SV* |pad_sv |PADOFFSET po p |void |pad_free |PADOFFSET po p |void |pad_reset p |void |pad_swipe |PADOFFSET po p |void |peep |OP* o #if defined(PERL_OBJECT) -ox |void |Perl_construct -ox |void |Perl_destruct -ox |void |Perl_free -ox |int |Perl_run -ox |int |Perl_parse |XSINIT_t xsinit \ +Aox |void |Perl_construct +Aox |void |Perl_destruct +Aox |void |Perl_free +Aox |int |Perl_run +Aox |int |Perl_parse |XSINIT_t xsinit \ |int argc|char** argv|char** env #endif #if defined(USE_THREADS) -p |struct perl_thread* |new_struct_thread|struct perl_thread *t +Ap |struct perl_thread* |new_struct_thread|struct perl_thread *t #endif -p |void |call_atexit |ATEXIT_t fn|void *ptr -p |I32 |call_argv |const char* sub_name|I32 flags|char** argv -p |I32 |call_method |const char* methname|I32 flags -p |I32 |call_pv |const char* sub_name|I32 flags -p |I32 |call_sv |SV* sv|I32 flags -p |SV* |eval_pv |const char* p|I32 croak_on_error -p |I32 |eval_sv |SV* sv|I32 flags -p |SV* |get_sv |const char* name|I32 create -p |AV* |get_av |const char* name|I32 create -p |HV* |get_hv |const char* name|I32 create -p |CV* |get_cv |const char* name|I32 create -p |int |init_i18nl10n |int printwarn -p |int |init_i18nl14n |int printwarn -p |void |new_collate |const char* newcoll -p |void |new_ctype |const char* newctype -p |void |new_numeric |const char* newcoll -p |void |set_numeric_local -p |void |set_numeric_radix -p |void |set_numeric_standard -p |void |require_pv |const char* pv +Ap |void |call_atexit |ATEXIT_t fn|void *ptr +Apd |I32 |call_argv |const char* sub_name|I32 flags|char** argv +Apd |I32 |call_method |const char* methname|I32 flags +Apd |I32 |call_pv |const char* sub_name|I32 flags +Apd |I32 |call_sv |SV* sv|I32 flags +Apd |SV* |eval_pv |const char* p|I32 croak_on_error +Apd |I32 |eval_sv |SV* sv|I32 flags +Apd |SV* |get_sv |const char* name|I32 create +Apd |AV* |get_av |const char* name|I32 create +Apd |HV* |get_hv |const char* name|I32 create +Apd |CV* |get_cv |const char* name|I32 create +Ap |int |init_i18nl10n |int printwarn +Ap |int |init_i18nl14n |int printwarn +Ap |void |new_collate |const char* newcoll +Ap |void |new_ctype |const char* newctype +Ap |void |new_numeric |const char* newcoll +Ap |void |set_numeric_local +Ap |void |set_numeric_radix +Ap |void |set_numeric_standard +Apd |void |require_pv |const char* pv p |void |pidgone |Pid_t pid|int status -p |void |pmflag |U16* pmfl|int ch +Ap |void |pmflag |U16* pmfl|int ch p |OP* |pmruntime |OP* pm|OP* expr|OP* repl p |OP* |pmtrans |OP* o|OP* expr|OP* repl p |OP* |pop_return -p |void |pop_scope +Ap |void |pop_scope p |OP* |prepend_elem |I32 optype|OP* head|OP* tail p |void |push_return |OP* o -p |void |push_scope +Ap |void |push_scope p |OP* |ref |OP* o|I32 type p |OP* |refkids |OP* o|I32 type -p |void |regdump |regexp* r -p |I32 |pregexec |regexp* prog|char* stringarg \ +Ap |void |regdump |regexp* r +Ap |I32 |pregexec |regexp* prog|char* stringarg \ |char* strend|char* strbeg|I32 minend \ |SV* screamer|U32 nosave -p |void |pregfree |struct regexp* r -p |regexp*|pregcomp |char* exp|char* xend|PMOP* pm -p |char* |re_intuit_start|regexp* prog|SV* sv|char* strpos \ +Ap |void |pregfree |struct regexp* r +Ap |regexp*|pregcomp |char* exp|char* xend|PMOP* pm +Ap |char* |re_intuit_start|regexp* prog|SV* sv|char* strpos \ |char* strend|U32 flags \ |struct re_scream_pos_data_s *data -p |SV* |re_intuit_string|regexp* prog -p |I32 |regexec_flags |regexp* prog|char* stringarg \ +Ap |SV* |re_intuit_string|regexp* prog +Ap |I32 |regexec_flags |regexp* prog|char* stringarg \ |char* strend|char* strbeg|I32 minend \ |SV* screamer|void* data|U32 flags -p |regnode*|regnext |regnode* p +Ap |regnode*|regnext |regnode* p p |void |regprop |SV* sv|regnode* o -p |void |repeatcpy |char* to|const char* from|I32 len|I32 count -p |char* |rninstr |const char* big|const char* bigend \ +Ap |void |repeatcpy |char* to|const char* from|I32 len|I32 count +Ap |char* |rninstr |const char* big|const char* bigend \ |const char* little|const char* lend p |Sighandler_t|rsignal |int i|Sighandler_t t p |int |rsignal_restore|int i|Sigsave_t* t @@ -1589,188 +1854,189 @@ p |void |rxres_save |void** rsp|REGEXP* prx #if !defined(HAS_RENAME) p |I32 |same_dirent |char* a|char* b #endif -p |char* |savepv |const char* sv -p |char* |savepvn |const char* sv|I32 len -p |void |savestack_grow -p |void |save_aelem |AV* av|I32 idx|SV **sptr -p |I32 |save_alloc |I32 size|I32 pad -p |void |save_aptr |AV** aptr -p |AV* |save_ary |GV* gv -p |void |save_clearsv |SV** svp -p |void |save_delete |HV* hv|char* key|I32 klen -p |void |save_destructor|DESTRUCTORFUNC_NOCONTEXT_t f|void* p -p |void |save_destructor_x|DESTRUCTORFUNC_t f|void* p -p |void |save_freesv |SV* sv +Apd |char* |savepv |const char* sv +Apd |char* |savepvn |const char* sv|I32 len +Ap |void |savestack_grow +Ap |void |save_aelem |AV* av|I32 idx|SV **sptr +Ap |I32 |save_alloc |I32 size|I32 pad +Ap |void |save_aptr |AV** aptr +Ap |AV* |save_ary |GV* gv +Ap |void |save_clearsv |SV** svp +Ap |void |save_delete |HV* hv|char* key|I32 klen +Ap |void |save_destructor|DESTRUCTORFUNC_NOCONTEXT_t f|void* p +Ap |void |save_destructor_x|DESTRUCTORFUNC_t f|void* p +Ap |void |save_freesv |SV* sv p |void |save_freeop |OP* o -p |void |save_freepv |char* pv -p |void |save_generic_svref|SV** sptr -p |void |save_gp |GV* gv|I32 empty -p |HV* |save_hash |GV* gv -p |void |save_helem |HV* hv|SV *key|SV **sptr -p |void |save_hints -p |void |save_hptr |HV** hptr -p |void |save_I16 |I16* intp -p |void |save_I32 |I32* intp -p |void |save_I8 |I8* bytep -p |void |save_int |int* intp -p |void |save_item |SV* item -p |void |save_iv |IV* iv -p |void |save_list |SV** sarg|I32 maxsarg -p |void |save_long |long* longp -p |void |save_nogv |GV* gv +Ap |void |save_freepv |char* pv +Ap |void |save_generic_svref|SV** sptr +Ap |void |save_gp |GV* gv|I32 empty +Ap |HV* |save_hash |GV* gv +Ap |void |save_helem |HV* hv|SV *key|SV **sptr +Ap |void |save_hints +Ap |void |save_hptr |HV** hptr +Ap |void |save_I16 |I16* intp +Ap |void |save_I32 |I32* intp +Ap |void |save_I8 |I8* bytep +Ap |void |save_int |int* intp +Ap |void |save_item |SV* item +Ap |void |save_iv |IV* iv +Ap |void |save_list |SV** sarg|I32 maxsarg +Ap |void |save_long |long* longp +Ap |void |save_nogv |GV* gv p |void |save_op -p |SV* |save_scalar |GV* gv -p |void |save_pptr |char** pptr -p |void |save_vptr |void* pptr -p |void |save_re_context -p |void |save_sptr |SV** sptr -p |SV* |save_svref |SV** sptr -p |SV** |save_threadsv |PADOFFSET i +Ap |SV* |save_scalar |GV* gv +Ap |void |save_pptr |char** pptr +Ap |void |save_vptr |void* pptr +Ap |void |save_re_context +Ap |void |save_sptr |SV** sptr +Ap |SV* |save_svref |SV** sptr +Ap |SV** |save_threadsv |PADOFFSET i p |OP* |sawparens |OP* o p |OP* |scalar |OP* o p |OP* |scalarkids |OP* o p |OP* |scalarseq |OP* o p |OP* |scalarvoid |OP* o -p |NV |scan_bin |char* start|I32 len|I32* retlen -p |NV |scan_hex |char* start|I32 len|I32* retlen -p |char* |scan_num |char* s -p |NV |scan_oct |char* start|I32 len|I32* retlen +Ap |NV |scan_bin |char* start|I32 len|I32* retlen +Ap |NV |scan_hex |char* start|I32 len|I32* retlen +Ap |char* |scan_num |char* s +Ap |NV |scan_oct |char* start|I32 len|I32* retlen p |OP* |scope |OP* o -p |char* |screaminstr |SV* bigsv|SV* littlesv|I32 start_shift \ +Ap |char* |screaminstr |SV* bigsv|SV* littlesv|I32 start_shift \ |I32 end_shift|I32 *state|I32 last #if !defined(VMS) p |I32 |setenv_getix |char* nam #endif p |void |setdefout |GV* gv -p |char* |sharepvn |const char* sv|I32 len|U32 hash +Ap |char* |sharepvn |const char* sv|I32 len|U32 hash p |HEK* |share_hek |const char* sv|I32 len|U32 hash np |Signal_t |sighandler |int sig -p |SV** |stack_grow |SV** sp|SV**p|int n -p |I32 |start_subparse |I32 is_format|U32 flags +Ap |SV** |stack_grow |SV** sp|SV**p|int n +Ap |I32 |start_subparse |I32 is_format|U32 flags p |void |sub_crush_depth|CV* cv -p |bool |sv_2bool |SV* sv -p |CV* |sv_2cv |SV* sv|HV** st|GV** gvp|I32 lref -p |IO* |sv_2io |SV* sv -p |IV |sv_2iv |SV* sv -p |SV* |sv_2mortal |SV* sv -p |NV |sv_2nv |SV* sv -p |char* |sv_2pv |SV* sv|STRLEN* lp -p |char* |sv_2pvutf8 |SV* sv|STRLEN* lp -p |char* |sv_2pvbyte |SV* sv|STRLEN* lp -p |UV |sv_2uv |SV* sv -p |IV |sv_iv |SV* sv -p |UV |sv_uv |SV* sv -p |NV |sv_nv |SV* sv -p |char* |sv_pvn |SV *sv|STRLEN *len -p |char* |sv_pvutf8n |SV *sv|STRLEN *len -p |char* |sv_pvbyten |SV *sv|STRLEN *len -p |I32 |sv_true |SV *sv +Ap |bool |sv_2bool |SV* sv +Ap |CV* |sv_2cv |SV* sv|HV** st|GV** gvp|I32 lref +Ap |IO* |sv_2io |SV* sv +Ap |IV |sv_2iv |SV* sv +Apd |SV* |sv_2mortal |SV* sv +Ap |NV |sv_2nv |SV* sv +Ap |char* |sv_2pv |SV* sv|STRLEN* lp +Ap |char* |sv_2pvutf8 |SV* sv|STRLEN* lp +Ap |char* |sv_2pvbyte |SV* sv|STRLEN* lp +Ap |UV |sv_2uv |SV* sv +Ap |IV |sv_iv |SV* sv +Ap |UV |sv_uv |SV* sv +Ap |NV |sv_nv |SV* sv +Ap |char* |sv_pvn |SV *sv|STRLEN *len +Ap |char* |sv_pvutf8n |SV *sv|STRLEN *len +Ap |char* |sv_pvbyten |SV *sv|STRLEN *len +Ap |I32 |sv_true |SV *sv p |void |sv_add_arena |char* ptr|U32 size|U32 flags -p |int |sv_backoff |SV* sv -p |SV* |sv_bless |SV* sv|HV* stash -p |void |sv_catpvf |SV* sv|const char* pat|... -p |void |sv_vcatpvf |SV* sv|const char* pat|va_list* args -p |void |sv_catpv |SV* sv|const char* ptr -p |void |sv_catpvn |SV* sv|const char* ptr|STRLEN len -p |void |sv_catsv |SV* dsv|SV* ssv -p |void |sv_chop |SV* sv|char* ptr +Ap |int |sv_backoff |SV* sv +Apd |SV* |sv_bless |SV* sv|HV* stash +Afpd |void |sv_catpvf |SV* sv|const char* pat|... +Ap |void |sv_vcatpvf |SV* sv|const char* pat|va_list* args +Apd |void |sv_catpv |SV* sv|const char* ptr +Apd |void |sv_catpvn |SV* sv|const char* ptr|STRLEN len +Apd |void |sv_catsv |SV* dsv|SV* ssv +Apd |void |sv_chop |SV* sv|char* ptr p |void |sv_clean_all p |void |sv_clean_objs -p |void |sv_clear |SV* sv -p |I32 |sv_cmp |SV* sv1|SV* sv2 -p |I32 |sv_cmp_locale |SV* sv1|SV* sv2 +Ap |void |sv_clear |SV* sv +Apd |I32 |sv_cmp |SV* sv1|SV* sv2 +Ap |I32 |sv_cmp_locale |SV* sv1|SV* sv2 #if defined(USE_LOCALE_COLLATE) -p |char* |sv_collxfrm |SV* sv|STRLEN* nxp +Ap |char* |sv_collxfrm |SV* sv|STRLEN* nxp #endif -p |OP* |sv_compile_2op |SV* sv|OP** startp|char* code|AV** avp -p |void |sv_dec |SV* sv -p |void |sv_dump |SV* sv -p |bool |sv_derived_from|SV* sv|const char* name -p |I32 |sv_eq |SV* sv1|SV* sv2 -p |void |sv_free |SV* sv +Ap |OP* |sv_compile_2op |SV* sv|OP** startp|char* code|AV** avp +Apd |void |sv_dec |SV* sv +Ap |void |sv_dump |SV* sv +Apd |bool |sv_derived_from|SV* sv|const char* name +Apd |I32 |sv_eq |SV* sv1|SV* sv2 +Ap |void |sv_free |SV* sv p |void |sv_free_arenas -p |char* |sv_gets |SV* sv|PerlIO* fp|I32 append -p |char* |sv_grow |SV* sv|STRLEN newlen -p |void |sv_inc |SV* sv -p |void |sv_insert |SV* bigsv|STRLEN offset|STRLEN len \ +Ap |char* |sv_gets |SV* sv|PerlIO* fp|I32 append +Apd |char* |sv_grow |SV* sv|STRLEN newlen +Apd |void |sv_inc |SV* sv +Apd |void |sv_insert |SV* bigsv|STRLEN offset|STRLEN len \ |char* little|STRLEN littlelen -p |int |sv_isa |SV* sv|const char* name -p |int |sv_isobject |SV* sv -p |STRLEN |sv_len |SV* sv -p |STRLEN |sv_len_utf8 |SV* sv -p |void |sv_magic |SV* sv|SV* obj|int how|const char* name \ +Apd |int |sv_isa |SV* sv|const char* name +Apd |int |sv_isobject |SV* sv +Apd |STRLEN |sv_len |SV* sv +Ap |STRLEN |sv_len_utf8 |SV* sv +Apd |void |sv_magic |SV* sv|SV* obj|int how|const char* name \ |I32 namlen -p |SV* |sv_mortalcopy |SV* oldsv -p |SV* |sv_newmortal -p |SV* |sv_newref |SV* sv -p |char* |sv_peek |SV* sv -p |void |sv_pos_u2b |SV* sv|I32* offsetp|I32* lenp -p |void |sv_pos_b2u |SV* sv|I32* offsetp -p |char* |sv_pvn_force |SV* sv|STRLEN* lp -p |char* |sv_pvutf8n_force|SV* sv|STRLEN* lp -p |char* |sv_pvbyten_force|SV* sv|STRLEN* lp -p |char* |sv_reftype |SV* sv|int ob -p |void |sv_replace |SV* sv|SV* nsv -p |void |sv_report_used -p |void |sv_reset |char* s|HV* stash -p |void |sv_setpvf |SV* sv|const char* pat|... -p |void |sv_vsetpvf |SV* sv|const char* pat|va_list* args -p |void |sv_setiv |SV* sv|IV num -p |void |sv_setpviv |SV* sv|IV num -p |void |sv_setuv |SV* sv|UV num -p |void |sv_setnv |SV* sv|NV num -p |SV* |sv_setref_iv |SV* rv|const char* classname|IV iv -p |SV* |sv_setref_nv |SV* rv|const char* classname|NV nv -p |SV* |sv_setref_pv |SV* rv|const char* classname|void* pv -p |SV* |sv_setref_pvn |SV* rv|const char* classname|char* pv \ +Apd |SV* |sv_mortalcopy |SV* oldsv +Apd |SV* |sv_newmortal +Ap |SV* |sv_newref |SV* sv +Ap |char* |sv_peek |SV* sv +Ap |void |sv_pos_u2b |SV* sv|I32* offsetp|I32* lenp +Ap |void |sv_pos_b2u |SV* sv|I32* offsetp +Ap |char* |sv_pvn_force |SV* sv|STRLEN* lp +Ap |char* |sv_pvutf8n_force|SV* sv|STRLEN* lp +Ap |char* |sv_pvbyten_force|SV* sv|STRLEN* lp +Ap |char* |sv_reftype |SV* sv|int ob +Ap |void |sv_replace |SV* sv|SV* nsv +Ap |void |sv_report_used +Ap |void |sv_reset |char* s|HV* stash +Afpd |void |sv_setpvf |SV* sv|const char* pat|... +Ap |void |sv_vsetpvf |SV* sv|const char* pat|va_list* args +Apd |void |sv_setiv |SV* sv|IV num +Apd |void |sv_setpviv |SV* sv|IV num +Apd |void |sv_setuv |SV* sv|UV num +Apd |void |sv_setnv |SV* sv|NV num +Apd |SV* |sv_setref_iv |SV* rv|const char* classname|IV iv +Apd |SV* |sv_setref_nv |SV* rv|const char* classname|NV nv +Apd |SV* |sv_setref_pv |SV* rv|const char* classname|void* pv +Apd |SV* |sv_setref_pvn |SV* rv|const char* classname|char* pv \ |STRLEN n -p |void |sv_setpv |SV* sv|const char* ptr -p |void |sv_setpvn |SV* sv|const char* ptr|STRLEN len -p |void |sv_setsv |SV* dsv|SV* ssv -p |void |sv_taint |SV* sv -p |bool |sv_tainted |SV* sv -p |int |sv_unmagic |SV* sv|int type -p |void |sv_unref |SV* sv -p |void |sv_untaint |SV* sv -p |bool |sv_upgrade |SV* sv|U32 mt -p |void |sv_usepvn |SV* sv|char* ptr|STRLEN len -p |void |sv_vcatpvfn |SV* sv|const char* pat|STRLEN patlen \ +Apd |void |sv_setpv |SV* sv|const char* ptr +Apd |void |sv_setpvn |SV* sv|const char* ptr|STRLEN len +Apd |void |sv_setsv |SV* dsv|SV* ssv +Ap |void |sv_taint |SV* sv +Ap |bool |sv_tainted |SV* sv +Ap |int |sv_unmagic |SV* sv|int type +Apd |void |sv_unref |SV* sv +Ap |void |sv_untaint |SV* sv +Apd |bool |sv_upgrade |SV* sv|U32 mt +Apd |void |sv_usepvn |SV* sv|char* ptr|STRLEN len +Apd |void |sv_vcatpvfn |SV* sv|const char* pat|STRLEN patlen \ |va_list* args|SV** svargs|I32 svmax \ |bool *maybe_tainted -p |void |sv_vsetpvfn |SV* sv|const char* pat|STRLEN patlen \ +Apd |void |sv_vsetpvfn |SV* sv|const char* pat|STRLEN patlen \ |va_list* args|SV** svargs|I32 svmax \ |bool *maybe_tainted -p |SV* |swash_init |char* pkg|char* name|SV* listsv \ +Ap |SV* |swash_init |char* pkg|char* name|SV* listsv \ |I32 minbits|I32 none -p |UV |swash_fetch |SV *sv|U8 *ptr -p |void |taint_env -p |void |taint_proper |const char* f|const char* s -p |UV |to_utf8_lower |U8 *p -p |UV |to_utf8_upper |U8 *p -p |UV |to_utf8_title |U8 *p +Ap |UV |swash_fetch |SV *sv|U8 *ptr +Ap |void |taint_env +Ap |void |taint_proper |const char* f|const char* s +Ap |UV |to_utf8_lower |U8 *p +Ap |UV |to_utf8_upper |U8 *p +Ap |UV |to_utf8_title |U8 *p #if defined(UNLINK_ALL_VERSIONS) -p |I32 |unlnk |char* f +Ap |I32 |unlnk |char* f #endif #if defined(USE_THREADS) -p |void |unlock_condpair|void* svv +Ap |void |unlock_condpair|void* svv #endif -p |void |unsharepvn |const char* sv|I32 len|U32 hash +Ap |void |unsharepvn |const char* sv|I32 len|U32 hash p |void |unshare_hek |HEK* hek p |void |utilize |int aver|I32 floor|OP* version|OP* id|OP* arg -p |U8* |utf16_to_utf8 |U16* p|U8 *d|I32 bytelen -p |U8* |utf16_to_utf8_reversed|U16* p|U8 *d|I32 bytelen -p |I32 |utf8_distance |U8 *a|U8 *b -p |U8* |utf8_hop |U8 *s|I32 off -p |UV |utf8_to_uv |U8 *s|I32* retlen -p |U8* |uv_to_utf8 |U8 *d|UV uv +Ap |U8* |utf16_to_utf8 |U16* p|U8 *d|I32 bytelen +Ap |U8* |utf16_to_utf8_reversed|U16* p|U8 *d|I32 bytelen +Ap |I32 |utf8_distance |U8 *a|U8 *b +Ap |U8* |utf8_hop |U8 *s|I32 off +Ap |UV |utf8_to_uv |U8 *s|I32* retlen +Ap |U8* |uv_to_utf8 |U8 *d|UV uv p |void |vivify_defelem |SV* sv p |void |vivify_ref |SV* sv|U32 to_what p |I32 |wait4pid |Pid_t pid|int* statusp|int flags +p |void |report_closed_fh|GV *gv|IO *io|const char *func|const char *obj p |void |report_uninit -p |void |warn |const char* pat|... -p |void |vwarn |const char* pat|va_list* args -p |void |warner |U32 err|const char* pat|... -p |void |vwarner |U32 err|const char* pat|va_list* args +Afpd |void |warn |const char* pat|... +Ap |void |vwarn |const char* pat|va_list* args +Afp |void |warner |U32 err|const char* pat|... +Ap |void |vwarner |U32 err|const char* pat|va_list* args p |void |watch |char** addr p |I32 |whichsig |char* sig p |int |yyerror |char* s @@ -1782,94 +2048,94 @@ p |int |yylex p |int |yyparse p |int |yywarn |char* s #if defined(MYMALLOC) -p |void |dump_mstats |char* s +Ap |void |dump_mstats |char* s #endif -np |Malloc_t|safesysmalloc |MEM_SIZE nbytes -np |Malloc_t|safesyscalloc |MEM_SIZE elements|MEM_SIZE size -np |Malloc_t|safesysrealloc|Malloc_t where|MEM_SIZE nbytes -np |Free_t |safesysfree |Malloc_t where +Anp |Malloc_t|safesysmalloc |MEM_SIZE nbytes +Anp |Malloc_t|safesyscalloc |MEM_SIZE elements|MEM_SIZE size +Anp |Malloc_t|safesysrealloc|Malloc_t where|MEM_SIZE nbytes +Anp |Free_t |safesysfree |Malloc_t where #if defined(LEAKTEST) -np |Malloc_t|safexmalloc |I32 x|MEM_SIZE size -np |Malloc_t|safexcalloc |I32 x|MEM_SIZE elements|MEM_SIZE size -np |Malloc_t|safexrealloc |Malloc_t where|MEM_SIZE size -np |void |safexfree |Malloc_t where +Anp |Malloc_t|safexmalloc |I32 x|MEM_SIZE size +Anp |Malloc_t|safexcalloc |I32 x|MEM_SIZE elements|MEM_SIZE size +Anp |Malloc_t|safexrealloc |Malloc_t where|MEM_SIZE size +Anp |void |safexfree |Malloc_t where #endif #if defined(PERL_GLOBAL_STRUCT) -p |struct perl_vars *|GetVars +Ap |struct perl_vars *|GetVars #endif -p |int |runops_standard -p |int |runops_debug -p |void |sv_catpvf_mg |SV *sv|const char* pat|... -p |void |sv_vcatpvf_mg |SV* sv|const char* pat|va_list* args -p |void |sv_catpv_mg |SV *sv|const char *ptr -p |void |sv_catpvn_mg |SV *sv|const char *ptr|STRLEN len -p |void |sv_catsv_mg |SV *dstr|SV *sstr -p |void |sv_setpvf_mg |SV *sv|const char* pat|... -p |void |sv_vsetpvf_mg |SV* sv|const char* pat|va_list* args -p |void |sv_setiv_mg |SV *sv|IV i -p |void |sv_setpviv_mg |SV *sv|IV iv -p |void |sv_setuv_mg |SV *sv|UV u -p |void |sv_setnv_mg |SV *sv|NV num -p |void |sv_setpv_mg |SV *sv|const char *ptr -p |void |sv_setpvn_mg |SV *sv|const char *ptr|STRLEN len -p |void |sv_setsv_mg |SV *dstr|SV *sstr -p |void |sv_usepvn_mg |SV *sv|char *ptr|STRLEN len -p |MGVTBL*|get_vtbl |int vtbl_id +Ap |int |runops_standard +Ap |int |runops_debug +Afpd |void |sv_catpvf_mg |SV *sv|const char* pat|... +Ap |void |sv_vcatpvf_mg |SV* sv|const char* pat|va_list* args +Apd |void |sv_catpv_mg |SV *sv|const char *ptr +Apd |void |sv_catpvn_mg |SV *sv|const char *ptr|STRLEN len +Apd |void |sv_catsv_mg |SV *dstr|SV *sstr +Afpd |void |sv_setpvf_mg |SV *sv|const char* pat|... +Ap |void |sv_vsetpvf_mg |SV* sv|const char* pat|va_list* args +Apd |void |sv_setiv_mg |SV *sv|IV i +Apd |void |sv_setpviv_mg |SV *sv|IV iv +Apd |void |sv_setuv_mg |SV *sv|UV u +Apd |void |sv_setnv_mg |SV *sv|NV num +Apd |void |sv_setpv_mg |SV *sv|const char *ptr +Apd |void |sv_setpvn_mg |SV *sv|const char *ptr|STRLEN len +Apd |void |sv_setsv_mg |SV *dstr|SV *sstr +Apd |void |sv_usepvn_mg |SV *sv|char *ptr|STRLEN len +Ap |MGVTBL*|get_vtbl |int vtbl_id p |char* |pv_display |SV *sv|char *pv|STRLEN cur|STRLEN len \ |STRLEN pvlim -p |void |dump_indent |I32 level|PerlIO *file|const char* pat|... -p |void |dump_vindent |I32 level|PerlIO *file|const char* pat \ +Afp |void |dump_indent |I32 level|PerlIO *file|const char* pat|... +Ap |void |dump_vindent |I32 level|PerlIO *file|const char* pat \ |va_list *args -p |void |do_gv_dump |I32 level|PerlIO *file|char *name|GV *sv -p |void |do_gvgv_dump |I32 level|PerlIO *file|char *name|GV *sv -p |void |do_hv_dump |I32 level|PerlIO *file|char *name|HV *sv -p |void |do_magic_dump |I32 level|PerlIO *file|MAGIC *mg|I32 nest \ +Ap |void |do_gv_dump |I32 level|PerlIO *file|char *name|GV *sv +Ap |void |do_gvgv_dump |I32 level|PerlIO *file|char *name|GV *sv +Ap |void |do_hv_dump |I32 level|PerlIO *file|char *name|HV *sv +Ap |void |do_magic_dump |I32 level|PerlIO *file|MAGIC *mg|I32 nest \ |I32 maxnest|bool dumpops|STRLEN pvlim -p |void |do_op_dump |I32 level|PerlIO *file|OP *o -p |void |do_pmop_dump |I32 level|PerlIO *file|PMOP *pm -p |void |do_sv_dump |I32 level|PerlIO *file|SV *sv|I32 nest \ +Ap |void |do_op_dump |I32 level|PerlIO *file|OP *o +Ap |void |do_pmop_dump |I32 level|PerlIO *file|PMOP *pm +Ap |void |do_sv_dump |I32 level|PerlIO *file|SV *sv|I32 nest \ |I32 maxnest|bool dumpops|STRLEN pvlim -p |void |magic_dump |MAGIC *mg -p |void* |default_protect|volatile JMPENV *je|int *excpt \ +Ap |void |magic_dump |MAGIC *mg +Ap |void* |default_protect|volatile JMPENV *je|int *excpt \ |protect_body_t body|... -p |void* |vdefault_protect|volatile JMPENV *je|int *excpt \ +Ap |void* |vdefault_protect|volatile JMPENV *je|int *excpt \ |protect_body_t body|va_list *args -p |void |reginitcolors -p |char* |sv_2pv_nolen |SV* sv -p |char* |sv_2pvutf8_nolen|SV* sv -p |char* |sv_2pvbyte_nolen|SV* sv -p |char* |sv_pv |SV *sv -p |char* |sv_pvutf8 |SV *sv -p |char* |sv_pvbyte |SV *sv -p |void |sv_force_normal|SV *sv -p |void |tmps_grow |I32 n -p |SV* |sv_rvweaken |SV *sv +Ap |void |reginitcolors +Ap |char* |sv_2pv_nolen |SV* sv +Ap |char* |sv_2pvutf8_nolen|SV* sv +Ap |char* |sv_2pvbyte_nolen|SV* sv +Ap |char* |sv_pv |SV *sv +Ap |char* |sv_pvutf8 |SV *sv +Ap |char* |sv_pvbyte |SV *sv +Ap |void |sv_force_normal|SV *sv +Ap |void |tmps_grow |I32 n +Ap |SV* |sv_rvweaken |SV *sv p |int |magic_killbackrefs|SV *sv|MAGIC *mg -p |OP* |newANONATTRSUB |I32 floor|OP *proto|OP *attrs|OP *block -p |CV* |newATTRSUB |I32 floor|OP *o|OP *proto|OP *attrs|OP *block -p |void |newMYSUB |I32 floor|OP *o|OP *proto|OP *attrs|OP *block +Ap |OP* |newANONATTRSUB |I32 floor|OP *proto|OP *attrs|OP *block +Ap |CV* |newATTRSUB |I32 floor|OP *o|OP *proto|OP *attrs|OP *block +Ap |void |newMYSUB |I32 floor|OP *o|OP *proto|OP *attrs|OP *block p |OP * |my_attrs |OP *o|OP *attrs p |void |boot_core_xsutils #if defined(USE_ITHREADS) -p |PERL_CONTEXT*|cx_dup |PERL_CONTEXT* cx|I32 ix|I32 max -p |PERL_SI*|si_dup |PERL_SI* si -p |ANY* |ss_dup |PerlInterpreter* proto_perl -p |void* |any_dup |void* v|PerlInterpreter* proto_perl -p |HE* |he_dup |HE* e|bool shared -p |REGEXP*|re_dup |REGEXP* r -p |PerlIO*|fp_dup |PerlIO* fp|char type -p |DIR* |dirp_dup |DIR* dp -p |GP* |gp_dup |GP* gp -p |MAGIC* |mg_dup |MAGIC* mg -p |SV* |sv_dup |SV* sstr +Ap |PERL_CONTEXT*|cx_dup |PERL_CONTEXT* cx|I32 ix|I32 max +Ap |PERL_SI*|si_dup |PERL_SI* si +Ap |ANY* |ss_dup |PerlInterpreter* proto_perl +Ap |void* |any_dup |void* v|PerlInterpreter* proto_perl +Ap |HE* |he_dup |HE* e|bool shared +Ap |REGEXP*|re_dup |REGEXP* r +Ap |PerlIO*|fp_dup |PerlIO* fp|char type +Ap |DIR* |dirp_dup |DIR* dp +Ap |GP* |gp_dup |GP* gp +Ap |MAGIC* |mg_dup |MAGIC* mg +Ap |SV* |sv_dup |SV* sstr #if defined(HAVE_INTERP_INTERN) -p |void |sys_intern_dup |struct interp_intern* src \ +Ap |void |sys_intern_dup |struct interp_intern* src \ |struct interp_intern* dst #endif -p |PTR_TBL_t*|ptr_table_new -p |void* |ptr_table_fetch|PTR_TBL_t *tbl|void *sv -p |void |ptr_table_store|PTR_TBL_t *tbl|void *oldsv|void *newsv -p |void |ptr_table_split|PTR_TBL_t *tbl +Ap |PTR_TBL_t*|ptr_table_new +Ap |void* |ptr_table_fetch|PTR_TBL_t *tbl|void *sv +Ap |void |ptr_table_store|PTR_TBL_t *tbl|void *oldsv|void *newsv +Ap |void |ptr_table_split|PTR_TBL_t *tbl #endif #if defined(PERL_OBJECT) @@ -1928,6 +2194,7 @@ s |OP* |too_few_arguments|OP *o|char* name s |OP* |too_many_arguments|OP *o|char* name s |void |op_clear |OP* o s |void |null |OP* o +s |PADOFFSET|pad_addlex |SV* name s |PADOFFSET|pad_findlex |char* name|PADOFFSET newoff|U32 seq \ |CV* startcv|I32 cx_ix|I32 saweval|U32 flags s |OP* |newDEFSVOP diff --git a/embedvar.h b/embedvar.h index 837c030..e44a2ce 100644 --- a/embedvar.h +++ b/embedvar.h @@ -199,6 +199,7 @@ #define PL_bitcount (PERL_GET_INTERP->Ibitcount) #define PL_bufend (PERL_GET_INTERP->Ibufend) #define PL_bufptr (PERL_GET_INTERP->Ibufptr) +#define PL_checkav (PERL_GET_INTERP->Icheckav) #define PL_collation_ix (PERL_GET_INTERP->Icollation_ix) #define PL_collation_name (PERL_GET_INTERP->Icollation_name) #define PL_collation_standard (PERL_GET_INTERP->Icollation_standard) @@ -367,7 +368,6 @@ #define PL_statusvalue_vms (PERL_GET_INTERP->Istatusvalue_vms) #define PL_stderrgv (PERL_GET_INTERP->Istderrgv) #define PL_stdingv (PERL_GET_INTERP->Istdingv) -#define PL_stopav (PERL_GET_INTERP->Istopav) #define PL_strtab (PERL_GET_INTERP->Istrtab) #define PL_strtab_mutex (PERL_GET_INTERP->Istrtab_mutex) #define PL_sub_generation (PERL_GET_INTERP->Isub_generation) @@ -412,6 +412,7 @@ #define PL_utf8_xdigit (PERL_GET_INTERP->Iutf8_xdigit) #define PL_uudmap (PERL_GET_INTERP->Iuudmap) #define PL_warnhook (PERL_GET_INTERP->Iwarnhook) +#define PL_widesyscalls (PERL_GET_INTERP->Iwidesyscalls) #define PL_xiv_arenaroot (PERL_GET_INTERP->Ixiv_arenaroot) #define PL_xiv_root (PERL_GET_INTERP->Ixiv_root) #define PL_xnv_root (PERL_GET_INTERP->Ixnv_root) @@ -463,6 +464,7 @@ #define PL_bitcount (vTHX->Ibitcount) #define PL_bufend (vTHX->Ibufend) #define PL_bufptr (vTHX->Ibufptr) +#define PL_checkav (vTHX->Icheckav) #define PL_collation_ix (vTHX->Icollation_ix) #define PL_collation_name (vTHX->Icollation_name) #define PL_collation_standard (vTHX->Icollation_standard) @@ -631,7 +633,6 @@ #define PL_statusvalue_vms (vTHX->Istatusvalue_vms) #define PL_stderrgv (vTHX->Istderrgv) #define PL_stdingv (vTHX->Istdingv) -#define PL_stopav (vTHX->Istopav) #define PL_strtab (vTHX->Istrtab) #define PL_strtab_mutex (vTHX->Istrtab_mutex) #define PL_sub_generation (vTHX->Isub_generation) @@ -676,6 +677,7 @@ #define PL_utf8_xdigit (vTHX->Iutf8_xdigit) #define PL_uudmap (vTHX->Iuudmap) #define PL_warnhook (vTHX->Iwarnhook) +#define PL_widesyscalls (vTHX->Iwidesyscalls) #define PL_xiv_arenaroot (vTHX->Ixiv_arenaroot) #define PL_xiv_root (vTHX->Ixiv_root) #define PL_xnv_root (vTHX->Ixnv_root) @@ -864,6 +866,7 @@ #define PL_bitcount (aTHXo->interp.Ibitcount) #define PL_bufend (aTHXo->interp.Ibufend) #define PL_bufptr (aTHXo->interp.Ibufptr) +#define PL_checkav (aTHXo->interp.Icheckav) #define PL_collation_ix (aTHXo->interp.Icollation_ix) #define PL_collation_name (aTHXo->interp.Icollation_name) #define PL_collation_standard (aTHXo->interp.Icollation_standard) @@ -1032,7 +1035,6 @@ #define PL_statusvalue_vms (aTHXo->interp.Istatusvalue_vms) #define PL_stderrgv (aTHXo->interp.Istderrgv) #define PL_stdingv (aTHXo->interp.Istdingv) -#define PL_stopav (aTHXo->interp.Istopav) #define PL_strtab (aTHXo->interp.Istrtab) #define PL_strtab_mutex (aTHXo->interp.Istrtab_mutex) #define PL_sub_generation (aTHXo->interp.Isub_generation) @@ -1077,6 +1079,7 @@ #define PL_utf8_xdigit (aTHXo->interp.Iutf8_xdigit) #define PL_uudmap (aTHXo->interp.Iuudmap) #define PL_warnhook (aTHXo->interp.Iwarnhook) +#define PL_widesyscalls (aTHXo->interp.Iwidesyscalls) #define PL_xiv_arenaroot (aTHXo->interp.Ixiv_arenaroot) #define PL_xiv_root (aTHXo->interp.Ixiv_root) #define PL_xnv_root (aTHXo->interp.Ixnv_root) @@ -1129,6 +1132,7 @@ #define PL_Ibitcount PL_bitcount #define PL_Ibufend PL_bufend #define PL_Ibufptr PL_bufptr +#define PL_Icheckav PL_checkav #define PL_Icollation_ix PL_collation_ix #define PL_Icollation_name PL_collation_name #define PL_Icollation_standard PL_collation_standard @@ -1297,7 +1301,6 @@ #define PL_Istatusvalue_vms PL_statusvalue_vms #define PL_Istderrgv PL_stderrgv #define PL_Istdingv PL_stdingv -#define PL_Istopav PL_stopav #define PL_Istrtab PL_strtab #define PL_Istrtab_mutex PL_strtab_mutex #define PL_Isub_generation PL_sub_generation @@ -1342,6 +1345,7 @@ #define PL_Iutf8_xdigit PL_utf8_xdigit #define PL_Iuudmap PL_uudmap #define PL_Iwarnhook PL_warnhook +#define PL_Iwidesyscalls PL_widesyscalls #define PL_Ixiv_arenaroot PL_xiv_arenaroot #define PL_Ixiv_root PL_xiv_root #define PL_Ixnv_root PL_xnv_root diff --git a/ext/B/B/Asmdata.pm b/ext/B/B/Asmdata.pm index a7dbbe2..d62967f 100644 --- a/ext/B/B/Asmdata.pm +++ b/ext/B/B/Asmdata.pm @@ -12,7 +12,7 @@ package B::Asmdata; use Exporter; @ISA = qw(Exporter); @EXPORT_OK = qw(%insn_data @insn_name @optype @specialsv_name); -use vars qw(%insn_data @insn_name @optype @specialsv_name); +our(%insn_data, @insn_name, @optype, @specialsv_name); @optype = qw(OP UNOP BINOP LOGOP LISTOP PMOP SVOP PADOP PVOP LOOP COP); @specialsv_name = qw(Nullsv &PL_sv_undef &PL_sv_yes &PL_sv_no); diff --git a/ext/B/B/C.pm b/ext/B/B/C.pm index 6e3af0d..fa1053f 100644 --- a/ext/B/B/C.pm +++ b/ext/B/B/C.pm @@ -1576,6 +1576,8 @@ No copy-on-grow. Optimisation level (n = 0, 1, 2, ...). B<-O> means B<-O1>. Currently, B<-O1> and higher set B<-fcog>. +=back + =head1 EXAMPLES perl -MO=C,-ofoo.c foo.pl diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index be7088e..f8bcc7c 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -1194,7 +1194,7 @@ BEGIN { sub deparse_binop_left { my $self = shift; my($op, $left, $prec) = @_; - if ($left{assoc_class($op)} + if ($left{assoc_class($op)} && $left{assoc_class($left)} and $left{assoc_class($op)} == $left{assoc_class($left)}) { return $self->deparse($left, $prec - .00001); @@ -1227,7 +1227,7 @@ BEGIN { sub deparse_binop_right { my $self = shift; my($op, $right, $prec) = @_; - if ($right{assoc_class($op)} + if ($right{assoc_class($op)} && $right{assoc_class($right)} and $right{assoc_class($op)} == $right{assoc_class($right)}) { return $self->deparse($right, $prec - .00001); diff --git a/ext/B/B/Stash.pm b/ext/B/B/Stash.pm index d992a89..fca3443 100644 --- a/ext/B/B/Stash.pm +++ b/ext/B/B/Stash.pm @@ -4,7 +4,7 @@ package B::Stash; BEGIN { %Seen = %INC } -STOP { +CHECK { my @arr=scan($main::{"main::"}); @arr=map{s/\:\:$//;$_;} @arr; print "-umain,-u", join (",-u",@arr) ,"\n"; diff --git a/ext/B/NOTES b/ext/B/NOTES index 8309892..89d03ba 100644 --- a/ext/B/NOTES +++ b/ext/B/NOTES @@ -161,8 +161,8 @@ O module it should return a sub ref (usually a closure) to perform the actual compilation. When O regains control, it ensures that the "-c" option is forced (so that the program being compiled doesn't - end up running) and registers a STOP block to call back the sub ref + end up running) and registers a CHECK block to call back the sub ref returned from the backend's compile(). Perl then continues by parsing prog.pl (just as it would with "perl -c prog.pl") and after - doing so, assuming there are no parse-time errors, the STOP block + doing so, assuming there are no parse-time errors, the CHECK block of O gets called and the actual backend compilation happens. Phew. diff --git a/ext/B/O.pm b/ext/B/O.pm index d07c4a5..352f8d4 100644 --- a/ext/B/O.pm +++ b/ext/B/O.pm @@ -11,7 +11,7 @@ sub import { my $compilesub = &{"B::${backend}::compile"}(@options); if (ref($compilesub) eq "CODE") { minus_c; - eval 'STOP { &$compilesub() }'; + eval 'CHECK { &$compilesub() }'; } else { die $compilesub; } @@ -59,7 +59,7 @@ C module and calls the C function in that package, passing it OPTIONS. That function is expected to return a sub reference which we'll call CALLBACK. Next, the "compile-only" flag is switched on (equivalent to the command-line option C<-c>) -and a STOP block is registered which calls CALLBACK. Thus the main +and a CHECK block is registered which calls CALLBACK. Thus the main Perl program mentioned on the command-line is read in, parsed and compiled into internal syntax tree form. Since the C<-c> flag is set, the program does not start running (excepting BEGIN blocks of diff --git a/ext/DB_File/Changes b/ext/DB_File/Changes index 8f36456..95eb487 100644 --- a/ext/DB_File/Changes +++ b/ext/DB_File/Changes @@ -279,3 +279,15 @@ * Updated to support Berkeley DB 3.x * Updated dbinfo for Berkeley DB 3.x file formats. + +1.72 16th January 2000 + + * Added hints/sco.pl + + * The module will now use XSLoader when it is available. When it + isn't it will use DynaLoader. + + * The locking section in DB_File.pm has been discredited. Many thanks + to David Harris for spotting the underlying problem, contributing + the updates to the documentation and writing DB_File::Lock (available + on CPAN). diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm index 661a523..00b24b9 100644 --- a/ext/DB_File/DB_File.pm +++ b/ext/DB_File/DB_File.pm @@ -1,10 +1,10 @@ # DB_File.pm -- Perl 5 interface to Berkeley DB # # written by Paul Marquess (Paul.Marquess@btinternet.com) -# last modified 4th September 1999 -# version 1.71 +# last modified 16th January 2000 +# version 1.72 # -# Copyright (c) 1995-1999 Paul Marquess. All rights reserved. +# Copyright (c) 1995-2000 Paul Marquess. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. @@ -141,11 +141,13 @@ sub TIEHASH package DB_File ; use strict; -use vars qw($VERSION @ISA @EXPORT $AUTOLOAD $DB_BTREE $DB_HASH $DB_RECNO $db_version) ; +use vars qw($VERSION @ISA @EXPORT $AUTOLOAD $DB_BTREE $DB_HASH $DB_RECNO + $db_version $use_XSLoader + ) ; use Carp; -$VERSION = "1.71" ; +$VERSION = "1.72" ; #typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE; $DB_BTREE = new DB_File::BTREEINFO ; @@ -155,8 +157,18 @@ $DB_RECNO = new DB_File::RECNOINFO ; require Tie::Hash; require Exporter; use AutoLoader; -use XSLoader (); -@ISA = qw(Tie::Hash Exporter); +BEGIN { + $use_XSLoader = 1 ; + eval { require XSLoader } ; + + if ($@) { + $use_XSLoader = 0 ; + require DynaLoader; + @ISA = qw(DynaLoader); + } +} + +push @ISA, qw(Tie::Hash Exporter); @EXPORT = qw( $DB_BTREE $DB_HASH $DB_RECNO @@ -219,19 +231,10 @@ eval { push(@EXPORT, @O); }; -## import borrowed from IO::File -## exports Fcntl constants if available. -#sub import { -# my $pkg = shift; -# my $callpkg = caller; -# Exporter::export $pkg, $callpkg, @_; -# eval { -# require Fcntl; -# Exporter::export 'Fcntl', $callpkg, '/^O_/'; -# }; -#} - -XSLoader::load 'DB_File', $VERSION; +if ($use_XSLoader) + { XSLoader::load("DB_File", $VERSION)} +else + { bootstrap DB_File $VERSION } # Preloaded methods go here. Autoload methods go after __END__, and are # processed by the autosplit program. @@ -475,12 +478,7 @@ like version 1. This feature allows B scripts that were built with version 1 to be migrated to version 2 or 3 without any changes. If you want to make use of the new features available in Berkeley DB -2.x or 3.x, use the Perl module B instead. - -At the time of writing this document the B module is still -alpha quality (the version number is < 1.0), and so unsuitable for use -in any serious development work. Once its version number is >= 1.0, it -is considered stable enough for real work. +2.x or greater, use the Perl module B instead. B The database file format has changed in both Berkeley DB version 2 and 3. If you cannot recreate your databases, you must dump @@ -953,7 +951,7 @@ and it will print: $status = $X->find_dup($key, $value) ; -This method checks for the existance of a specific key/value pair. If the +This method checks for the existence of a specific key/value pair. If the pair exists, the cursor is left pointing to the pair and the method returns 0. Otherwise the method returns a non-zero value. @@ -995,7 +993,7 @@ This method deletes a specific key/value pair. It returns 0 if they exist and have been deleted successfully. Otherwise the method returns a non-zero value. -Again assuming the existance of the C database +Again assuming the existence of the C database use strict ; use DB_File ; @@ -1491,8 +1489,8 @@ R_CURSOR is the only valid flag at present. Returns the file descriptor for the underlying database. -See L for an example of how to make use of the -C method to lock your database. +See L for an explanation for why you should +not use C to lock your database. =item B<$status = $X-Eseq($key, $value, $flags) ;> @@ -1651,64 +1649,124 @@ filters. =head1 HINTS AND TIPS -=head2 Locking Databases +=head2 Locking: The Trouble with fd -Concurrent access of a read-write database by several parties requires -them all to use some kind of locking. Here's an example of Tom's that -uses the I method to get the file descriptor, and then a careful -open() to give something Perl will flock() for you. Run this repeatedly -in the background to watch the locks granted in proper order. +Until version 1.72 of this module, the recommended technique for locking +B databases was to flock the filehandle returned from the "fd" +function. Unfortunately this technique has been shown to be fundamentally +flawed (Kudos to David Harris for tracking this down). Use it at your own +peril! - use DB_File; +The locking technique went like this. - use strict; + $db = tie(%db, 'DB_File', '/tmp/foo.db', O_CREAT|O_RDWR, 0644) + || die "dbcreat /tmp/foo.db $!"; + $fd = $db->fd; + open(DB_FH, "+<&=$fd") || die "dup $!"; + flock (DB_FH, LOCK_EX) || die "flock: $!"; + ... + $db{"Tom"} = "Jerry" ; + ... + flock(DB_FH, LOCK_UN); + undef $db; + untie %db; + close(DB_FH); - sub LOCK_SH { 1 } - sub LOCK_EX { 2 } - sub LOCK_NB { 4 } - sub LOCK_UN { 8 } +In simple terms, this is what happens: - my($oldval, $fd, $db, %db, $value, $key); +=over 5 - $key = shift || 'default'; - $value = shift || 'magic'; +=item 1. - $value .= " $$"; +Use "tie" to open the database. - $db = tie(%db, 'DB_File', '/tmp/foo.db', O_CREAT|O_RDWR, 0644) - || die "dbcreat /tmp/foo.db $!"; - $fd = $db->fd; - print "$$: db fd is $fd\n"; - open(DB_FH, "+<&=$fd") || die "dup $!"; +=item 2. +Lock the database with fd & flock. - unless (flock (DB_FH, LOCK_SH | LOCK_NB)) { - print "$$: CONTENTION; can't read during write update! - Waiting for read lock ($!) ...."; - unless (flock (DB_FH, LOCK_SH)) { die "flock: $!" } - } - print "$$: Read lock granted\n"; +=item 3. - $oldval = $db{$key}; - print "$$: Old value was $oldval\n"; - flock(DB_FH, LOCK_UN); +Read & Write to the database. - unless (flock (DB_FH, LOCK_EX | LOCK_NB)) { - print "$$: CONTENTION; must have exclusive lock! - Waiting for write lock ($!) ...."; - unless (flock (DB_FH, LOCK_EX)) { die "flock: $!" } - } +=item 4. - print "$$: Write lock granted\n"; - $db{$key} = $value; - $db->sync; # to flush - sleep 10; +Unlock and close the database. - flock(DB_FH, LOCK_UN); - undef $db; - untie %db; - close(DB_FH); - print "$$: Updated db to $key=$value\n"; +=back + +Here is the crux of the problem. A side-effect of opening the B +database in step 2 is that an initial block from the database will get +read from disk and cached in memory. + +To see why this is a problem, consider what can happen when two processes, +say "A" and "B", both want to update the same B database +using the locking steps outlined above. Assume process "A" has already +opened the database and has a write lock, but it hasn't actually updated +the database yet (it has finished step 2, but not started step 3 yet). Now +process "B" tries to open the same database - step 1 will succeed, +but it will block on step 2 until process "A" releases the lock. The +important thing to notice here is that at this point in time both +processes will have cached identical initial blocks from the database. + +Now process "A" updates the database and happens to change some of the +data held in the initial buffer. Process "A" terminates, flushing +all cached data to disk and releasing the database lock. At this point +the database on disk will correctly reflect the changes made by process +"A". + +With the lock released, process "B" can now continue. It also updates the +database and unfortunately it too modifies the data that was in its +initial buffer. Once that data gets flushed to disk it will overwrite +some/all of the changes process "A" made to the database. + +The result of this scenario is at best a database that doesn't contain +what you expect. At worst the database will corrupt. + +The above won't happen every time competing process update the same +B database, but it does illustrate why the technique should +not be used. + +=head2 Safe ways to lock a database + +Starting with version 2.x, Berkeley DB has internal support for locking. +The companion module to this one, B, provides an interface +to this locking functionality. If you are serious about locking +Berkeley DB databases, I strongly recommend using B. + +If using B isn't an option, there are a number of modules +available on CPAN that can be used to implement locking. Each one +implements locking differently and has different goals in mind. It is +therefore worth knowing the difference, so that you can pick the right +one for your application. Here are the three locking wrappers: + +=over 5 + +=item B + +A B wrapper which creates copies of the database file for +read access, so that you have a kind of a multiversioning concurrent read +system. However, updates are still serial. Use for databases where reads +may be lengthy and consistency problems may occur. + +=item B + +A B wrapper that has the ability to lock and unlock the database +while it is being used. Avoids the tie-before-flock problem by simply +re-tie-ing the database when you get or drop a lock. Because of the +flexibility in dropping and re-acquiring the lock in the middle of a +session, this can be massaged into a system that will work with long +updates and/or reads if the application follows the hints in the POD +documentation. + +=item B + +An extremely lightweight B wrapper that simply flocks a lockfile +before tie-ing the database and drops the lock after the untie. Allows +one to use the same lockfile for multiple databases to avoid deadlock +problems, if desired. Use for databases where updates are reads are +quick and simple flock locking semantics are enough. + +=back =head2 Sharing Databases With C Applications @@ -1814,7 +1872,7 @@ C<%x>, and C<$X> above hold a reference to the object. The call to untie() will destroy the first, but C<$X> still holds a valid reference, so the destructor will not get called and the database file F will remain open. The fact that Berkeley DB then reports the -attempt to open a database that is alreday open via the catch-all +attempt to open a database that is already open via the catch-all "Invalid argument" doesn't help. If you run the script with the C<-w> flag the error message becomes: @@ -1966,7 +2024,7 @@ makes use of, namely Berkeley DB, is not. Berkeley DB has its own copyright and its own license. Please take the time to read it. Here are are few words taken from the Berkeley DB FAQ (at -http://www.sleepycat.com) regarding the license: +F) regarding the license: Do I have to license DB to use it in Perl scripts? diff --git a/ext/DB_File/DB_File.xs b/ext/DB_File/DB_File.xs index ccb9b75..7bc2491 100644 --- a/ext/DB_File/DB_File.xs +++ b/ext/DB_File/DB_File.xs @@ -3,12 +3,12 @@ DB_File.xs -- Perl 5 interface to Berkeley DB written by Paul Marquess - last modified 7th September 1999 - version 1.71 + last modified 16th January 2000 + version 1.72 All comments/suggestions/problems are welcome - Copyright (c) 1995-9 Paul Marquess. All rights reserved. + Copyright (c) 1995-2000 Paul Marquess. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. @@ -81,6 +81,7 @@ 1.71 - Support for Berkeley DB version 3. Support for Berkeley DB 2/3's backward compatability mode. Rewrote push + 1.72 - No change to DB_File.xs */ diff --git a/ext/DB_File/Makefile.PL b/ext/DB_File/Makefile.PL index a247924..cac6578 100644 --- a/ext/DB_File/Makefile.PL +++ b/ext/DB_File/Makefile.PL @@ -16,7 +16,7 @@ WriteMakefile( VERSION_FROM => 'DB_File.pm', OBJECT => 'version$(OBJ_EXT) DB_File$(OBJ_EXT)', XSPROTOARG => '-noprototypes', - DEFINE => "$OS2", + DEFINE => $OS2 || "", ); sub MY::postamble { diff --git a/ext/DB_File/version.c b/ext/DB_File/version.c index 23c96a6..f8c6cac 100644 --- a/ext/DB_File/version.c +++ b/ext/DB_File/version.c @@ -3,18 +3,19 @@ version.c -- Perl 5 interface to Berkeley DB written by Paul Marquess - last modified 7th September 1999 - version 1.71 + last modified 16th January 2000 + version 1.72 All comments/suggestions/problems are welcome - Copyright (c) 1995-9 Paul Marquess. All rights reserved. + Copyright (c) 1995-2000 Paul Marquess. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Changes: 1.71 - Support for Berkeley DB version 3. Support for Berkeley DB 2/3's backward compatability mode. + 1.72 - No change. */ diff --git a/ext/Data/Dumper/Dumper.pm b/ext/Data/Dumper/Dumper.pm index a4aa328..00f623d 100644 --- a/ext/Data/Dumper/Dumper.pm +++ b/ext/Data/Dumper/Dumper.pm @@ -13,7 +13,7 @@ $VERSION = '2.101'; #$| = 1; -require 5.004_02; +require 5.005_64; require Exporter; use XSLoader (); require overload; @@ -230,7 +230,7 @@ sub _dump { if ($s->{purity} and $s->{level} > 0) { $out = ($realtype eq 'HASH') ? '{}' : ($realtype eq 'ARRAY') ? '[]' : - "''" ; + 'do{my $o}' ; push @post, $name . " = " . $s->{seen}{$id}[0]; } else { diff --git a/ext/Data/Dumper/Dumper.xs b/ext/Data/Dumper/Dumper.xs index 125375f..6394a63 100644 --- a/ext/Data/Dumper/Dumper.xs +++ b/ext/Data/Dumper/Dumper.xs @@ -202,7 +202,7 @@ DD_dump(pTHX_ SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv, else if (realtype == SVt_PVAV) sv_catpvn(retval, "[]", 2); else - sv_catpvn(retval, "''", 2); + sv_catpvn(retval, "do{my $o}", 9); postentry = newSVpvn(name, namelen); sv_catpvn(postentry, " = ", 3); sv_catsv(postentry, othername); diff --git a/ext/Devel/DProf/DProf.pm b/ext/Devel/DProf/DProf.pm index e9372ff..38082fc 100644 --- a/ext/Devel/DProf/DProf.pm +++ b/ext/Devel/DProf/DProf.pm @@ -1,4 +1,4 @@ -require 5.003; +require 5.005_64; =head1 NAME @@ -187,7 +187,8 @@ sub DB { use XSLoader (); -$Devel::DProf::VERSION = '19990108'; # this version not authorized by +# Underscore to allow older Perls to access older version from CPAN +$Devel::DProf::VERSION = '20000000.00_00'; # this version not authorized by # Dean Roehrich. See "Changes" file. XSLoader::load 'Devel::DProf', $Devel::DProf::VERSION; diff --git a/ext/Devel/DProf/DProf.xs b/ext/Devel/DProf/DProf.xs index d59c9df..31e984f 100644 --- a/ext/Devel/DProf/DProf.xs +++ b/ext/Devel/DProf/DProf.xs @@ -143,20 +143,21 @@ dprof_times(pTHX_ struct tms *t) #ifdef OS2 ULONG rc; QWORD cnt; + STRLEN n_a; if (!g_frequ) { if (CheckOSError(DosTmrQueryFreq(&g_frequ))) - croak("DosTmrQueryFreq: %s", SvPV(perl_get_sv("!",TRUE),na)); + croak("DosTmrQueryFreq: %s", SvPV(perl_get_sv("!",TRUE),n_a)); else g_frequ = g_frequ/DPROF_HZ; /* count per tick */ if (CheckOSError(DosTmrQueryTime(&cnt))) croak("DosTmrQueryTime: %s", - SvPV(perl_get_sv("!",TRUE),na)); + SvPV(perl_get_sv("!",TRUE), n_a)); g_start_cnt = toLongLong(cnt); } if (CheckOSError(DosTmrQueryTime(&cnt))) - croak("DosTmrQueryTime: %s", SvPV(perl_get_sv("!",TRUE),na)); + croak("DosTmrQueryTime: %s", SvPV(perl_get_sv("!",TRUE), n_a)); t->tms_stime = 0; return (t->tms_utime = (toLongLong(cnt) - g_start_cnt)/g_frequ); #else /* !OS2 */ @@ -538,7 +539,7 @@ XS(XS_DB_sub) { HV *oldstash = PL_curstash; - DBG_SUB_NOTIFY("XS DBsub(%s)\n", SvPV(Sub, na)); + DBG_SUB_NOTIFY("XS DBsub(%s)\n", SvPV_nolen(Sub)); SAVEDESTRUCTOR_X(check_depth, (void*)g_depth); g_depth++; @@ -577,7 +578,7 @@ XS(XS_DB_goto) HV *oldstash = PL_curstash; SV *Sub = GvSV(PL_DBsub); /* name of current sub */ /* SP -= items; added by xsubpp */ - DBG_SUB_NOTIFY("XS DBsub(%s)\n", SvPV(Sub, na)); + DBG_SUB_NOTIFY("XS DBsub(%s)\n", SvPV_nolen(Sub)); sv_setiv(PL_DBsingle, 0); /* disable DB single-stepping */ diff --git a/ext/Devel/Peek/Peek.pm b/ext/Devel/Peek/Peek.pm index 4b472ad..080251b 100644 --- a/ext/Devel/Peek/Peek.pm +++ b/ext/Devel/Peek/Peek.pm @@ -3,14 +3,15 @@ package Devel::Peek; -$VERSION = 0.95; +# Underscore to allow older Perls to access older version from CPAN +$VERSION = '1.00_01'; require Exporter; use XSLoader (); @ISA = qw(Exporter); @EXPORT = qw(Dump mstat DeadCode DumpArray DumpWithOP DumpProg); -@EXPORT_OK = qw(SvREFCNT SvREFCNT_inc SvREFCNT_dec); +@EXPORT_OK = qw(SvREFCNT SvREFCNT_inc SvREFCNT_dec CvGV); %EXPORT_TAGS = ('ALL' => [@EXPORT, @EXPORT_OK]); XSLoader::load 'Devel::Peek'; @@ -372,32 +373,32 @@ This shows that =over -=item +=item * the subroutine is not an XSUB (since C and C are non-zero, and C is zero); -=item +=item * that it was compiled in the package C
    ; -=item +=item * under the name C; -=item +=item * inside a 5th eval in the program; -=item +=item * it is not currently executed (see C); -=item +=item * it has no prototype (C field is missing). -=over +=back =head1 EXPORTS diff --git a/ext/Devel/Peek/Peek.xs b/ext/Devel/Peek/Peek.xs index d2f66c4..8af8847 100644 --- a/ext/Devel/Peek/Peek.xs +++ b/ext/Devel/Peek/Peek.xs @@ -125,6 +125,10 @@ DeadCode(pTHX) PerlIO_printf(Perl_debug_log, "%s: perl not compiled with DEBUGGING_MSTATS\n",str); #endif +#define _CvGV(cv) \ + (SvROK(cv) && (SvTYPE(SvRV(cv))==SVt_PVCV) \ + ? (SV*)CvGV((CV*)SvRV(cv)) : &PL_sv_undef) + MODULE = Devel::Peek PACKAGE = Devel::Peek void @@ -206,3 +210,9 @@ CODE: RETVAL = DeadCode(aTHX); OUTPUT: RETVAL + +MODULE = Devel::Peek PACKAGE = Devel::Peek PREFIX = _ + +SV * +_CvGV(cv) + SV *cv diff --git a/ext/Fcntl/Fcntl.pm b/ext/Fcntl/Fcntl.pm index 1eb14e9..43bec99 100644 --- a/ext/Fcntl/Fcntl.pm +++ b/ext/Fcntl/Fcntl.pm @@ -42,7 +42,7 @@ what constants are implemented in your system. =cut -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD); +our($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS, $AUTOLOAD); require Exporter; use XSLoader (); diff --git a/ext/File/Glob/Glob.pm b/ext/File/Glob/Glob.pm index 6b5ff84..6026499 100644 --- a/ext/File/Glob/Glob.pm +++ b/ext/File/Glob/Glob.pm @@ -2,8 +2,8 @@ package File::Glob; use strict; use Carp; -use vars qw($VERSION @ISA @EXPORT_OK @EXPORT_FAIL - %EXPORT_TAGS $AUTOLOAD $DEFAULT_FLAGS); +our($VERSION, @ISA, @EXPORT_OK, @EXPORT_FAIL, %EXPORT_TAGS, + $AUTOLOAD, $DEFAULT_FLAGS); require Exporter; use XSLoader (); @@ -238,7 +238,7 @@ The FreeBSD extensions to the POSIX standard are the following flags: =item C -Pre-process the string to expand C<{pat,pat,...} strings like csh(1). +Pre-process the string to expand C<{pat,pat,...}> strings like csh(1). The pattern '{}' is left unexpanded for historical reasons (and csh(1) does the same thing to ease typing of find(1) patterns). @@ -331,6 +331,8 @@ Win32 users should use the real slash. If you really want to use backslashes, consider using Sarathy's File::DosGlob, which comes with the standard Perl distribution. +=back + =head1 AUTHOR The Perl interface was written by Nathan Torkington Egnat@frii.comE, diff --git a/ext/GDBM_File/GDBM_File.pm b/ext/GDBM_File/GDBM_File.pm index 663a679..ab866ee 100644 --- a/ext/GDBM_File/GDBM_File.pm +++ b/ext/GDBM_File/GDBM_File.pm @@ -40,7 +40,7 @@ L, L, L. package GDBM_File; use strict; -use vars qw($VERSION @ISA @EXPORT $AUTOLOAD); +our($VERSION, @ISA, @EXPORT, $AUTOLOAD); require Carp; require Tie::Hash; diff --git a/ext/IO/IO.xs b/ext/IO/IO.xs index e5ce83d..be84f73 100644 --- a/ext/IO/IO.xs +++ b/ext/IO/IO.xs @@ -62,23 +62,28 @@ io_blocking(InputStream f, int block) /* POSIX style */ #if defined(O_NDELAY) && O_NDELAY != O_NONBLOCK /* Ooops has O_NDELAY too - make sure we don't - * get SysV behaviour by mistake - */ - RETVAL = RETVAL & O_NONBLOCK ? 0 : 1; - - if ((mode & O_NDELAY) || ((block == 0) && !(mode & O_NONBLOCK))) { - int ret; - mode = (mode & ~O_NDELAY) | O_NONBLOCK; - ret = fcntl(PerlIO_fileno(f),F_SETFL,mode); - if(ret < 0) - RETVAL = ret; - } - else if ((mode & O_NDELAY) || ((block > 0) && (mode & O_NONBLOCK))) { - int ret; - mode &= ~(O_NONBLOCK | O_NDELAY); - ret = fcntl(PerlIO_fileno(f),F_SETFL,mode); - if(ret < 0) - RETVAL = ret; + * get SysV behaviour by mistake. */ + + /* E.g. In UNICOS and UNICOS/mk a F_GETFL returns an O_NDELAY + * after a successful F_SETFL of an O_NONBLOCK. */ + RETVAL = RETVAL & (O_NONBLOCK | O_NDELAY) ? 0 : 1; + + if (block >= 0) { + if ((mode & O_NDELAY) || ((block == 0) && !(mode & O_NONBLOCK))) { + int ret; + mode = (mode & ~O_NDELAY) | O_NONBLOCK; + ret = fcntl(PerlIO_fileno(f),F_SETFL,mode); + if(ret < 0) + RETVAL = ret; + } + else + if ((mode & O_NDELAY) || ((block > 0) && (mode & O_NONBLOCK))) { + int ret; + mode &= ~(O_NONBLOCK | O_NDELAY); + ret = fcntl(PerlIO_fileno(f),F_SETFL,mode); + if(ret < 0) + RETVAL = ret; + } } #else /* Standard POSIX */ diff --git a/ext/IO/lib/IO/Dir.pm b/ext/IO/lib/IO/Dir.pm index f505e79..1fa07ed 100644 --- a/ext/IO/lib/IO/Dir.pm +++ b/ext/IO/lib/IO/Dir.pm @@ -13,7 +13,7 @@ use Carp; use Symbol; use Exporter; use IO::File; -use vars qw(@ISA $VERSION @EXPORT_OK); +our(@ISA, $VERSION, @EXPORT_OK); use Tie::Hash; use File::stat; diff --git a/ext/IO/lib/IO/File.pm b/ext/IO/lib/IO/File.pm index 47f43d1..819b4b1 100644 --- a/ext/IO/lib/IO/File.pm +++ b/ext/IO/lib/IO/File.pm @@ -103,9 +103,9 @@ Derived from FileHandle.pm by Graham Barr EFE. =cut -require 5.000; +require 5.005_64; use strict; -use vars qw($VERSION @EXPORT @EXPORT_OK @ISA); +our($VERSION, @EXPORT, @EXPORT_OK, @ISA); use Carp; use Symbol; use SelectSaver; diff --git a/ext/IO/lib/IO/Handle.pm b/ext/IO/lib/IO/Handle.pm index 2205368..930df55 100644 --- a/ext/IO/lib/IO/Handle.pm +++ b/ext/IO/lib/IO/Handle.pm @@ -232,9 +232,9 @@ Derived from FileHandle.pm by Graham Barr EFE =cut -require 5.000; +require 5.005_64; use strict; -use vars qw($VERSION @EXPORT_OK @ISA); +our($VERSION, @EXPORT_OK, @ISA); use Carp; use Symbol; use SelectSaver; diff --git a/ext/IO/lib/IO/Pipe.pm b/ext/IO/lib/IO/Pipe.pm index daf6fe6..27b5ad0 100644 --- a/ext/IO/lib/IO/Pipe.pm +++ b/ext/IO/lib/IO/Pipe.pm @@ -6,11 +6,11 @@ package IO::Pipe; -require 5.000; +require 5.005_64; use IO::Handle; use strict; -use vars qw($VERSION); +our($VERSION); use Carp; use Symbol; @@ -135,7 +135,7 @@ sub writer { package IO::Pipe::End; -use vars qw(@ISA); +our(@ISA); @ISA = qw(IO::Handle); diff --git a/ext/IO/lib/IO/Poll.pm b/ext/IO/lib/IO/Poll.pm index a984985..687664b 100644 --- a/ext/IO/lib/IO/Poll.pm +++ b/ext/IO/lib/IO/Poll.pm @@ -9,7 +9,7 @@ package IO::Poll; use strict; use IO::Handle; use Exporter (); -use vars qw(@ISA @EXPORT_OK @EXPORT $VERSION); +our(@ISA, @EXPORT_OK, @EXPORT, $VERSION); @ISA = qw(Exporter); $VERSION = "0.01"; diff --git a/ext/IO/lib/IO/Seekable.pm b/ext/IO/lib/IO/Seekable.pm index 6c07e94..bfcfc13 100644 --- a/ext/IO/lib/IO/Seekable.pm +++ b/ext/IO/lib/IO/Seekable.pm @@ -44,10 +44,10 @@ Derived from FileHandle.pm by Graham Barr Egbarr@pobox.comE =cut -require 5.000; +require 5.005_64; use Carp; use strict; -use vars qw($VERSION @EXPORT @ISA); +our($VERSION, @EXPORT, @ISA); use IO::Handle qw(SEEK_SET SEEK_CUR SEEK_END); require Exporter; diff --git a/ext/IO/lib/IO/Socket.pm b/ext/IO/lib/IO/Socket.pm index b843999..0e81c4b 100644 --- a/ext/IO/lib/IO/Socket.pm +++ b/ext/IO/lib/IO/Socket.pm @@ -6,13 +6,13 @@ package IO::Socket; -require 5.000; +require 5.005_64; use IO::Handle; use Socket 1.3; use Carp; use strict; -use vars qw(@ISA $VERSION); +our(@ISA, $VERSION); use Exporter; # legacy diff --git a/ext/IO/lib/IO/Socket/INET.pm b/ext/IO/lib/IO/Socket/INET.pm index c8e3a76..30a9230 100644 --- a/ext/IO/lib/IO/Socket/INET.pm +++ b/ext/IO/lib/IO/Socket/INET.pm @@ -7,7 +7,7 @@ package IO::Socket::INET; use strict; -use vars qw(@ISA $VERSION); +our(@ISA, $VERSION); use IO::Socket; use Socket; use Carp; @@ -332,6 +332,8 @@ by default. This was not the case with earlier releases. NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE +=back + =head2 METHODS =over 4 diff --git a/ext/IO/lib/IO/Socket/UNIX.pm b/ext/IO/lib/IO/Socket/UNIX.pm index 8f3b31f..d083f48 100644 --- a/ext/IO/lib/IO/Socket/UNIX.pm +++ b/ext/IO/lib/IO/Socket/UNIX.pm @@ -7,7 +7,7 @@ package IO::Socket::UNIX; use strict; -use vars qw(@ISA $VERSION); +our(@ISA, $VERSION); use IO::Socket; use Socket; use Carp; diff --git a/ext/IPC/SysV/SysV.pm b/ext/IPC/SysV/SysV.pm index eb24593..bebb8fd 100644 --- a/ext/IPC/SysV/SysV.pm +++ b/ext/IPC/SysV/SysV.pm @@ -74,11 +74,15 @@ C defines and conditionally exports all the constants defined in your system include files which are needed by the SysV IPC calls. +=over + =item ftok( PATH, ID ) Return a key based on PATH and ID, which can be used as a key for C, C and C. See L +=back + =head1 SEE ALSO L, L, L diff --git a/ext/NDBM_File/NDBM_File.pm b/ext/NDBM_File/NDBM_File.pm index 578148c..f98669f 100644 --- a/ext/NDBM_File/NDBM_File.pm +++ b/ext/NDBM_File/NDBM_File.pm @@ -5,14 +5,12 @@ BEGIN { use strict; } } -use vars qw($VERSION @ISA); require Tie::Hash; -use DynaLoader (); +use XSLoader (); -@ISA = qw(Tie::Hash); - -$VERSION = "1.03"; +our @ISA = qw(Tie::Hash); +our $VERSION = "1.03"; XSLoader::load 'NDBM_File', $VERSION; diff --git a/ext/ODBM_File/ODBM_File.pm b/ext/ODBM_File/ODBM_File.pm index 6199443..57fe4c3 100644 --- a/ext/ODBM_File/ODBM_File.pm +++ b/ext/ODBM_File/ODBM_File.pm @@ -1,14 +1,12 @@ package ODBM_File; use strict; -use vars qw($VERSION @ISA); require Tie::Hash; -use DynaLoader (); +use XSLoader (); -@ISA = qw(Tie::Hash); - -$VERSION = "1.02"; +our @ISA = qw(Tie::Hash); +our $VERSION = "1.02"; XSLoader::load 'ODBM_File', $VERSION; diff --git a/ext/Opcode/Opcode.pm b/ext/Opcode/Opcode.pm index 3915b40..9338d39 100644 --- a/ext/Opcode/Opcode.pm +++ b/ext/Opcode/Opcode.pm @@ -1,8 +1,8 @@ package Opcode; -require 5.002; +require 5.005_64; -use vars qw($VERSION $XS_VERSION @ISA @EXPORT_OK); +our($VERSION, $XS_VERSION, @ISA, @EXPORT_OK); $VERSION = "1.04"; $XS_VERSION = "1.03"; diff --git a/ext/Opcode/Safe.pm b/ext/Opcode/Safe.pm index 00ee85d..7e1d6a3 100644 --- a/ext/Opcode/Safe.pm +++ b/ext/Opcode/Safe.pm @@ -2,9 +2,8 @@ package Safe; use 5.003_11; use strict; -use vars qw($VERSION); -$VERSION = "2.06"; +our $VERSION = "2.06"; use Carp; diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm index a38c74d..9416f70 100644 --- a/ext/POSIX/POSIX.pm +++ b/ext/POSIX/POSIX.pm @@ -1,199 +1,25 @@ package POSIX; -# use vars qw($VERSION @ISA %EXPORT_TAGS @EXPORT_OK $AUTOLOAD); -(@ISA, %EXPORT_TAGS,@EXPORT_OK,$AUTOLOAD) = (); +our(@ISA, %EXPORT_TAGS, @EXPORT_OK, $AUTOLOAD) = (); -use Carp; use AutoLoader; -require Config; -use Symbol; -require Exporter; use XSLoader (); -@ISA = qw(Exporter); - -$VERSION = "1.03" ; - -%EXPORT_TAGS = ( - - assert_h => [qw(assert NDEBUG)], - - ctype_h => [qw(isalnum isalpha iscntrl isdigit isgraph islower - isprint ispunct isspace isupper isxdigit tolower toupper)], - - dirent_h => [qw()], - - errno_h => [qw(E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT - EAGAIN EALREADY EBADF EBUSY ECHILD ECONNABORTED - ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ EDOM EDQUOT - EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH EINPROGRESS - EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK - EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH - ENFILE ENOBUFS ENODEV ENOENT ENOEXEC ENOLCK ENOMEM - ENOPROTOOPT ENOSPC ENOSYS ENOTBLK ENOTCONN ENOTDIR - ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM - EPFNOSUPPORT EPIPE EPROCLIM EPROTONOSUPPORT EPROTOTYPE - ERANGE EREMOTE ERESTART EROFS ESHUTDOWN ESOCKTNOSUPPORT - ESPIPE ESRCH ESTALE ETIMEDOUT ETOOMANYREFS ETXTBSY - EUSERS EWOULDBLOCK EXDEV errno)], - - fcntl_h => [qw(FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_RDLCK - F_SETFD F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK - O_ACCMODE O_APPEND O_CREAT O_EXCL O_NOCTTY O_NONBLOCK - O_RDONLY O_RDWR O_TRUNC O_WRONLY - creat - SEEK_CUR SEEK_END SEEK_SET - S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU - S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISGID S_ISREG S_ISUID - S_IWGRP S_IWOTH S_IWUSR)], - - float_h => [qw(DBL_DIG DBL_EPSILON DBL_MANT_DIG - DBL_MAX DBL_MAX_10_EXP DBL_MAX_EXP - DBL_MIN DBL_MIN_10_EXP DBL_MIN_EXP - FLT_DIG FLT_EPSILON FLT_MANT_DIG - FLT_MAX FLT_MAX_10_EXP FLT_MAX_EXP - FLT_MIN FLT_MIN_10_EXP FLT_MIN_EXP - FLT_RADIX FLT_ROUNDS - LDBL_DIG LDBL_EPSILON LDBL_MANT_DIG - LDBL_MAX LDBL_MAX_10_EXP LDBL_MAX_EXP - LDBL_MIN LDBL_MIN_10_EXP LDBL_MIN_EXP)], - - grp_h => [qw()], - - limits_h => [qw( ARG_MAX CHAR_BIT CHAR_MAX CHAR_MIN CHILD_MAX - INT_MAX INT_MIN LINK_MAX LONG_MAX LONG_MIN MAX_CANON - MAX_INPUT MB_LEN_MAX NAME_MAX NGROUPS_MAX OPEN_MAX - PATH_MAX PIPE_BUF SCHAR_MAX SCHAR_MIN SHRT_MAX SHRT_MIN - SSIZE_MAX STREAM_MAX TZNAME_MAX UCHAR_MAX UINT_MAX - ULONG_MAX USHRT_MAX _POSIX_ARG_MAX _POSIX_CHILD_MAX - _POSIX_LINK_MAX _POSIX_MAX_CANON _POSIX_MAX_INPUT - _POSIX_NAME_MAX _POSIX_NGROUPS_MAX _POSIX_OPEN_MAX - _POSIX_PATH_MAX _POSIX_PIPE_BUF _POSIX_SSIZE_MAX - _POSIX_STREAM_MAX _POSIX_TZNAME_MAX)], - - locale_h => [qw(LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC - LC_TIME NULL localeconv setlocale)], - - math_h => [qw(HUGE_VAL acos asin atan ceil cosh fabs floor fmod - frexp ldexp log10 modf pow sinh tan tanh)], - - pwd_h => [qw()], - - setjmp_h => [qw(longjmp setjmp siglongjmp sigsetjmp)], - - signal_h => [qw(SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK - SA_RESETHAND SA_RESTART SA_SIGINFO SIGABRT SIGALRM - SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL - SIGPIPE SIGQUIT SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN - SIGTTOU SIGUSR1 SIGUSR2 SIG_BLOCK SIG_DFL SIG_ERR - SIG_IGN SIG_SETMASK SIG_UNBLOCK raise sigaction signal - sigpending sigprocmask sigsuspend)], - - stdarg_h => [qw()], - - stddef_h => [qw(NULL offsetof)], - - stdio_h => [qw(BUFSIZ EOF FILENAME_MAX L_ctermid L_cuserid - L_tmpname NULL SEEK_CUR SEEK_END SEEK_SET - STREAM_MAX TMP_MAX stderr stdin stdout - clearerr fclose fdopen feof ferror fflush fgetc fgetpos - fgets fopen fprintf fputc fputs fread freopen - fscanf fseek fsetpos ftell fwrite getchar gets - perror putc putchar puts remove rewind - scanf setbuf setvbuf sscanf tmpfile tmpnam - ungetc vfprintf vprintf vsprintf)], - - stdlib_h => [qw(EXIT_FAILURE EXIT_SUCCESS MB_CUR_MAX NULL RAND_MAX - abort atexit atof atoi atol bsearch calloc div - free getenv labs ldiv malloc mblen mbstowcs mbtowc - qsort realloc strtod strtol strtoul wcstombs wctomb)], - - string_h => [qw(NULL memchr memcmp memcpy memmove memset strcat - strchr strcmp strcoll strcpy strcspn strerror strlen - strncat strncmp strncpy strpbrk strrchr strspn strstr - strtok strxfrm)], - - sys_stat_h => [qw(S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU - S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISGID S_ISREG - S_ISUID S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR - fstat mkfifo)], - - sys_times_h => [qw()], - - sys_types_h => [qw()], - - sys_utsname_h => [qw(uname)], - - sys_wait_h => [qw(WEXITSTATUS WIFEXITED WIFSIGNALED WIFSTOPPED - WNOHANG WSTOPSIG WTERMSIG WUNTRACED)], - - termios_h => [qw( B0 B110 B1200 B134 B150 B1800 B19200 B200 B2400 - B300 B38400 B4800 B50 B600 B75 B9600 BRKINT CLOCAL - CREAD CS5 CS6 CS7 CS8 CSIZE CSTOPB ECHO ECHOE ECHOK - ECHONL HUPCL ICANON ICRNL IEXTEN IGNBRK IGNCR IGNPAR - INLCR INPCK ISIG ISTRIP IXOFF IXON NCCS NOFLSH OPOST - PARENB PARMRK PARODD TCIFLUSH TCIOFF TCIOFLUSH TCION - TCOFLUSH TCOOFF TCOON TCSADRAIN TCSAFLUSH TCSANOW - TOSTOP VEOF VEOL VERASE VINTR VKILL VMIN VQUIT VSTART - VSTOP VSUSP VTIME - cfgetispeed cfgetospeed cfsetispeed cfsetospeed tcdrain - tcflow tcflush tcgetattr tcsendbreak tcsetattr )], - time_h => [qw(CLK_TCK CLOCKS_PER_SEC NULL asctime clock ctime - difftime mktime strftime tzset tzname)], - - unistd_h => [qw(F_OK NULL R_OK SEEK_CUR SEEK_END SEEK_SET - STRERR_FILENO STDIN_FILENO STDOUT_FILENO W_OK X_OK - _PC_CHOWN_RESTRICTED _PC_LINK_MAX _PC_MAX_CANON - _PC_MAX_INPUT _PC_NAME_MAX _PC_NO_TRUNC _PC_PATH_MAX - _PC_PIPE_BUF _PC_VDISABLE _POSIX_CHOWN_RESTRICTED - _POSIX_JOB_CONTROL _POSIX_NO_TRUNC _POSIX_SAVED_IDS - _POSIX_VDISABLE _POSIX_VERSION _SC_ARG_MAX - _SC_CHILD_MAX _SC_CLK_TCK _SC_JOB_CONTROL - _SC_NGROUPS_MAX _SC_OPEN_MAX _SC_SAVED_IDS - _SC_STREAM_MAX _SC_TZNAME_MAX _SC_VERSION - _exit access ctermid cuserid - dup2 dup execl execle execlp execv execve execvp - fpathconf getcwd getegid geteuid getgid getgroups - getpid getuid isatty lseek pathconf pause setgid setpgid - setsid setuid sysconf tcgetpgrp tcsetpgrp ttyname)], - - utime_h => [qw()], - -); - -# Exporter::export_tags(); -for (values %EXPORT_TAGS) { - push @EXPORT, @$_; -} - -@EXPORT_OK = qw( - closedir opendir readdir rewinddir - fcntl open - getgrgid getgrnam - atan2 cos exp log sin sqrt - getpwnam getpwuid - kill - fileno getc printf rename sprintf - abs exit rand srand system - chmod mkdir stat umask - times - wait waitpid - gmtime localtime time - alarm chdir chown close fork getlogin getppid getpgrp link - pipe read rmdir sleep unlink write - utime - nice -); +our $VERSION = "1.03" ; # Grandfather old foo_h form to new :foo_h form +my $loaded; + sub import { + load_imports() unless $loaded++; my $this = shift; my @list = map { m/^\w+_h$/ ? ":$_" : $_ } @_; local $Exporter::ExportLevel = 1; Exporter::import($this,@list); } +sub croak { require Carp; goto &Carp::croak } XSLoader::load 'POSIX', $VERSION; @@ -202,6 +28,7 @@ my $EAGAIN = constant("EAGAIN", 0); sub AUTOLOAD { if ($AUTOLOAD =~ /::(_?[a-z])/) { + # require AutoLoader; $AutoLoader::AUTOLOAD = $AUTOLOAD; goto &AutoLoader::AUTOLOAD } @@ -277,7 +104,7 @@ sub closedir { sub opendir { usage "opendir(directory)" if @_ != 1; - my $dirhandle = gensym; + my $dirhandle; CORE::opendir($dirhandle, $_[0]) ? $dirhandle : undef; @@ -936,3 +763,178 @@ sub utime { CORE::utime($_[1], $_[2], $_[0]); } +sub load_imports { +%EXPORT_TAGS = ( + + assert_h => [qw(assert NDEBUG)], + + ctype_h => [qw(isalnum isalpha iscntrl isdigit isgraph islower + isprint ispunct isspace isupper isxdigit tolower toupper)], + + dirent_h => [qw()], + + errno_h => [qw(E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT + EAGAIN EALREADY EBADF EBUSY ECHILD ECONNABORTED + ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ EDOM EDQUOT + EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH EINPROGRESS + EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK + EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH + ENFILE ENOBUFS ENODEV ENOENT ENOEXEC ENOLCK ENOMEM + ENOPROTOOPT ENOSPC ENOSYS ENOTBLK ENOTCONN ENOTDIR + ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM + EPFNOSUPPORT EPIPE EPROCLIM EPROTONOSUPPORT EPROTOTYPE + ERANGE EREMOTE ERESTART EROFS ESHUTDOWN ESOCKTNOSUPPORT + ESPIPE ESRCH ESTALE ETIMEDOUT ETOOMANYREFS ETXTBSY + EUSERS EWOULDBLOCK EXDEV errno)], + + fcntl_h => [qw(FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_RDLCK + F_SETFD F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK + O_ACCMODE O_APPEND O_CREAT O_EXCL O_NOCTTY O_NONBLOCK + O_RDONLY O_RDWR O_TRUNC O_WRONLY + creat + SEEK_CUR SEEK_END SEEK_SET + S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU + S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISGID S_ISREG S_ISUID + S_IWGRP S_IWOTH S_IWUSR)], + + float_h => [qw(DBL_DIG DBL_EPSILON DBL_MANT_DIG + DBL_MAX DBL_MAX_10_EXP DBL_MAX_EXP + DBL_MIN DBL_MIN_10_EXP DBL_MIN_EXP + FLT_DIG FLT_EPSILON FLT_MANT_DIG + FLT_MAX FLT_MAX_10_EXP FLT_MAX_EXP + FLT_MIN FLT_MIN_10_EXP FLT_MIN_EXP + FLT_RADIX FLT_ROUNDS + LDBL_DIG LDBL_EPSILON LDBL_MANT_DIG + LDBL_MAX LDBL_MAX_10_EXP LDBL_MAX_EXP + LDBL_MIN LDBL_MIN_10_EXP LDBL_MIN_EXP)], + + grp_h => [qw()], + + limits_h => [qw( ARG_MAX CHAR_BIT CHAR_MAX CHAR_MIN CHILD_MAX + INT_MAX INT_MIN LINK_MAX LONG_MAX LONG_MIN MAX_CANON + MAX_INPUT MB_LEN_MAX NAME_MAX NGROUPS_MAX OPEN_MAX + PATH_MAX PIPE_BUF SCHAR_MAX SCHAR_MIN SHRT_MAX SHRT_MIN + SSIZE_MAX STREAM_MAX TZNAME_MAX UCHAR_MAX UINT_MAX + ULONG_MAX USHRT_MAX _POSIX_ARG_MAX _POSIX_CHILD_MAX + _POSIX_LINK_MAX _POSIX_MAX_CANON _POSIX_MAX_INPUT + _POSIX_NAME_MAX _POSIX_NGROUPS_MAX _POSIX_OPEN_MAX + _POSIX_PATH_MAX _POSIX_PIPE_BUF _POSIX_SSIZE_MAX + _POSIX_STREAM_MAX _POSIX_TZNAME_MAX)], + + locale_h => [qw(LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC + LC_TIME NULL localeconv setlocale)], + + math_h => [qw(HUGE_VAL acos asin atan ceil cosh fabs floor fmod + frexp ldexp log10 modf pow sinh tan tanh)], + + pwd_h => [qw()], + + setjmp_h => [qw(longjmp setjmp siglongjmp sigsetjmp)], + + signal_h => [qw(SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK + SA_RESETHAND SA_RESTART SA_SIGINFO SIGABRT SIGALRM + SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL + SIGPIPE SIGQUIT SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN + SIGTTOU SIGUSR1 SIGUSR2 SIG_BLOCK SIG_DFL SIG_ERR + SIG_IGN SIG_SETMASK SIG_UNBLOCK raise sigaction signal + sigpending sigprocmask sigsuspend)], + + stdarg_h => [qw()], + + stddef_h => [qw(NULL offsetof)], + + stdio_h => [qw(BUFSIZ EOF FILENAME_MAX L_ctermid L_cuserid + L_tmpname NULL SEEK_CUR SEEK_END SEEK_SET + STREAM_MAX TMP_MAX stderr stdin stdout + clearerr fclose fdopen feof ferror fflush fgetc fgetpos + fgets fopen fprintf fputc fputs fread freopen + fscanf fseek fsetpos ftell fwrite getchar gets + perror putc putchar puts remove rewind + scanf setbuf setvbuf sscanf tmpfile tmpnam + ungetc vfprintf vprintf vsprintf)], + + stdlib_h => [qw(EXIT_FAILURE EXIT_SUCCESS MB_CUR_MAX NULL RAND_MAX + abort atexit atof atoi atol bsearch calloc div + free getenv labs ldiv malloc mblen mbstowcs mbtowc + qsort realloc strtod strtol strtoul wcstombs wctomb)], + + string_h => [qw(NULL memchr memcmp memcpy memmove memset strcat + strchr strcmp strcoll strcpy strcspn strerror strlen + strncat strncmp strncpy strpbrk strrchr strspn strstr + strtok strxfrm)], + + sys_stat_h => [qw(S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU + S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISGID S_ISREG + S_ISUID S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR + fstat mkfifo)], + + sys_times_h => [qw()], + + sys_types_h => [qw()], + + sys_utsname_h => [qw(uname)], + + sys_wait_h => [qw(WEXITSTATUS WIFEXITED WIFSIGNALED WIFSTOPPED + WNOHANG WSTOPSIG WTERMSIG WUNTRACED)], + + termios_h => [qw( B0 B110 B1200 B134 B150 B1800 B19200 B200 B2400 + B300 B38400 B4800 B50 B600 B75 B9600 BRKINT CLOCAL + CREAD CS5 CS6 CS7 CS8 CSIZE CSTOPB ECHO ECHOE ECHOK + ECHONL HUPCL ICANON ICRNL IEXTEN IGNBRK IGNCR IGNPAR + INLCR INPCK ISIG ISTRIP IXOFF IXON NCCS NOFLSH OPOST + PARENB PARMRK PARODD TCIFLUSH TCIOFF TCIOFLUSH TCION + TCOFLUSH TCOOFF TCOON TCSADRAIN TCSAFLUSH TCSANOW + TOSTOP VEOF VEOL VERASE VINTR VKILL VMIN VQUIT VSTART + VSTOP VSUSP VTIME + cfgetispeed cfgetospeed cfsetispeed cfsetospeed tcdrain + tcflow tcflush tcgetattr tcsendbreak tcsetattr )], + + time_h => [qw(CLK_TCK CLOCKS_PER_SEC NULL asctime clock ctime + difftime mktime strftime tzset tzname)], + + unistd_h => [qw(F_OK NULL R_OK SEEK_CUR SEEK_END SEEK_SET + STRERR_FILENO STDIN_FILENO STDOUT_FILENO W_OK X_OK + _PC_CHOWN_RESTRICTED _PC_LINK_MAX _PC_MAX_CANON + _PC_MAX_INPUT _PC_NAME_MAX _PC_NO_TRUNC _PC_PATH_MAX + _PC_PIPE_BUF _PC_VDISABLE _POSIX_CHOWN_RESTRICTED + _POSIX_JOB_CONTROL _POSIX_NO_TRUNC _POSIX_SAVED_IDS + _POSIX_VDISABLE _POSIX_VERSION _SC_ARG_MAX + _SC_CHILD_MAX _SC_CLK_TCK _SC_JOB_CONTROL + _SC_NGROUPS_MAX _SC_OPEN_MAX _SC_SAVED_IDS + _SC_STREAM_MAX _SC_TZNAME_MAX _SC_VERSION + _exit access ctermid cuserid + dup2 dup execl execle execlp execv execve execvp + fpathconf getcwd getegid geteuid getgid getgroups + getpid getuid isatty lseek pathconf pause setgid setpgid + setsid setuid sysconf tcgetpgrp tcsetpgrp ttyname)], + + utime_h => [qw()], + +); + +# Exporter::export_tags(); +for (values %EXPORT_TAGS) { + push @EXPORT, @$_; +} + +@EXPORT_OK = qw( + closedir opendir readdir rewinddir + fcntl open + getgrgid getgrnam + atan2 cos exp log sin sqrt + getpwnam getpwuid + kill + fileno getc printf rename sprintf + abs exit rand srand system + chmod mkdir stat umask + times + wait waitpid + gmtime localtime time + alarm chdir chown close fork getlogin getppid getpgrp link + pipe read rmdir sleep unlink write + utime + nice +); + +require Exporter; +} diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 4c96f12..af43c40 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -106,7 +106,7 @@ } # define times(t) vms_times(t) #else -#if defined (CYGWIN) +#if defined (__CYGWIN__) # define tzname _tzname #endif #if defined (WIN32) @@ -289,7 +289,7 @@ unsigned long strtoul (const char *, char **, int); #endif #ifdef HAS_TZNAME -# if !defined(WIN32) && !defined(CYGWIN) +# if !defined(WIN32) && !defined(__CYGWIN__) extern char *tzname[]; # endif #else diff --git a/ext/SDBM_File/SDBM_File.pm b/ext/SDBM_File/SDBM_File.pm index 1f3b400..c5e26c8 100644 --- a/ext/SDBM_File/SDBM_File.pm +++ b/ext/SDBM_File/SDBM_File.pm @@ -1,14 +1,12 @@ package SDBM_File; use strict; -use vars qw($VERSION @ISA); require Tie::Hash; use XSLoader (); -@ISA = qw(Tie::Hash); - -$VERSION = "1.02" ; +our @ISA = qw(Tie::Hash); +our $VERSION = "1.02" ; XSLoader::load 'SDBM_File', $VERSION; diff --git a/ext/SDBM_File/sdbm/pair.c b/ext/SDBM_File/sdbm/pair.c index c2ed213..4f0fde2 100644 --- a/ext/SDBM_File/sdbm/pair.c +++ b/ext/SDBM_File/sdbm/pair.c @@ -8,7 +8,7 @@ */ #include "config.h" -#ifdef CYGWIN +#ifdef __CYGWIN__ # define EXTCONST extern const #else # include "EXTERN.h" diff --git a/ext/SDBM_File/sdbm/sdbm.c b/ext/SDBM_File/sdbm/sdbm.c index 5952d71..f58f448 100644 --- a/ext/SDBM_File/sdbm/sdbm.c +++ b/ext/SDBM_File/sdbm/sdbm.c @@ -128,7 +128,7 @@ sdbm_prep(char *dirname, char *pagname, int flags, int mode) * open the files in sequence, and stat the dirfile. * If we fail anywhere, undo everything, return NULL. */ -#if defined(OS2) || defined(MSDOS) || defined(WIN32) || defined(CYGWIN) +#if defined(OS2) || defined(MSDOS) || defined(WIN32) || defined(__CYGWIN__) flags |= O_BINARY; # endif if ((db->pagf = open(pagname, flags, mode)) > -1) { diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm index 1fa108f..cec13ac 100644 --- a/ext/Socket/Socket.pm +++ b/ext/Socket/Socket.pm @@ -1,6 +1,6 @@ package Socket; -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); +our($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); $VERSION = "1.71"; =head1 NAME diff --git a/ext/Sys/Syslog/Makefile.PL b/ext/Sys/Syslog/Makefile.PL new file mode 100644 index 0000000..253130a --- /dev/null +++ b/ext/Sys/Syslog/Makefile.PL @@ -0,0 +1,7 @@ +use ExtUtils::MakeMaker; + +WriteMakefile( + NAME => 'Sys::Syslog', + VERSION_FROM => 'Syslog.pm', + XSPROTOARG => '-noprototypes', +); diff --git a/lib/Sys/Syslog.pm b/ext/Sys/Syslog/Syslog.pm similarity index 90% rename from lib/Sys/Syslog.pm rename to ext/Sys/Syslog/Syslog.pm index f0cbb71..b447374 100644 --- a/lib/Sys/Syslog.pm +++ b/ext/Sys/Syslog/Syslog.pm @@ -1,11 +1,13 @@ package Sys::Syslog; require 5.000; require Exporter; +require DynaLoader; use Carp; -@ISA = qw(Exporter); +@ISA = qw(Exporter DynaLoader); @EXPORT = qw(openlog closelog setlogmask syslog); @EXPORT_OK = qw(setlogsock); +$VERSION = '0.01'; use Socket; use Sys::Hostname; @@ -17,6 +19,7 @@ use Sys::Hostname; # NOTE: openlog now takes three arguments, just like openlog(3) # Modified to add UNIX domain sockets by Sean Robinson # with support from Tim Bunce and the perl5-porters mailing list +# Modified to use an XS backend instead of syslog.ph by Tom Hughes # Todo: enable connect to try all three types before failing (auto setlogsock)? @@ -98,10 +101,6 @@ Note that C now takes three arguments, just like C. $! = 55; syslog('info', 'problem was %m'); # %m == $! in syslog(3) -=head1 DEPENDENCIES - -B needs F, which can be created with C. - =head1 SEE ALSO L @@ -111,10 +110,27 @@ L Tom Christiansen EFE and Larry Wall EFE. UNIX domain sockets added by Sean Robinson EFE with support from Tim Bunce and the perl5-porters mailing list. +Dependency on F replaced with XS code bu Tom Hughes EFE. =cut -require 'syslog.ph'; +sub AUTOLOAD { + # This AUTOLOAD is used to 'autoload' constants from the constant() + # XS function. + + my $constname; + our $AUTOLOAD; + ($constname = $AUTOLOAD) =~ s/.*:://; + croak "& not defined" if $constname eq 'constant'; + my $val = constant($constname, @_ ? $_[0] : 0); + if ($! != 0) { + croak "Your vendor has not defined Sys::Syslog macro $constname"; + } + *$AUTOLOAD = sub { $val }; + goto &$AUTOLOAD; +} + +bootstrap Sys::Syslog $VERSION; $maskpri = &LOG_UPTO(&LOG_DEBUG); @@ -240,7 +256,7 @@ sub xlate { $name = uc $name; $name = "LOG_$name" unless $name =~ /^LOG_/; $name = "Sys::Syslog::$name"; - defined &$name ? &$name : -1; + eval { &$name } || -1; } sub connect { diff --git a/ext/Sys/Syslog/Syslog.xs b/ext/Sys/Syslog/Syslog.xs new file mode 100644 index 0000000..d227343 --- /dev/null +++ b/ext/Sys/Syslog/Syslog.xs @@ -0,0 +1,637 @@ +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +#ifdef I_SYSLOG +#include +#endif + +static double +constant_LOG_NO(char *name, int len, int arg) +{ + switch (name[6 + 0]) { + case 'T': + if (strEQ(name + 6, "TICE")) { /* LOG_NO removed */ +#ifdef LOG_NOTICE + return LOG_NOTICE; +#else + goto not_there; +#endif + } + case 'W': + if (strEQ(name + 6, "WAIT")) { /* LOG_NO removed */ +#ifdef LOG_NOWAIT + return LOG_NOWAIT; +#else + goto not_there; +#endif + } + } + errno = EINVAL; + return 0; + +not_there: + errno = ENOENT; + return 0; +} + +static double +constant_LOG_N(char *name, int len, int arg) +{ + switch (name[5 + 0]) { + case 'D': + if (strEQ(name + 5, "DELAY")) { /* LOG_N removed */ +#ifdef LOG_NDELAY + return LOG_NDELAY; +#else + goto not_there; +#endif + } + case 'E': + if (strEQ(name + 5, "EWS")) { /* LOG_N removed */ +#ifdef LOG_NEWS + return LOG_NEWS; +#else + goto not_there; +#endif + } + case 'F': + if (strEQ(name + 5, "FACILITIES")) { /* LOG_N removed */ +#ifdef LOG_NFACILITIES + return LOG_NFACILITIES; +#else + goto not_there; +#endif + } + case 'O': + return constant_LOG_NO(name, len, arg); + } + errno = EINVAL; + return 0; + +not_there: + errno = ENOENT; + return 0; +} + +static double +constant_LOG_P(char *name, int len, int arg) +{ + switch (name[5 + 0]) { + case 'I': + if (strEQ(name + 5, "ID")) { /* LOG_P removed */ +#ifdef LOG_PID + return LOG_PID; +#else + goto not_there; +#endif + } + case 'R': + if (strEQ(name + 5, "RIMASK")) { /* LOG_P removed */ +#ifdef LOG_PRIMASK + return LOG_PRIMASK; +#else + goto not_there; +#endif + } + } + errno = EINVAL; + return 0; + +not_there: + errno = ENOENT; + return 0; +} + +static double +constant_LOG_AU(char *name, int len, int arg) +{ + if (6 + 2 >= len ) { + errno = EINVAL; + return 0; + } + switch (name[6 + 2]) { + case '\0': + if (strEQ(name + 6, "TH")) { /* LOG_AU removed */ +#ifdef LOG_AUTH + return LOG_AUTH; +#else + goto not_there; +#endif + } + case 'P': + if (strEQ(name + 6, "THPRIV")) { /* LOG_AU removed */ +#ifdef LOG_AUTHPRIV + return LOG_AUTHPRIV; +#else + goto not_there; +#endif + } + } + errno = EINVAL; + return 0; + +not_there: + errno = ENOENT; + return 0; +} + +static double +constant_LOG_A(char *name, int len, int arg) +{ + switch (name[5 + 0]) { + case 'L': + if (strEQ(name + 5, "LERT")) { /* LOG_A removed */ +#ifdef LOG_ALERT + return LOG_ALERT; +#else + goto not_there; +#endif + } + case 'U': + return constant_LOG_AU(name, len, arg); + } + errno = EINVAL; + return 0; + +not_there: + errno = ENOENT; + return 0; +} + +static double +constant_LOG_CR(char *name, int len, int arg) +{ + switch (name[6 + 0]) { + case 'I': + if (strEQ(name + 6, "IT")) { /* LOG_CR removed */ +#ifdef LOG_CRIT + return LOG_CRIT; +#else + goto not_there; +#endif + } + case 'O': + if (strEQ(name + 6, "ON")) { /* LOG_CR removed */ +#ifdef LOG_CRON + return LOG_CRON; +#else + goto not_there; +#endif + } + } + errno = EINVAL; + return 0; + +not_there: + errno = ENOENT; + return 0; +} + +static double +constant_LOG_C(char *name, int len, int arg) +{ + switch (name[5 + 0]) { + case 'O': + if (strEQ(name + 5, "ONS")) { /* LOG_C removed */ +#ifdef LOG_CONS + return LOG_CONS; +#else + goto not_there; +#endif + } + case 'R': + return constant_LOG_CR(name, len, arg); + } + errno = EINVAL; + return 0; + +not_there: + errno = ENOENT; + return 0; +} + +static double +constant_LOG_D(char *name, int len, int arg) +{ + switch (name[5 + 0]) { + case 'A': + if (strEQ(name + 5, "AEMON")) { /* LOG_D removed */ +#ifdef LOG_DAEMON + return LOG_DAEMON; +#else + goto not_there; +#endif + } + case 'E': + if (strEQ(name + 5, "EBUG")) { /* LOG_D removed */ +#ifdef LOG_DEBUG + return LOG_DEBUG; +#else + goto not_there; +#endif + } + } + errno = EINVAL; + return 0; + +not_there: + errno = ENOENT; + return 0; +} + +static double +constant_LOG_U(char *name, int len, int arg) +{ + switch (name[5 + 0]) { + case 'S': + if (strEQ(name + 5, "SER")) { /* LOG_U removed */ +#ifdef LOG_USER + return LOG_USER; +#else + goto not_there; +#endif + } + case 'U': + if (strEQ(name + 5, "UCP")) { /* LOG_U removed */ +#ifdef LOG_UUCP + return LOG_UUCP; +#else + goto not_there; +#endif + } + } + errno = EINVAL; + return 0; + +not_there: + errno = ENOENT; + return 0; +} + +static double +constant_LOG_E(char *name, int len, int arg) +{ + switch (name[5 + 0]) { + case 'M': + if (strEQ(name + 5, "MERG")) { /* LOG_E removed */ +#ifdef LOG_EMERG + return LOG_EMERG; +#else + goto not_there; +#endif + } + case 'R': + if (strEQ(name + 5, "RR")) { /* LOG_E removed */ +#ifdef LOG_ERR + return LOG_ERR; +#else + goto not_there; +#endif + } + } + errno = EINVAL; + return 0; + +not_there: + errno = ENOENT; + return 0; +} + +static double +constant_LOG_F(char *name, int len, int arg) +{ + switch (name[5 + 0]) { + case 'A': + if (strEQ(name + 5, "ACMASK")) { /* LOG_F removed */ +#ifdef LOG_FACMASK + return LOG_FACMASK; +#else + goto not_there; +#endif + } + case 'T': + if (strEQ(name + 5, "TP")) { /* LOG_F removed */ +#ifdef LOG_FTP + return LOG_FTP; +#else + goto not_there; +#endif + } + } + errno = EINVAL; + return 0; + +not_there: + errno = ENOENT; + return 0; +} + +static double +constant_LOG_LO(char *name, int len, int arg) +{ + if (6 + 3 >= len ) { + errno = EINVAL; + return 0; + } + switch (name[6 + 3]) { + case '0': + if (strEQ(name + 6, "CAL0")) { /* LOG_LO removed */ +#ifdef LOG_LOCAL0 + return LOG_LOCAL0; +#else + goto not_there; +#endif + } + case '1': + if (strEQ(name + 6, "CAL1")) { /* LOG_LO removed */ +#ifdef LOG_LOCAL1 + return LOG_LOCAL1; +#else + goto not_there; +#endif + } + case '2': + if (strEQ(name + 6, "CAL2")) { /* LOG_LO removed */ +#ifdef LOG_LOCAL2 + return LOG_LOCAL2; +#else + goto not_there; +#endif + } + case '3': + if (strEQ(name + 6, "CAL3")) { /* LOG_LO removed */ +#ifdef LOG_LOCAL3 + return LOG_LOCAL3; +#else + goto not_there; +#endif + } + case '4': + if (strEQ(name + 6, "CAL4")) { /* LOG_LO removed */ +#ifdef LOG_LOCAL4 + return LOG_LOCAL4; +#else + goto not_there; +#endif + } + case '5': + if (strEQ(name + 6, "CAL5")) { /* LOG_LO removed */ +#ifdef LOG_LOCAL5 + return LOG_LOCAL5; +#else + goto not_there; +#endif + } + case '6': + if (strEQ(name + 6, "CAL6")) { /* LOG_LO removed */ +#ifdef LOG_LOCAL6 + return LOG_LOCAL6; +#else + goto not_there; +#endif + } + case '7': + if (strEQ(name + 6, "CAL7")) { /* LOG_LO removed */ +#ifdef LOG_LOCAL7 + return LOG_LOCAL7; +#else + goto not_there; +#endif + } + } + errno = EINVAL; + return 0; + +not_there: + errno = ENOENT; + return 0; +} + +static double +constant_LOG_L(char *name, int len, int arg) +{ + switch (name[5 + 0]) { + case 'F': + if (strEQ(name + 5, "FMT")) { /* LOG_L removed */ +#ifdef LOG_LFMT + return LOG_LFMT; +#else + goto not_there; +#endif + } + case 'O': + return constant_LOG_LO(name, len, arg); + case 'P': + if (strEQ(name + 5, "PR")) { /* LOG_L removed */ +#ifdef LOG_LPR + return LOG_LPR; +#else + goto not_there; +#endif + } + } + errno = EINVAL; + return 0; + +not_there: + errno = ENOENT; + return 0; +} + +static double +constant(char *name, int len, int arg) +{ + errno = 0; + if (0 + 4 >= len ) { + errno = EINVAL; + return 0; + } + switch (name[0 + 4]) { + case 'A': + if (!strnEQ(name + 0,"LOG_", 4)) + break; + return constant_LOG_A(name, len, arg); + case 'C': + if (!strnEQ(name + 0,"LOG_", 4)) + break; + return constant_LOG_C(name, len, arg); + case 'D': + if (!strnEQ(name + 0,"LOG_", 4)) + break; + return constant_LOG_D(name, len, arg); + case 'E': + if (!strnEQ(name + 0,"LOG_", 4)) + break; + return constant_LOG_E(name, len, arg); + case 'F': + if (!strnEQ(name + 0,"LOG_", 4)) + break; + return constant_LOG_F(name, len, arg); + case 'I': + if (strEQ(name + 0, "LOG_INFO")) { /* removed */ +#ifdef LOG_INFO + return LOG_INFO; +#else + goto not_there; +#endif + } + case 'K': + if (strEQ(name + 0, "LOG_KERN")) { /* removed */ +#ifdef LOG_KERN + return LOG_KERN; +#else + goto not_there; +#endif + } + case 'L': + if (!strnEQ(name + 0,"LOG_", 4)) + break; + return constant_LOG_L(name, len, arg); + case 'M': + if (strEQ(name + 0, "LOG_MAIL")) { /* removed */ +#ifdef LOG_MAIL + return LOG_MAIL; +#else + goto not_there; +#endif + } + case 'N': + if (!strnEQ(name + 0,"LOG_", 4)) + break; + return constant_LOG_N(name, len, arg); + case 'O': + if (strEQ(name + 0, "LOG_ODELAY")) { /* removed */ +#ifdef LOG_ODELAY + return LOG_ODELAY; +#else + goto not_there; +#endif + } + case 'P': + if (!strnEQ(name + 0,"LOG_", 4)) + break; + return constant_LOG_P(name, len, arg); + case 'S': + if (strEQ(name + 0, "LOG_SYSLOG")) { /* removed */ +#ifdef LOG_SYSLOG + return LOG_SYSLOG; +#else + goto not_there; +#endif + } + case 'U': + if (!strnEQ(name + 0,"LOG_", 4)) + break; + return constant_LOG_U(name, len, arg); + case 'W': + if (strEQ(name + 0, "LOG_WARNING")) { /* removed */ +#ifdef LOG_WARNING + return LOG_WARNING; +#else + goto not_there; +#endif + } + } + errno = EINVAL; + return 0; + +not_there: + errno = ENOENT; + return 0; +} + + +MODULE = Sys::Syslog PACKAGE = Sys::Syslog + +char * +_PATH_LOG() + CODE: +#ifdef _PATH_LOG + RETVAL = _PATH_LOG; +#else + croak("Your vendor has not defined the Sys::Syslog macro _PATH_LOG"); +#endif + OUTPUT: + RETVAL + +int +LOG_FAC(p) + INPUT: + int p + CODE: +#ifdef LOG_FAC + RETVAL = LOG_FAC(p); +#else + croak("Your vendor has not defined the Sys::Syslog macro LOG_FAC"); +#endif + OUTPUT: + RETVAL + +int +LOG_PRI(p) + INPUT: + int p + CODE: +#ifdef LOG_PRI + RETVAL = LOG_PRI(p); +#else + croak("Your vendor has not defined the Sys::Syslog macro LOG_PRI"); +#endif + OUTPUT: + RETVAL + +int +LOG_MAKEPRI(fac,pri) + INPUT: + int fac + int pri + CODE: +#ifdef LOG_MAKEPRI + RETVAL = LOG_MAKEPRI(fac,pri); +#else + croak("Your vendor has not defined the Sys::Syslog macro LOG_MAKEPRI"); +#endif + OUTPUT: + RETVAL + +int +LOG_MASK(pri) + INPUT: + int pri + CODE: +#ifdef LOG_MASK + RETVAL = LOG_MASK(pri); +#else + croak("Your vendor has not defined the Sys::Syslog macro LOG_MASK"); +#endif + OUTPUT: + RETVAL + +int +LOG_UPTO(pri) + INPUT: + int pri + CODE: +#ifdef LOG_UPTO + RETVAL = LOG_UPTO(pri); +#else + croak("Your vendor has not defined the Sys::Syslog macro LOG_UPTO"); +#endif + OUTPUT: + RETVAL + + +double +constant(sv,arg) + PREINIT: + STRLEN len; + INPUT: + SV * sv + char * s = SvPV(sv, len); + int arg + CODE: + RETVAL = constant(s,len,arg); + OUTPUT: + RETVAL + diff --git a/ext/Thread/Thread.pm b/ext/Thread/Thread.pm index f15883e..3e50a99 100644 --- a/ext/Thread/Thread.pm +++ b/ext/Thread/Thread.pm @@ -1,7 +1,7 @@ package Thread; require Exporter; use XSLoader (); -use vars qw($VERSION @ISA @EXPORT); +our($VERSION, @ISA, @EXPORT); $VERSION = "1.0"; @@ -10,7 +10,7 @@ $VERSION = "1.0"; =head1 NAME -Thread - multithreading +Thread - manipulate threads in Perl (EXPERIMENTAL, subject to change) =head1 SYNOPSIS @@ -41,6 +41,12 @@ The C module provides multithreading support for perl. WARNING: Threading is an experimental feature. Both the interface and implementation are subject to change drastically. +In fact, this documentation describes the flavor of threads that was in +version 5.005. Perl v5.6 has the beginnings of support for interpreter +threads, which (when finished) is expected to be significantly different +from what is described here. The information contained here may therefore +soon be obsolete. Use at your own risk! + =head1 FUNCTIONS =over 8 @@ -176,6 +182,8 @@ increasing integer assigned when a thread is created. The main thread of a program will have a tid of zero, while subsequent threads will have tids assigned starting with one. +=back + =head1 LIMITATIONS The sequence number used to assign tids is a simple integer, and no diff --git a/form.h b/form.h index 0d3053d..ca2a0c8 100644 --- a/form.h +++ b/form.h @@ -1,6 +1,6 @@ /* form.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/global.sym b/global.sym index 0fc9739..2f750fa 100644 --- a/global.sym +++ b/global.sym @@ -17,12 +17,8 @@ Perl_malloc Perl_calloc Perl_realloc Perl_mfree -Perl_malloced_size Perl_amagic_call Perl_Gv_AMupdate -Perl_append_elem -Perl_append_list -Perl_apply Perl_avhv_delete_ent Perl_avhv_exists_ent Perl_avhv_fetch_ent @@ -45,20 +41,14 @@ Perl_av_shift Perl_av_store Perl_av_undef Perl_av_unshift -Perl_bind_match -Perl_block_end Perl_block_gimme -Perl_block_start -Perl_boot_core_UNIVERSAL Perl_call_list -Perl_cando Perl_cast_ulong Perl_cast_i32 Perl_cast_iv Perl_cast_uv Perl_my_chsize Perl_condpair_magic -Perl_convert Perl_croak Perl_vcroak Perl_croak_nocontext @@ -74,21 +64,13 @@ Perl_sv_setpvf_nocontext Perl_sv_catpvf_mg_nocontext Perl_sv_setpvf_mg_nocontext Perl_fprintf_nocontext -Perl_cv_ckproto -Perl_cv_clone -Perl_cv_const_sv -Perl_op_const_sv -Perl_cv_undef Perl_cx_dump Perl_filter_add Perl_filter_del Perl_filter_read Perl_get_op_descs Perl_get_op_names -Perl_get_no_modify -Perl_get_opargs Perl_get_ppaddr -Perl_cxinc Perl_deb Perl_vdeb Perl_debprofdump @@ -96,43 +78,11 @@ Perl_debop Perl_debstack Perl_debstackptrs Perl_delimcpy -Perl_deprecate Perl_die -Perl_vdie -Perl_die_where Perl_dounwind -Perl_do_aexec -Perl_do_aexec5 Perl_do_binmode -Perl_do_chop -Perl_do_close -Perl_do_eof -Perl_do_exec -Perl_do_exec3 -Perl_do_execfree -Perl_do_ipcctl -Perl_do_ipcget -Perl_do_msgrcv -Perl_do_msgsnd -Perl_do_semop -Perl_do_shmio -Perl_do_join -Perl_do_kv Perl_do_open Perl_do_open9 -Perl_do_pipe -Perl_do_print -Perl_do_readline -Perl_do_chomp -Perl_do_seek -Perl_do_sprintf -Perl_do_sysseek -Perl_do_tell -Perl_do_trans -Perl_do_vecget -Perl_do_vecset -Perl_do_vop -Perl_dofile Perl_dowantarray Perl_dump_all Perl_dump_eval @@ -145,15 +95,9 @@ Perl_dump_packsubs Perl_dump_sub Perl_fbm_compile Perl_fbm_instr -Perl_find_script -Perl_find_threadsv -Perl_force_list -Perl_fold_constants Perl_form Perl_vform Perl_free_tmps -Perl_gen_constant_list -Perl_getenv_len Perl_gp_free Perl_gp_ref Perl_gv_AVadd @@ -196,13 +140,8 @@ Perl_hv_store_ent Perl_hv_undef Perl_ibcmp Perl_ibcmp_locale -Perl_ingroup -Perl_init_debugger Perl_init_stacks -Perl_intro_my Perl_instr -Perl_io_close -Perl_invert Perl_is_uni_alnum Perl_is_uni_alnumc Perl_is_uni_idfirst @@ -252,68 +191,11 @@ Perl_is_utf8_print Perl_is_utf8_punct Perl_is_utf8_xdigit Perl_is_utf8_mark -Perl_jmaybe -Perl_keyword Perl_leave_scope -Perl_lex_end -Perl_lex_start -Perl_linklist -Perl_list -Perl_listkids -Perl_localize Perl_looks_like_number -Perl_magic_clearenv -Perl_magic_clear_all_env -Perl_magic_clearpack -Perl_magic_clearsig -Perl_magic_existspack -Perl_magic_freeregexp -Perl_magic_get -Perl_magic_getarylen -Perl_magic_getdefelem -Perl_magic_getglob -Perl_magic_getnkeys -Perl_magic_getpack -Perl_magic_getpos -Perl_magic_getsig -Perl_magic_getsubstr -Perl_magic_gettaint -Perl_magic_getuvar -Perl_magic_getvec -Perl_magic_len -Perl_magic_mutexfree -Perl_magic_nextpack -Perl_magic_regdata_cnt -Perl_magic_regdatum_get -Perl_magic_set -Perl_magic_setamagic -Perl_magic_setarylen -Perl_magic_setbm -Perl_magic_setdbline -Perl_magic_setcollxfrm -Perl_magic_setdefelem -Perl_magic_setenv -Perl_magic_setfm -Perl_magic_setisa -Perl_magic_setglob -Perl_magic_setmglob -Perl_magic_setnkeys -Perl_magic_setpack -Perl_magic_setpos -Perl_magic_setsig -Perl_magic_setsubstr -Perl_magic_settaint -Perl_magic_setuvar -Perl_magic_setvec -Perl_magic_set_all_env -Perl_magic_sizepack -Perl_magic_wipepack -Perl_magicname Perl_markstack_grow -Perl_mem_collxfrm Perl_mess Perl_vmess -Perl_qerror Perl_mg_clear Perl_mg_copy Perl_mg_find @@ -323,9 +205,7 @@ Perl_mg_length Perl_mg_magical Perl_mg_set Perl_mg_size -Perl_mod Perl_moreswitches -Perl_my Perl_my_atof Perl_my_bcopy Perl_my_bzero @@ -342,7 +222,6 @@ Perl_my_stat Perl_my_swap Perl_my_htonl Perl_my_ntohl -Perl_my_unexec Perl_newANONLIST Perl_newANONHASH Perl_newANONSUB @@ -393,22 +272,9 @@ Perl_newSVsv Perl_newUNOP Perl_newWHILEOP Perl_new_stackinfo -Perl_nextargv Perl_ninstr -Perl_oopsCV Perl_op_free -Perl_package -Perl_pad_alloc -Perl_pad_allocmy -Perl_pad_findmy -Perl_oopsAV -Perl_oopsHV -Perl_pad_leavemy Perl_pad_sv -Perl_pad_free -Perl_pad_reset -Perl_pad_swipe -Perl_peep Perl_new_struct_thread Perl_call_atexit Perl_call_argv @@ -430,17 +296,9 @@ Perl_set_numeric_local Perl_set_numeric_radix Perl_set_numeric_standard Perl_require_pv -Perl_pidgone Perl_pmflag -Perl_pmruntime -Perl_pmtrans -Perl_pop_return Perl_pop_scope -Perl_prepend_elem -Perl_push_return Perl_push_scope -Perl_ref -Perl_refkids Perl_regdump Perl_pregexec Perl_pregfree @@ -449,17 +307,8 @@ Perl_re_intuit_start Perl_re_intuit_string Perl_regexec_flags Perl_regnext -Perl_regprop Perl_repeatcpy Perl_rninstr -Perl_rsignal -Perl_rsignal_restore -Perl_rsignal_save -Perl_rsignal_state -Perl_rxres_free -Perl_rxres_restore -Perl_rxres_save -Perl_same_dirent Perl_savepv Perl_savepvn Perl_savestack_grow @@ -472,7 +321,6 @@ Perl_save_delete Perl_save_destructor Perl_save_destructor_x Perl_save_freesv -Perl_save_freeop Perl_save_freepv Perl_save_generic_svref Perl_save_gp @@ -489,7 +337,6 @@ Perl_save_iv Perl_save_list Perl_save_long Perl_save_nogv -Perl_save_op Perl_save_scalar Perl_save_pptr Perl_save_vptr @@ -497,25 +344,14 @@ Perl_save_re_context Perl_save_sptr Perl_save_svref Perl_save_threadsv -Perl_sawparens -Perl_scalar -Perl_scalarkids -Perl_scalarseq -Perl_scalarvoid Perl_scan_bin Perl_scan_hex Perl_scan_num Perl_scan_oct -Perl_scope Perl_screaminstr -Perl_setenv_getix -Perl_setdefout Perl_sharepvn -Perl_share_hek -Perl_sighandler Perl_stack_grow Perl_start_subparse -Perl_sub_crush_depth Perl_sv_2bool Perl_sv_2cv Perl_sv_2io @@ -533,7 +369,6 @@ Perl_sv_pvn Perl_sv_pvutf8n Perl_sv_pvbyten Perl_sv_true -Perl_sv_add_arena Perl_sv_backoff Perl_sv_bless Perl_sv_catpvf @@ -542,8 +377,6 @@ Perl_sv_catpv Perl_sv_catpvn Perl_sv_catsv Perl_sv_chop -Perl_sv_clean_all -Perl_sv_clean_objs Perl_sv_clear Perl_sv_cmp Perl_sv_cmp_locale @@ -554,7 +387,6 @@ Perl_sv_dump Perl_sv_derived_from Perl_sv_eq Perl_sv_free -Perl_sv_free_arenas Perl_sv_gets Perl_sv_grow Perl_sv_inc @@ -609,29 +441,16 @@ Perl_to_utf8_title Perl_unlnk Perl_unlock_condpair Perl_unsharepvn -Perl_unshare_hek -Perl_utilize Perl_utf16_to_utf8 Perl_utf16_to_utf8_reversed Perl_utf8_distance Perl_utf8_hop Perl_utf8_to_uv Perl_uv_to_utf8 -Perl_vivify_defelem -Perl_vivify_ref -Perl_wait4pid -Perl_report_uninit Perl_warn Perl_vwarn Perl_warner Perl_vwarner -Perl_watch -Perl_whichsig -Perl_yyerror -Perl_yylex -Perl_yylex -Perl_yyparse -Perl_yywarn Perl_dump_mstats Perl_safesysmalloc Perl_safesyscalloc @@ -660,7 +479,6 @@ Perl_sv_setpvn_mg Perl_sv_setsv_mg Perl_sv_usepvn_mg Perl_get_vtbl -Perl_pv_display Perl_dump_indent Perl_dump_vindent Perl_do_gv_dump @@ -683,12 +501,9 @@ Perl_sv_pvbyte Perl_sv_force_normal Perl_tmps_grow Perl_sv_rvweaken -Perl_magic_killbackrefs Perl_newANONATTRSUB Perl_newATTRSUB Perl_newMYSUB -Perl_my_attrs -Perl_boot_core_xsutils Perl_cx_dup Perl_si_dup Perl_ss_dup diff --git a/globals.c b/globals.c index 41dc924..0782eba 100644 --- a/globals.c +++ b/globals.c @@ -78,3 +78,5 @@ Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...) va_start(arglist, format); return PerlIO_vprintf(stream, format, arglist); } + +#include "perlapi.h" /* bring in PL_force_link_funcs */ diff --git a/gv.c b/gv.c index 0305ad5..317cbb0 100644 --- a/gv.c +++ b/gv.c @@ -1,6 +1,6 @@ /* gv.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -154,6 +154,27 @@ S_gv_init_sv(pTHX_ GV *gv, I32 sv_type) } } +/* +=for apidoc gv_fetchmeth + +Returns the glob with the given C and a defined subroutine or +C. The glob lives in the given C, or in the stashes +accessible via @ISA and @UNIVERSAL. + +The argument C should be either 0 or -1. If C, as a +side-effect creates a glob with the given C in the given C +which in the case of success contains an alias for the subroutine, and sets +up caching info for this glob. Similarly for all the searched stashes. + +This function grants C<"SUPER"> token as a postfix of the stash name. The +GV returned from C may be a method cache entry, which is not +visible to Perl code. So when calling C, you should not use +the GV directly; instead, you should use the method's CV, which can be +obtained from the GV with the C macro. + +=cut +*/ + GV * Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level) { @@ -275,12 +296,48 @@ Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level) return 0; } +/* +=for apidoc gv_fetchmethod + +See L. + +=cut +*/ + GV * Perl_gv_fetchmethod(pTHX_ HV *stash, const char *name) { return gv_fetchmethod_autoload(stash, name, TRUE); } +/* +=for apidoc gv_fetchmethod_autoload + +Returns the glob which contains the subroutine to call to invoke the method +on the C. In fact in the presence of autoloading this may be the +glob for "AUTOLOAD". In this case the corresponding variable $AUTOLOAD is +already setup. + +The third parameter of C determines whether +AUTOLOAD lookup is performed if the given method is not present: non-zero +means yes, look for AUTOLOAD; zero means no, don't look for AUTOLOAD. +Calling C is equivalent to calling C +with a non-zero C parameter. + +These functions grant C<"SUPER"> token as a prefix of the method name. Note +that if you want to keep the returned glob for a long time, you need to +check for it being "AUTOLOAD", since at the later time the call may load a +different subroutine due to $AUTOLOAD changing its value. Use the glob +created via a side effect to do this. + +These functions have the same side-effects and as C with +C. C should be writable if contains C<':'> or C<' +''>. The warning against passing the GV returned by C to +C apply equally to these functions. + +=cut +*/ + GV * Perl_gv_fetchmethod_autoload(pTHX_ HV *stash, const char *name, I32 autoload) { @@ -387,6 +444,17 @@ Perl_gv_autoload4(pTHX_ HV *stash, const char *name, STRLEN len, I32 method) return gv; } +/* +=for apidoc gv_stashpv + +Returns a pointer to the stash for a specified package. If C is +set then the package will be created if it does not already exist. If +C is not set and the package does not exist then NULL is +returned. + +=cut +*/ + HV* Perl_gv_stashpv(pTHX_ const char *name, I32 create) { @@ -422,6 +490,15 @@ Perl_gv_stashpvn(pTHX_ const char *name, U32 namelen, I32 create) return stash; } +/* +=for apidoc gv_stashsv + +Returns a pointer to the stash for a specified package. See +C. + +=cut +*/ + HV* Perl_gv_stashsv(pTHX_ SV *sv, I32 create) { @@ -504,9 +581,7 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) /* No stash in name, so see how we can default */ if (!stash) { - if (isIDFIRST(*name) - || (IN_UTF8 && ((*name & 0xc0) == 0xc0) && isIDFIRST_utf8((U8*)name))) - { + if (isIDFIRST_lazy(name)) { bool global = FALSE; if (isUPPER(*name)) { @@ -752,25 +827,26 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) case '\\': case '/': case '|': - case '\001': - case '\003': - case '\004': - case '\005': - case '\006': - case '\010': - case '\011': /* NOT \t in EBCDIC */ - case '\017': - case '\020': - case '\024': + case '\001': /* $^A */ + case '\003': /* $^C */ + case '\004': /* $^D */ + case '\005': /* $^E */ + case '\006': /* $^F */ + case '\010': /* $^H */ + case '\011': /* $^I, NOT \t in EBCDIC */ + case '\017': /* $^O */ + case '\020': /* $^P */ + case '\024': /* $^T */ if (len > 1) break; goto magicalize; - case '\023': + case '\023': /* $^S */ if (len > 1) break; goto ro_magicalize; - case '\027': /* $^W & $^Warnings */ - if (len > 1 && strNE(name, "\027arnings")) + case '\027': /* $^W & $^WARNING_BITS */ + if (len > 1 && strNE(name, "\027ARNING_BITS") + && strNE(name, "\027IDE_SYSTEM_CALLS")) break; goto magicalize; @@ -797,7 +873,7 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) sv_magic(GvSV(gv), (SV*)gv, 0, name, len); break; - case '\014': + case '\014': /* $^L */ if (len > 1) break; sv_setpv(GvSV(gv),"\f"); @@ -818,6 +894,13 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) SvREADONLY_on(sv); } break; + case '\026': /* $^V */ + if (len == 1) { + SV *sv = GvSV(gv); + GvSV(gv) = SvREFCNT_inc(PL_patchlevel); + SvREFCNT_dec(sv); + } + break; } return gv; } @@ -1365,7 +1448,7 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags) if (amtp && amtp->fallback >= AMGfallYES) { DEBUG_o( Perl_deb(aTHX_ "%s", SvPVX(msg)) ); } else { - Perl_croak(aTHX_ "%_", msg); + Perl_croak(aTHX_ "%"SVf, msg); } return NULL; } diff --git a/gv.h b/gv.h index f489d2d..d2234a6 100644 --- a/gv.h +++ b/gv.h @@ -1,6 +1,6 @@ /* gv.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -34,6 +34,14 @@ struct gp { #define GvSTASH(gv) (GvXPVGV(gv)->xgv_stash) #define GvFLAGS(gv) (GvXPVGV(gv)->xgv_flags) +/* +=for apidoc Am|SV*|GvSV|GV* gv + +Return the SV from the GV. + +=cut +*/ + #define GvSV(gv) (GvGP(gv)->gp_sv) #define GvREFCNT(gv) (GvGP(gv)->gp_refcnt) #define GvIO(gv) ((gv) && SvTYPE((SV*)gv) == SVt_PVGV ? GvIOp(gv) : 0) diff --git a/handy.h b/handy.h index 92d163e..ce2631f 100644 --- a/handy.h +++ b/handy.h @@ -1,6 +1,6 @@ /* handy.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -19,6 +19,17 @@ #endif #define Null(type) ((type)NULL) + +/* +=for apidoc AmU||Nullch +Null character pointer. + +=for apidoc AmU||Nullsv +Null SV pointer. + +=cut +*/ + #define Nullch Null(char*) #define Nullfp Null(PerlIO*) #define Nullsv Null(SV*) @@ -173,6 +184,43 @@ typedef U64TYPE U64; #define Ctl(ch) ((ch) & 037) +/* +=for apidoc Am|bool|strNE|char* s1|char* s2 +Test two strings to see if they are different. Returns true or +false. + +=for apidoc Am|bool|strEQ|char* s1|char* s2 +Test two strings to see if they are equal. Returns true or false. + +=for apidoc Am|bool|strLT|char* s1|char* s2 +Test two strings to see if the first, C, is less than the second, +C. Returns true or false. + +=for apidoc Am|bool|strLE|char* s1|char* s2 +Test two strings to see if the first, C, is less than or equal to the +second, C. Returns true or false. + +=for apidoc Am|bool|strGT|char* s1|char* s2 +Test two strings to see if the first, C, is greater than the second, +C. Returns true or false. + +=for apidoc Am|bool|strGE|char* s1|char* s2 +Test two strings to see if the first, C, is greater than or equal to +the second, C. Returns true or false. + +=for apidoc Am|bool|strnNE|char* s1|char* s2|STRLEN len +Test two strings to see if they are different. The C parameter +indicates the number of bytes to compare. Returns true or false. (A +wrapper for C). + +=for apidoc Am|bool|strnEQ|char* s1|char* s2|STRLEN len +Test two strings to see if they are equal. The C parameter indicates +the number of bytes to compare. Returns true or false. (A wrapper for +C). + +=cut +*/ + #define strNE(s1,s2) (strcmp(s1,s2)) #define strEQ(s1,s2) (!strcmp(s1,s2)) #define strLT(s1,s2) (strcmp(s1,s2) < 0) @@ -209,6 +257,39 @@ typedef U64TYPE U64; # endif #endif +/* +=for apidoc Am|bool|isALNUM|char ch +Returns a boolean indicating whether the C C is an ascii alphanumeric +character or digit. + +=for apidoc Am|bool|isALPHA|char ch +Returns a boolean indicating whether the C C is an ascii alphabetic +character. + +=for apidoc Am|bool|isSPACE|char ch +Returns a boolean indicating whether the C C is whitespace. + +=for apidoc Am|bool|isDIGIT|char ch +Returns a boolean indicating whether the C C is an ascii +digit. + +=for apidoc Am|bool|isUPPER|char ch +Returns a boolean indicating whether the C C is an uppercase +character. + +=for apidoc Am|bool|isLOWER|char ch +Returns a boolean indicating whether the C C is a lowercase +character. + +=for apidoc Am|char|toUPPER|char ch +Converts the specified character to uppercase. + +=for apidoc Am|char|toLOWER|char ch +Converts the specified character to lowercase. + +=cut +*/ + #define isALNUM(c) (isALPHA(c) || isDIGIT(c) || (c) == '_') #define isIDFIRST(c) (isALPHA(c) || (c) == '_') #define isALPHA(c) (isUPPER(c) || isLOWER(c)) @@ -397,6 +478,56 @@ typedef U16 line_t; --Andy Dougherty August 1996 */ +/* +=for apidoc Am|SV*|NEWSV|int id|STRLEN len +Creates a new SV. A non-zero C parameter indicates the number of +bytes of preallocated string space the SV should have. An extra byte for a +tailing NUL is also reserved. (SvPOK is not set for the SV even if string +space is allocated.) The reference count for the new SV is set to 1. +C is an integer id between 0 and 1299 (used to identify leaks). + +=for apidoc Am|void|New|int id|void* ptr|int nitems|type +The XSUB-writer's interface to the C C function. + +=for apidoc Am|void|Newc|int id|void* ptr|int nitems|type|cast +The XSUB-writer's interface to the C C function, with +cast. + +=for apidoc Am|void|Newz|int id|void* ptr|int nitems|type +The XSUB-writer's interface to the C C function. The allocated +memory is zeroed with C. + +=for apidoc Am|void|Renew|void* ptr|int nitems|type +The XSUB-writer's interface to the C C function. + +=for apidoc Am|void|Renewc|void* ptr|int nitems|type|cast +The XSUB-writer's interface to the C C function, with +cast. + +=for apidoc Am|void|Safefree|void* src|void* dest|int nitems|type +The XSUB-writer's interface to the C C function. + +=for apidoc Am|void|Move|void* src|void* dest|int nitems|type +The XSUB-writer's interface to the C C function. The C is the +source, C is the destination, C is the number of items, and C is +the type. Can do overlapping moves. See also C. + +=for apidoc Am|void|Copy|void* src|void* dest|int nitems|type +The XSUB-writer's interface to the C C function. The C is the +source, C is the destination, C is the number of items, and C is +the type. May fail on overlapping copies. See also C. + +=for apidoc Am|void|Zero|void* dest|int nitems|type + +The XSUB-writer's interface to the C C function. The C is the +destination, C is the number of items, and C is the type. + +=for apidoc Am|void|StructCopy|type src|type dest|type +This is an architecture-independant macro to copy one structure to another. + +=cut +*/ + #ifndef lint #define NEWSV(x,len) newSV(len) diff --git a/hints/cygwin.sh b/hints/cygwin.sh index 71c9a83..4843200 100644 --- a/hints/cygwin.sh +++ b/hints/cygwin.sh @@ -21,7 +21,6 @@ so='dll' # - eliminate -lc, implied by gcc libswanted=`echo " $libswanted " | sed -e 's/ c / /g'` libswanted="$libswanted cygipc cygwin kernel32" -ccflags="$ccflags -DCYGWIN" # - otherwise i686-cygwin archname='cygwin' @@ -34,6 +33,11 @@ cccdlflags=' ' # - perl malloc needs to be unpolluted bincompat5005='undef' +# stubs (ENOSYS, not implemented) +d_chroot='undef' +d_seteuid='undef' +d_setegid='undef' + # strip exe's and dll's #ldflags="$ldflags -s" #ccdlflags="$ccdlflags -s" diff --git a/hints/dynixptx.sh b/hints/dynixptx.sh index 5320030..11c6b5b 100644 --- a/hints/dynixptx.sh +++ b/hints/dynixptx.sh @@ -19,9 +19,8 @@ libswanted=`echo $libswanted | sed -e 's/ inet / /'` # Configure defaults to usenm='y', which doesn't work very well usenm='n' -# for performance, apparently this makes a huge difference (~krader) +# removed d_vfork='define'; we can't use it any more ... -d_vfork='define' case "$optimize" in '') optimize='-Wc,-O3 -W0,-xstring' ;; esac diff --git a/hints/hpux.sh b/hints/hpux.sh index 66fe7c4..168c4be 100644 --- a/hints/hpux.sh +++ b/hints/hpux.sh @@ -217,7 +217,6 @@ else NOTE: You are using HP cc(1) but GNU ar(1). This might lead into trouble later on, I'm switching to HP ar to play safe. - END ar=/usr/bin/ar fi @@ -290,74 +289,62 @@ EOM esac EOCBU -# This script UU/uselfs.cbu will get 'called-back' by Configure -# after it has prompted the user for whether to use 64 bits. -cat > UU/uselfs.cbu <<'EOCBU' -case "$uselargefiles" in -$define|true|[yY]*) - lfcflags="`getconf _CS_XBS5_ILP32_OFFBIG_CFLAGS 2>/dev/null`" - lfldflags="`getconf _CS_XBS5_ILP32_OFFBIG_LDFLAGS 2>/dev/null`" - lflibs="`getconf _CS_XBS5_ILP32_OFFBIG_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`" - case "$lfcflags$lfldflags$lflibs" in - '');; - *) # This sucks. To get the HP-UX strict ANSI mode (-Aa) to - # approve of large file offsets, we must turn on the 64-bitness - # (+DD64), too. A callback file (a hack) calling another, yuck. - case "$use64bits" in - $undef|false|[nN]*|'') - use64bits="$define" - if $test -f use64bits.cbu; then - echo "(Large files in HP-UX require also 64-bitness, picking up 64-bit hints...)" - . ./use64bits.cbu - fi - ;; - esac - ccflags="$ccflags $lfcflags" - ldflags="$ldflags $ldldflags" - libswanted="$libswanted $lflibs" - ;; - esac - lfcflags='' - lfldflags='' - lflibs='' - ;; -esac -EOCBU - # This script UU/use64bits.cbu will get 'called-back' by Configure # after it has prompted the user for whether to use 64 bits. cat > UU/use64bits.cbu <<'EOCBU' -case "$ccflags" in -*+DD64*) # Been here, done this (via uselfs.cbu, most likely.) - ;; -*) case "$use64bits" in +case "$use64bits" in $define|true|[yY]*) - if [ "$xxOsRevMajor" -lt 11 ]; then + if [ "$xxOsRevMajor" -lt 11 ]; then cat <&4 64-bit compilation is not supported on HP-UX $xxOsRevMajor. You need at least HP-UX 11.0. Cannot continue, aborting. EOM exit 1 - fi - if [ ! -f /lib/pa20_64/libc.sl ]; then + fi + if [ ! -f /lib/pa20_64/libc.sl ]; then cat <&4 You do not seem to have the 64-bit libraries in /lib/pa20_64. Most importantly, I cannot find /lib/pa20_64/libc.sl. Cannot continue, aborting. EOM exit 1 - fi - ccflags="$ccflags +DD64" - ldflags="$ldflags +DD64" - ld=/usr/bin/ld - set `echo " $libswanted " | sed -e 's@ dl @ @'` - libswanted="$*" - glibpth="/lib/pa20_64" - esac - ;; + fi + + ccflags="$ccflags +DD64" + ld=/usr/bin/ld + ar=/usr/bin/ar + loclibpth="/lib/pa20_64 $loclibpth" + + # The strict ANSI mode (-Aa) doesn't like the LL suffixes. + ccflags=`echo $ccflags|sed 's@ -Aa @ -Ae @'` + + set `echo " $libswanted " | sed -e 's@ dl @ @'` + libswanted="$*" + + libscheck=' +case "`/usr/bin/file $xxx`" in +*LP64*) ;; +*) xxx=/non/64/bit$xxx ;; +esac +' + ;; esac EOCBU +# This script UU/uselfs.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use 64 bits. +cat > UU/uselfs.cbu <<'EOCBU' +case "$uselargefiles" in +$define|true|[yY]*) + ccflags="$ccflags `getconf _CS_XBS5_ILP32_OFFBIG_CFLAGS 2>/dev/null`" + ldflags="$ldflags `getconf _CS_XBS5_ILP32_OFFBIG_LDFLAGS 2>/dev/null`" + + libswanted="$libswanted `getconf _CS_XBS5_ILP32_OFFBIG_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`" + # The strict ANSI mode (-Aa) doesn't like large files. + ccflags=`echo $ccflags|sed 's@ -Aa @ -Ae @'` + ;; +esac +EOCBU diff --git a/hints/netbsd.sh b/hints/netbsd.sh index e359127..7bd0a25 100644 --- a/hints/netbsd.sh +++ b/hints/netbsd.sh @@ -34,7 +34,7 @@ case "$osvers" in # we use -fPIC here because -fpic is *NOT* enough for some of the # extensions like Tk on some netbsd platforms (the sparc is one) cccdlflags="-DPIC -fPIC $cccdlflags" - lddlflags="-Bforcearchive -Bshareable $lddlflags" + lddlflags="-Bshareable $lddlflags" else d_dlopen=$undef fi diff --git a/hints/openbsd.sh b/hints/openbsd.sh index 4ae2611..7e68402 100644 --- a/hints/openbsd.sh +++ b/hints/openbsd.sh @@ -5,14 +5,14 @@ # Andy Dougherty # # To build with distribution paths, use: -# ./Configure -des -Dopenbsd_distribution +# ./Configure -des -Dopenbsd_distribution=defined # # OpenBSD has a better malloc than perl... test "$usemymalloc" || usemymalloc='n' # Currently, vfork(2) is not a real win over fork(2) but this will -# change in a future release. +# change starting with OpenBSD 2.7. usevfork='true' # setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS versions @@ -24,19 +24,20 @@ d_setrgid=$undef d_setruid=$undef # -# Not all platforms support shared libs... +# Not all platforms support dynamic loading... # -case `uname -m` in -alpha|mips|powerpc|vax) - d_dlopen=$undef +case `arch` in +OpenBSD.alpha|OpenBSD.mips|OpenBSD.powerpc|OpenBSD.vax) + usedl=$undef ;; *) + usedl=$define d_dlopen=$define d_dlerror=$define # we use -fPIC here because -fpic is *NOT* enough for some of the # extensions like Tk on some OpenBSD platforms (ie: sparc) cccdlflags="-DPIC -fPIC $cccdlflags" - lddlflags="-Bforcearchive -Bshareable $lddlflags" + lddlflags="-Bshareable $lddlflags" ;; esac @@ -74,17 +75,22 @@ EOCBU # When building in the OpenBSD tree we use different paths # This is only part of the story, the rest comes from config.over case "$openbsd_distribution" in -''|$undef|false|[nN]*) ;; +''|$undef|false) ;; *) # We put things in /usr, not /usr/local prefix='/usr' prefixexp='/usr' sysman='/usr/share/man/man1' - # Never look for things in /usr/local - glibpth='/usr/lib' libpth='/usr/lib' - locincpth='' - loclibpth='' + glibpth='/usr/lib' + # Ports installs non-std libs in /usr/local/lib so look there too + locincpth='/usr/local/include' + loclibpth='/usr/local/lib' + # Link perl with shared libperl + if [ "$usedl" = "$define" -a -r shlib_version ]; then + useshrplib=true + libperl=`. ./shlib_version; echo libperl.so.${major}.${minor}` + fi ;; esac diff --git a/hints/unicosmk.sh b/hints/unicosmk.sh index f0b63cb..6113cc3 100644 --- a/hints/unicosmk.sh +++ b/hints/unicosmk.sh @@ -8,3 +8,11 @@ case "$usemymalloc" in ccflags="$ccflags -DNO_RCHECK" ;; esac +# If somebody ignores the Cray PATH. +case ":$PATH:" in +*:/opt/ctl/bin:*) ;; +'') case "$cc" in + '') test -x /opt/ctl/bin/cc && cc=/opt/ctl/bin/cc ;; + esac + ;; +esac diff --git a/hv.c b/hv.c index 9b01db7..435b10d 100644 --- a/hv.c +++ b/hv.c @@ -1,6 +1,6 @@ /* hv.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -105,6 +105,20 @@ Perl_he_dup(pTHX_ HE *e, bool shared) /* (klen == HEf_SVKEY) is special for MAGICAL hv entries, meaning key slot * contains an SV* */ +/* +=for apidoc hv_fetch + +Returns the SV which corresponds to the specified key in the hash. The +C is the length of the key. If C is set then the fetch will be +part of a store. Check that the return value is non-null before +dereferencing it to a C. + +See L for more +information on how to use this function on tied hashes. + +=cut +*/ + SV** Perl_hv_fetch(pTHX_ HV *hv, const char *key, U32 klen, I32 lval) { @@ -184,6 +198,23 @@ Perl_hv_fetch(pTHX_ HV *hv, const char *key, U32 klen, I32 lval) /* returns a HE * structure with the all fields set */ /* note that hent_val will be a mortal sv for MAGICAL hashes */ +/* +=for apidoc hv_fetch_ent + +Returns the hash entry which corresponds to the specified key in the hash. +C must be a valid precomputed hash number for the given C, or 0 +if you want the function to compute it. IF C is set then the fetch +will be part of a store. Make sure the return value is non-null before +accessing it. The return value when C is a tied hash is a pointer to a +static location, so be sure to make a copy of the structure if you need to +store it somewhere. + +See L for more +information on how to use this function on tied hashes. + +=cut +*/ + HE * Perl_hv_fetch_ent(pTHX_ HV *hv, SV *keysv, I32 lval, register U32 hash) { @@ -293,6 +324,24 @@ S_hv_magic_check(pTHX_ HV *hv, bool *needs_copy, bool *needs_store) } } +/* +=for apidoc hv_store + +Stores an SV in a hash. The hash key is specified as C and C is +the length of the key. The C parameter is the precomputed hash +value; if it is zero then Perl will compute it. The return value will be +NULL if the operation failed or if the value did not need to be actually +stored within the hash (as in the case of tied hashes). Otherwise it can +be dereferenced to get the original C. Note that the caller is +responsible for suitably incrementing the reference count of C before +the call, and decrementing it if the function returned NULL. + +See L for more +information on how to use this function on tied hashes. + +=cut +*/ + SV** Perl_hv_store(pTHX_ HV *hv, const char *key, U32 klen, SV *val, register U32 hash) { @@ -363,6 +412,25 @@ Perl_hv_store(pTHX_ HV *hv, const char *key, U32 klen, SV *val, register U32 has return &HeVAL(entry); } +/* +=for apidoc hv_store_ent + +Stores C in a hash. The hash key is specified as C. The C +parameter is the precomputed hash value; if it is zero then Perl will +compute it. The return value is the new hash entry so created. It will be +NULL if the operation failed or if the value did not need to be actually +stored within the hash (as in the case of tied hashes). Otherwise the +contents of the return value can be accessed using the C macros +described here. Note that the caller is responsible for suitably +incrementing the reference count of C before the call, and +decrementing it if the function returned NULL. + +See L for more +information on how to use this function on tied hashes. + +=cut +*/ + HE * Perl_hv_store_ent(pTHX_ HV *hv, SV *keysv, SV *val, register U32 hash) { @@ -445,6 +513,17 @@ Perl_hv_store_ent(pTHX_ HV *hv, SV *keysv, SV *val, register U32 hash) return entry; } +/* +=for apidoc hv_delete + +Deletes a key/value pair in the hash. The value SV is removed from the +hash and returned to the caller. The C is the length of the key. +The C value will normally be zero; if set to G_DISCARD then NULL +will be returned. + +=cut +*/ + SV * Perl_hv_delete(pTHX_ HV *hv, const char *key, U32 klen, I32 flags) { @@ -516,6 +595,17 @@ Perl_hv_delete(pTHX_ HV *hv, const char *key, U32 klen, I32 flags) return Nullsv; } +/* +=for apidoc hv_delete_ent + +Deletes a key/value pair in the hash. The value SV is removed from the +hash and returned to the caller. The C value will normally be zero; +if set to G_DISCARD then NULL will be returned. C can be a valid +precomputed hash value, or 0 to ask for it to be computed. + +=cut +*/ + SV * Perl_hv_delete_ent(pTHX_ HV *hv, SV *keysv, I32 flags, U32 hash) { @@ -592,6 +682,15 @@ Perl_hv_delete_ent(pTHX_ HV *hv, SV *keysv, I32 flags, U32 hash) return Nullsv; } +/* +=for apidoc hv_exists + +Returns a boolean indicating whether the specified hash key exists. The +C is the length of the key. + +=cut +*/ + bool Perl_hv_exists(pTHX_ HV *hv, const char *key, U32 klen) { @@ -657,6 +756,16 @@ Perl_hv_exists(pTHX_ HV *hv, const char *key, U32 klen) } +/* +=for apidoc hv_exists_ent + +Returns a boolean indicating whether the specified hash key exists. C +can be a valid precomputed hash value, or 0 to ask for it to be +computed. + +=cut +*/ + bool Perl_hv_exists_ent(pTHX_ HV *hv, SV *keysv, U32 hash) { @@ -867,6 +976,14 @@ Perl_hv_ksplit(pTHX_ HV *hv, IV newmax) } } +/* +=for apidoc newHV + +Creates a new HV. The reference count is set to 1. + +=cut +*/ + HV * Perl_newHV(pTHX) { @@ -967,6 +1084,14 @@ Perl_hv_delayfree_ent(pTHX_ HV *hv, register HE *entry) del_he(entry); } +/* +=for apidoc hv_clear + +Clears a hash, making it empty. + +=cut +*/ + void Perl_hv_clear(pTHX_ HV *hv) { @@ -1017,6 +1142,14 @@ S_hfreeentries(pTHX_ HV *hv) (void)hv_iterinit(hv); } +/* +=for apidoc hv_undef + +Undefines the hash. + +=cut +*/ + void Perl_hv_undef(pTHX_ HV *hv) { @@ -1039,6 +1172,20 @@ Perl_hv_undef(pTHX_ HV *hv) mg_clear((SV*)hv); } +/* +=for apidoc hv_iterinit + +Prepares a starting point to traverse a hash table. Returns the number of +keys in the hash (i.e. the same as C). The return value is +currently only meaningful for hashes without tie magic. + +NOTE: Before version 5.004_65, C used to return the number of +hash buckets that happen to be in use. If you still need that esoteric +value, you can get it through the macro C. + +=cut +*/ + I32 Perl_hv_iterinit(pTHX_ HV *hv) { @@ -1058,6 +1205,14 @@ Perl_hv_iterinit(pTHX_ HV *hv) return xhv->xhv_keys; /* used to be xhv->xhv_fill before 5.004_65 */ } +/* +=for apidoc hv_iternext + +Returns entries from a hash iterator. See C. + +=cut +*/ + HE * Perl_hv_iternext(pTHX_ HV *hv) { @@ -1129,6 +1284,15 @@ Perl_hv_iternext(pTHX_ HV *hv) return entry; } +/* +=for apidoc hv_iterkey + +Returns the key from the current position of the hash iterator. See +C. + +=cut +*/ + char * Perl_hv_iterkey(pTHX_ register HE *entry, I32 *retlen) { @@ -1145,6 +1309,16 @@ Perl_hv_iterkey(pTHX_ register HE *entry, I32 *retlen) } /* unlike hv_iterval(), this always returns a mortal copy of the key */ +/* +=for apidoc hv_iterkeysv + +Returns the key as an C from the current position of the hash +iterator. The return value will always be a mortal copy of the key. Also +see C. + +=cut +*/ + SV * Perl_hv_iterkeysv(pTHX_ register HE *entry) { @@ -1155,6 +1329,15 @@ Perl_hv_iterkeysv(pTHX_ register HE *entry) HeKLEN(entry))); } +/* +=for apidoc hv_iterval + +Returns the value from the current position of the hash iterator. See +C. + +=cut +*/ + SV * Perl_hv_iterval(pTHX_ HV *hv, register HE *entry) { @@ -1170,6 +1353,15 @@ Perl_hv_iterval(pTHX_ HV *hv, register HE *entry) return HeVAL(entry); } +/* +=for apidoc hv_iternextsv + +Performs an C, C, and C in one +operation. + +=cut +*/ + SV * Perl_hv_iternextsv(pTHX_ HV *hv, char **key, I32 *retlen) { @@ -1180,6 +1372,14 @@ Perl_hv_iternextsv(pTHX_ HV *hv, char **key, I32 *retlen) return hv_iterval(hv, he); } +/* +=for apidoc hv_magic + +Adds magic to a hash. See C. + +=cut +*/ + void Perl_hv_magic(pTHX_ HV *hv, GV *gv, int how) { diff --git a/hv.h b/hv.h index 11a602c..5bc38a0 100644 --- a/hv.h +++ b/hv.h @@ -1,6 +1,6 @@ /* hv.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -48,6 +48,62 @@ struct xpvhv { (hash) = hash_PeRlHaSh + (hash_PeRlHaSh>>5); \ } STMT_END +/* +=for apidoc AmU||HEf_SVKEY +This flag, used in the length slot of hash entries and magic structures, +specifies the structure contains a C pointer where a C pointer +is to be expected. (For information only--not to be used). + +=for apidoc AmU||Nullhv +Null HV pointer. + +=for apidoc Am|char*|HvNAME|HV* stash +Returns the package name of a stash. See C, C. + +=for apidoc Am|void*|HeKEY|HE* he +Returns the actual pointer stored in the key slot of the hash entry. The +pointer may be either C or C, depending on the value of +C. Can be assigned to. The C or C macros are +usually preferable for finding the value of a key. + +=for apidoc Am|STRLEN|HeKLEN|HE* he +If this is negative, and amounts to C, it indicates the entry +holds an C key. Otherwise, holds the actual length of the key. Can +be assigned to. The C macro is usually preferable for finding key +lengths. + +=for apidoc Am|SV*|HeVAL|HE* he +Returns the value slot (type C) stored in the hash entry. + +=for apidoc Am|U32|HeHASH|HE* he +Returns the computed hash stored in the hash entry. + +=for apidoc Am|char*|HePV|HE* he|STRLEN len +Returns the key slot of the hash entry as a C value, doing any +necessary dereferencing of possibly C keys. The length of the string +is placed in C (this is a macro, so do I use C<&len>). If you do +not care about what the length of the key is, you may use the global +variable C, though this is rather less efficient than using a local +variable. Remember though, that hash keys in perl are free to contain +embedded nulls, so using C or similar is not a good way to find +the length of hash keys. This is very similar to the C macro +described elsewhere in this document. + +=for apidoc Am|SV*|HeSVKEY|HE* he +Returns the key as an C, or C if the hash entry does not +contain an C key. + +=for apidoc Am|SV*|HeSVKEY_force|HE* he +Returns the key as an C. Will create and return a temporary mortal +C if the hash entry contains only a C key. + +=for apidoc Am|SV*|HeSVKEY_set|HE* he|SV* sv +Sets the key to a given C, taking care to set the appropriate flags to +indicate the presence of an C key, and returns the same +C. + +=cut +*/ /* these hash entry flags ride on hent_klen (for use only in magic/tied HVs) */ #define HEf_SVKEY -2 /* hent_key is a SV* */ diff --git a/installperl b/installperl index dae86a5..7c0bed7 100755 --- a/installperl +++ b/installperl @@ -156,8 +156,7 @@ if ($Is_Cygwin) { }; }; } else { - $perldll = 'perl.' . $dlext; - $perldll = 'perl56.' . $dlext if $Config{'ccflags'} =~ /PERL_OBJECT/i; + $perldll = 'perl56.' . $dlext; } if ($dlsrc ne "dl_none.xs") { diff --git a/intrpvar.h b/intrpvar.h index 606a892..e578b1a 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -35,7 +35,17 @@ PERLVAR(Iminus_l, bool) PERLVAR(Iminus_a, bool) PERLVAR(Iminus_F, bool) PERLVAR(Idoswitches, bool) -PERLVAR(Idowarn, bool) + +/* +=for apidoc Amn|bool|PL_dowarn + +The C variable which corresponds to Perl's $^W warning variable. + +=cut +*/ + +PERLVAR(Idowarn, U8) +PERLVAR(Iwidesyscalls, bool) /* wide system calls */ PERLVAR(Idoextract, bool) PERLVAR(Isawampersand, bool) /* must save all match strings */ PERLVAR(Iunsafe, bool) @@ -80,6 +90,29 @@ PERLVAR(Ierrgv, GV *) /* shortcuts to debugging objects */ PERLVAR(IDBgv, GV *) PERLVAR(IDBline, GV *) + +/* +=for apidoc Amn|GV *|PL_DBsub +When Perl is run in debugging mode, with the B<-d> switch, this GV contains +the SV which holds the name of the sub being debugged. This is the C +variable which corresponds to Perl's $DB::sub variable. See +C. + +=for apidoc Amn|SV *|PL_DBsingle +When Perl is run in debugging mode, with the B<-d> switch, this SV is a +boolean which indicates whether subs are being single-stepped. +Single-stepping is automatically turned on after every step. This is the C +variable which corresponds to Perl's $DB::single variable. See +C. + +=for apidoc Amn|SV *|PL_DBtrace +Trace variable used when Perl is run in debugging mode, with the B<-d> +switch. This is the C variable which corresponds to Perl's $DB::trace +variable. See C. + +=cut +*/ + PERLVAR(IDBsub, GV *) PERLVAR(IDBsingle, SV *) PERLVAR(IDBtrace, SV *) @@ -93,7 +126,7 @@ PERLVAR(Iglobalstash, HV *) /* global keyword overrides imported here */ PERLVAR(Icurstname, SV *) /* name of current package */ PERLVAR(Ibeginav, AV *) /* names of BEGIN subroutines */ PERLVAR(Iendav, AV *) /* names of END subroutines */ -PERLVAR(Istopav, AV *) /* names of STOP subroutines */ +PERLVAR(Icheckav, AV *) /* names of CHECK subroutines */ PERLVAR(Iinitav, AV *) /* names of INIT subroutines */ PERLVAR(Istrtab, HV *) /* shared string table */ PERLVARI(Isub_generation,U32,1) /* incr to invalidate method cache */ @@ -147,6 +180,19 @@ PERLVAR(Iofmt, char *) /* output format for numbers $# */ PERLVARI(Iexitlist, PerlExitListEntry *, NULL) /* list of exit functions */ PERLVARI(Iexitlistlen, I32, 0) /* length of same */ + +/* +=for apidoc Amn|HV*|PL_modglobal + +C is a general purpose, interpreter global HV for use by +extensions that need to keep information on a per-interpreter basis. +In a pinch, it can also be used as a symbol table for extensions +to share data among each other. It is a good idea to use keys +prefixed by the package name of the extension that owns the data. + +=cut +*/ + PERLVAR(Imodglobal, HV *) /* per-interp module data */ /* these used to be in global before 5.004_68 */ @@ -222,6 +268,21 @@ PERLVARI(Irunops, runops_proc_t, MEMBER_TO_FPTR(RUNOPS_DEFAULT)) PERLVARA(Itokenbuf,256, char) +/* +=for apidoc Amn|SV|PL_sv_undef +This is the C SV. Always refer to this as C<&PL_sv_undef>. + +=for apidoc Amn|SV|PL_sv_no +This is the C SV. See C. Always refer to this as +C<&PL_sv_no>. + +=for apidoc Amn|SV|PL_sv_yes +This is the C SV. See C. Always refer to this as +C<&PL_sv_yes>. + +=cut +*/ + PERLVAR(Isv_undef, SV) PERLVAR(Isv_no, SV) PERLVAR(Isv_yes, SV) diff --git a/keywords.h b/keywords.h index 972240f..3343041 100644 --- a/keywords.h +++ b/keywords.h @@ -16,7 +16,7 @@ #define KEY_LE 15 #define KEY_LT 16 #define KEY_NE 17 -#define KEY_STOP 18 +#define KEY_CHECK 18 #define KEY_abs 19 #define KEY_accept 20 #define KEY_alarm 21 diff --git a/keywords.pl b/keywords.pl index acdf807..46dd53d 100755 --- a/keywords.pl +++ b/keywords.pl @@ -42,7 +42,7 @@ INIT LE LT NE -STOP +CHECK abs accept alarm diff --git a/lib/AnyDBM_File.pm b/lib/AnyDBM_File.pm index 9cf9b31..58ffda7 100644 --- a/lib/AnyDBM_File.pm +++ b/lib/AnyDBM_File.pm @@ -1,7 +1,7 @@ package AnyDBM_File; -use vars qw(@ISA); -@ISA = qw(NDBM_File DB_File GDBM_File SDBM_File ODBM_File) unless @ISA; +use 5.005_64; +our @ISA = qw(NDBM_File DB_File GDBM_File SDBM_File ODBM_File) unless @ISA; my $mod; for $mod (@ISA) { diff --git a/lib/AutoLoader.pm b/lib/AutoLoader.pm index 4bbcb33..d62ceb0 100644 --- a/lib/AutoLoader.pm +++ b/lib/AutoLoader.pm @@ -1,6 +1,7 @@ package AutoLoader; -# use vars qw(@EXPORT @EXPORT_OK $VERSION); +use 5.005_64; +our(@EXPORT, @EXPORT_OK, $VERSION); my $is_dosish; my $is_vms; diff --git a/lib/AutoSplit.pm b/lib/AutoSplit.pm index feecd58..41d5489 100644 --- a/lib/AutoSplit.pm +++ b/lib/AutoSplit.pm @@ -1,17 +1,16 @@ package AutoSplit; +use 5.005_64; use Exporter (); use Config qw(%Config); use Carp qw(carp); use File::Basename (); use File::Path qw(mkpath); use strict; -use vars qw( - $VERSION @ISA @EXPORT @EXPORT_OK - $Verbose $Keep $Maxlen $CheckForAutoloader $CheckModTime - ); +our($VERSION, @ISA, @EXPORT, @EXPORT_OK, $Verbose, $Keep, $Maxlen, + $CheckForAutoloader, $CheckModTime); -$VERSION = "1.0304"; +$VERSION = "1.0305"; @ISA = qw(Exporter); @EXPORT = qw(&autosplit &autosplit_lib_modules); @EXPORT_OK = qw($Verbose $Keep $Maxlen $CheckForAutoloader $CheckModTime); @@ -150,7 +149,7 @@ my $Is_VMS = ($^O eq 'VMS'); # allow checking for valid ': attrlist' attachments my $nested; $nested = qr{ \( (?: (?> [^()]+ ) | (?p{ $nested }) )* \) }x; -my $one_attr = qr{ (?> (?! \d) \w+ (?:$nested)? ) [\s,]* }x; +my $one_attr = qr{ (?> (?! \d) \w+ (?:$nested)? ) (?:\s*\:\s*|\s+(?!\:)) }x; my $attr_list = qr{ \s* : \s* (?: $one_attr )* }x; @@ -353,8 +352,10 @@ EOT } $last_package = $this_package if defined $this_package; } - print OUT @cache,"1;\n# end of $last_package\::$subname\n"; - close(OUT); + if ($subname) { + print OUT @cache,"1;\n# end of $last_package\::$subname\n"; + close(OUT); + } close(IN); if (!$keep){ # don't keep any obsolete *.al files in the directory @@ -467,5 +468,5 @@ package Yet::Another::AutoSplit; sub testtesttesttest4_1 ($) { "another test 4\n"; } sub testtesttesttest4_2 ($$) { "another duplicate test 4\n"; } package Yet::More::Attributes; -sub test_a1 ($) : locked { 1; } +sub test_a1 ($) : locked :locked { 1; } sub test_a2 : locked { 1; } diff --git a/lib/Benchmark.pm b/lib/Benchmark.pm index 487ddd5..3c10a5b 100644 --- a/lib/Benchmark.pm +++ b/lib/Benchmark.pm @@ -423,19 +423,19 @@ sub timestr { my @t = @$tr; warn "bad time value (@t)" unless @t==6; my($r, $pu, $ps, $cu, $cs, $n) = @t; - my($pt, $ct, $t) = ($tr->cpu_p, $tr->cpu_c, $tr->cpu_a); + my($pt, $ct, $tt) = ($tr->cpu_p, $tr->cpu_c, $tr->cpu_a); $f = $defaultfmt unless defined $f; # format a time in the required style, other formats may be added here $style ||= $defaultstyle; $style = ($ct>0) ? 'all' : 'noc' if $style eq 'auto'; my $s = "@t $style"; # default for unknown style $s=sprintf("%2d wallclock secs (%$f usr %$f sys + %$f cusr %$f csys = %$f CPU)", - @t,$t) if $style eq 'all'; + $r,$pu,$ps,$cu,$cs,$tt) if $style eq 'all'; $s=sprintf("%2d wallclock secs (%$f usr + %$f sys = %$f CPU)", $r,$pu,$ps,$pt) if $style eq 'noc'; $s=sprintf("%2d wallclock secs (%$f cusr + %$f csys = %$f CPU)", $r,$cu,$cs,$ct) if $style eq 'nop'; - $s .= sprintf(" @ %$f/s (n=$n)", $n / ( $pu + $ps )) if $n; + $s .= sprintf(" @ %$f/s (n=$n)", $n / ( $pu + $ps )) if $n && $pu+$ps; $s; } diff --git a/lib/CGI.pm b/lib/CGI.pm index c0cb5fd..ad7cd02 100644 --- a/lib/CGI.pm +++ b/lib/CGI.pm @@ -17,8 +17,8 @@ require 5.004; # The most recent version and complete docs are available at: # http://stein.cshl.org/WWW/software/CGI/ -$CGI::revision = '$Id: CGI.pm,v 1.18 1999/06/09 14:52:45 lstein Exp $'; -$CGI::VERSION='2.53'; +$CGI::revision = '$Id: CGI.pm,v 1.19 1999/08/31 17:04:37 lstein Exp $'; +$CGI::VERSION='2.56'; # HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES. # UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING. @@ -95,6 +95,8 @@ if ($OS=~/Win/i) { $OS = 'WINDOWS'; } elsif ($OS=~/vms/i) { $OS = 'VMS'; +} elsif ($OS=~/bsdos/i) { + $OS = 'UNIX'; } elsif ($OS=~/dos/i) { $OS = 'DOS'; } elsif ($OS=~/^MacOS$/i) { @@ -453,7 +455,7 @@ sub init { # We now have the query string in hand. We do slightly # different things for keyword lists and parameter lists. - if ($query_string ne '') { + if (defined $query_string && $query_string) { if ($query_string =~ /=/) { $self->parse_params($query_string); } else { @@ -518,7 +520,7 @@ sub cgi_error { # unescape URL-encoded data sub unescape { - shift() if ref($_[0]) || $_[0] eq $DefaultClass; + shift() if ref($_[0]) || (defined $_[1] && $_[0] eq $DefaultClass); my $todecode = shift; return undef unless defined($todecode); $todecode =~ tr/+/ /; # pluses become spaces @@ -532,12 +534,11 @@ sub unescape { # URL-encode data sub escape { - shift() if ref($_[0]) || $_[0] eq $DefaultClass; - my $toencode = shift; - return undef unless defined($toencode); - $toencode=~s/ /+/g; - $toencode=~s/([^a-zA-Z0-9_.+-])/uc sprintf("%%%02x",ord($1))/eg; - return $toencode; + shift() if ref($_[0]) || (defined $_[1] && $_[0] eq $DefaultClass); + my $toencode = shift; + return undef unless defined($toencode); + $toencode=~s/([^a-zA-Z0-9_.-])/uc sprintf("%%%02x",ord($1))/eg; + return $toencode; } sub save_request { @@ -851,8 +852,9 @@ END_OF_FUNC # with Steve Brenner's cgi-lib.pl routines 'Vars' => <<'END_OF_FUNC', sub Vars { + my $q = shift; my %in; - tie(%in,CGI); + tie(%in,CGI,$q); return %in if wantarray; return \%in; } @@ -917,7 +919,8 @@ END_OF_FUNC 'TIEHASH' => <<'END_OF_FUNC', sub TIEHASH { - return $Q || new CGI; + return $_[1] if defined $_[1]; + return $Q || new shift; } END_OF_FUNC @@ -1520,7 +1523,8 @@ END_OF_FUNC 'endform' => <<'END_OF_FUNC', sub endform { my($self,@p) = self_or_default(@_); - return ($self->get_fields,""); + return wantarray ? ($self->get_fields,"") : + $self->get_fields ."\n"; } END_OF_FUNC @@ -2126,7 +2130,7 @@ sub hidden { $name=$self->escapeHTML($name); foreach (@value) { - $_=$self->escapeHTML($_); + $_ = defined($_) ? $self->escapeHTML($_) : ''; push(@result,qq//); } return wantarray ? @result : join('',@result); @@ -2200,7 +2204,8 @@ sub url { # strip query string substr($script_name,$index) = '' if ($index = index($script_name,'?')) >= 0; # and path - substr($script_name,$index) = '' if $path and ($index = rindex($script_name,$path)) >= 0; + substr($script_name,$index) = '' if exists($ENV{PATH_INFO}) + and ($index = rindex($script_name,$ENV{PATH_INFO})) >= 0; } else { $script_name = $self->script_name; } @@ -2854,7 +2859,7 @@ sub read_multipart { # If no filename specified, then just read the data and assign it # to our parameter list. - unless ($filename) { + if ( !defined($filename) || $filename eq '' ) { my($value) = $buffer->readBody; push(@{$self->{$param}},$value); next; @@ -2877,7 +2882,7 @@ sub read_multipart { for (my $cnt=10;$cnt>0;$cnt--) { next unless $tmpfile = new TempFile($seqno); $tmp = $tmpfile->as_string; - last if $filehandle = Fh->new($filename,$tmp,$PRIVATE_TEMPFILES); + last if defined($filehandle = Fh->new($filename,$tmp,$PRIVATE_TEMPFILES)); $seqno += int rand(100); } die "CGI open of tmpfile: $!\n" unless $filehandle; @@ -2895,7 +2900,7 @@ sub read_multipart { # Save some information about the uploaded file where we can get # at it later. - $self->{'.tmpfiles'}->{$filename}= { + $self->{'.tmpfiles'}->{fileno($filehandle)}= { name => $tmpfile, info => {%header}, }; @@ -2918,8 +2923,8 @@ END_OF_FUNC 'tmpFileName' => <<'END_OF_FUNC', sub tmpFileName { my($self,$filename) = self_or_default(@_); - return $self->{'.tmpfiles'}->{$filename}->{name} ? - $self->{'.tmpfiles'}->{$filename}->{name}->as_string + return $self->{'.tmpfiles'}->{fileno($filename)}->{name} ? + $self->{'.tmpfiles'}->{fileno($filename)}->{name}->as_string : ''; } END_OF_FUNC @@ -2927,7 +2932,7 @@ END_OF_FUNC 'uploadInfo' => <<'END_OF_FUNC', sub uploadInfo { my($self,$filename) = self_or_default(@_); - return $self->{'.tmpfiles'}->{$filename}->{info}; + return $self->{'.tmpfiles'}->{fileno($filename)}->{info}; } END_OF_FUNC @@ -2979,7 +2984,7 @@ $AUTOLOADED_ROUTINES=<<'END_OF_AUTOLOAD'; sub asString { my $self = shift; # get rid of package name - (my $i = $$self) =~ s/^\*(\w+::)+//; + (my $i = $$self) =~ s/^\*(\w+::fh\d{5})+//; $i =~ s/\\(.)/$1/g; return $i; # BEGIN DEAD CODE @@ -3005,8 +3010,7 @@ END_OF_FUNC sub new { my($pack,$name,$file,$delete) = @_; require Fcntl unless defined &Fcntl::O_RDWR; - ++$FH; - my $ref = \*{'Fh::' . quotemeta($name)}; + my $ref = \*{'Fh::' . ++$FH . quotemeta($name)}; sysopen($ref,$file,Fcntl::O_RDWR()|Fcntl::O_CREAT()|Fcntl::O_EXCL(),0600) || return; unlink($file) if $delete; CORE::delete $Fh::{$FH}; @@ -5075,7 +5079,7 @@ Example: $file = $query->upload('uploaded_file'); if (!$file && $query->cgi_error) { - print $query->header(-status->$query->cgi_error); + print $query->header(-status=>$query->cgi_error); exit 0; } @@ -6429,7 +6433,7 @@ for suggestions and bug fixes. -rows=>10, -columns=>50); - print "

    ",$query->Reset; + print "

    ",$query->reset; print $query->submit('Action','Shout'); print $query->submit('Action','Scream'); print $query->endform; diff --git a/lib/CGI/Apache.pm b/lib/CGI/Apache.pm index 82a3669..dced866 100644 --- a/lib/CGI/Apache.pm +++ b/lib/CGI/Apache.pm @@ -1,103 +1,23 @@ -package CGI::Apache; -use Apache (); -use vars qw(@ISA $VERSION); -require CGI; -@ISA = qw(CGI); - -$VERSION = (qw$Revision: 1.1 $)[1]; -$CGI::DefaultClass = 'CGI::Apache'; -$CGI::Apache::AutoloadClass = 'CGI'; - -sub import { - my $self = shift; - my ($callpack, $callfile, $callline) = caller; - ${"${callpack}::AutoloadClass"} = 'CGI'; -} - -sub new { - my($class) = shift; - my($r) = Apache->request; - %ENV = $r->cgi_env unless defined $ENV{GATEWAY_INTERFACE}; #PerlSetupEnv On - my $self = $class->SUPER::new(@_); - $self->{'.req'} = $r; - $self; -} - -sub header { - my ($self,@rest) = CGI::self_or_default(@_); - my $r = $self->{'.req'}; - $r->basic_http_header; - return CGI::header($self,@rest); -} - -sub print { - my($self,@rest) = CGI::self_or_default(@_); - $self->{'.req'}->print(@rest); -} - -sub read_from_client { - my($self, $fh, $buff, $len, $offset) = @_; - my $r = $self->{'.req'} || Apache->request; - return $r->read($$buff, $len, $offset); -} - -sub new_MultipartBuffer { - my $self = shift; - my $new = CGI::Apache::MultipartBuffer->new($self, @_); - $new->{'.req'} = $self->{'.req'} || Apache->request; - return $new; -} - -package CGI::Apache::MultipartBuffer; -use vars qw(@ISA); -@ISA = qw(MultipartBuffer); - -$CGI::Apache::MultipartBuffer::AutoloadClass = 'MultipartBuffer'; -*CGI::Apache::MultipartBuffer::read_from_client = - \&CGI::Apache::read_from_client; - - +use CGI; 1; - __END__ =head1 NAME -CGI::Apache - Make things work with CGI.pm against Perl-Apache API +CGI::Apache - Backward compatibility module for CGI.pm =head1 SYNOPSIS - require CGI::Apache; - - my $q = new Apache::CGI; +Do not use this module. It is deprecated. - $q->print($q->header); - - #do things just like you do with CGI.pm +=head1 ABSTRACT =head1 DESCRIPTION -When using the Perl-Apache API, your applications are faster, but the -environment is different than CGI. -This module attempts to set-up that environment as best it can. - -=head1 NOTE 1 +=head1 AUTHOR INFORMATION -This module used to be named Apache::CGI. Sorry for the confusion. - -=head1 NOTE 2 - -If you're going to inherit from this class, make sure to "use" it -after your package declaration rather than "require" it. This is -because CGI.pm does a little magic during the import() step in order -to make autoloading work correctly. +=head1 BUGS =head1 SEE ALSO -perl(1), Apache(3), CGI(3) - -=head1 AUTHOR - -Doug MacEachern Edougm@osf.orgE, hacked over by Andreas KEnig Ea.koenig@mind.deE, modified by Lincoln Stein lstein@genome.wi.mit.edu - =cut diff --git a/lib/CGI/Cookie.pm b/lib/CGI/Cookie.pm index 433df49..aac0fb0 100644 --- a/lib/CGI/Cookie.pm +++ b/lib/CGI/Cookie.pm @@ -13,9 +13,9 @@ package CGI::Cookie; # wish, but if you redistribute a modified version, please attach a note # listing the modifications you have made. -$CGI::Cookie::VERSION='1.10'; +$CGI::Cookie::VERSION='1.12'; -use CGI; +use CGI qw(-no_debug); use overload '""' => \&as_string, 'cmp' => \&compare, 'fallback'=>1; @@ -97,10 +97,12 @@ sub new { },$class; # IE requires the path and domain to be present for some reason. - $path ||= CGI::url(-absolute=>1); - $domain ||= CGI::virtual_host(); + $path = CGI::url(-absolute=>1) unless defined $path; +# however, this breaks networks which use host tables without fully qualified +# names, so we comment it out. +# $domain = CGI::virtual_host() unless defined $domain; - $self->path($path) if defined $path; + $self->path($path) if defined $path; $self->domain($domain) if defined $domain; $self->secure($secure) if defined $secure; $self->expires($expires) if defined $expires; @@ -250,8 +252,8 @@ against your script's URL before returning the cookie. For example, if you specify the path "/cgi-bin", then the cookie will be returned to each of the scripts "/cgi-bin/tally.pl", "/cgi-bin/order.pl", and "/cgi-bin/customer_service/complain.pl", but not to the script -"/cgi-private/site_admin.pl". By default, the path is set to the -directory that contains your script. +"/cgi-private/site_admin.pl". By default, the path is set to your +script, so that only it will receive the cookie. =item B<4. secure flag> diff --git a/lib/CGI/Pretty.pm b/lib/CGI/Pretty.pm index f8931fb..4f2eed4 100644 --- a/lib/CGI/Pretty.pm +++ b/lib/CGI/Pretty.pm @@ -7,28 +7,63 @@ package CGI::Pretty; # documentation in manual or html file format (these utilities are part of the # Perl 5 distribution). +use strict; use CGI (); -$VERSION = '1.0'; +$CGI::Pretty::VERSION = '1.03'; $CGI::DefaultClass = __PACKAGE__; -$AutoloadClass = 'CGI'; -@ISA = 'CGI'; +$CGI::Pretty::AutoloadClass = 'CGI'; +@CGI::Pretty::ISA = qw( CGI ); -# These tags should not be prettify'd. If we did prettify them, the -# browser would output text that would have extraneous spaces -@AS_IS = qw( A PRE ); -my $NON_PRETTIFY_ENDTAGS = join "", map { "" } @AS_IS; +initialize_globals(); + +sub _prettyPrint { + my $input = shift; + + foreach my $i ( @CGI::Pretty::AS_IS ) { + if ( $$input =~ /<\/$i>/si ) { + my ( $a, $b, $c, $d, $e ) = $$input =~ /(.*)<$i(\s?)(.*?)>(.*?)<\/$i>(.*)/si; + _prettyPrint( \$a ); + _prettyPrint( \$e ); + + $$input = "$a<$i$b$c>$d$e"; + return; + } + } + $$input =~ s/$CGI::Pretty::LINEBREAK/$CGI::Pretty::LINEBREAK$CGI::Pretty::INDENT/g; +} + +sub comment { + my($self,@p) = CGI::self_or_CGI(@_); + + my $s = "@p"; + $s =~ s/$CGI::Pretty::LINEBREAK/$CGI::Pretty::LINEBREAK$CGI::Pretty::INDENT/g; + + return $self->SUPER::comment( "$CGI::Pretty::LINEBREAK$CGI::Pretty::INDENT$s$CGI::Pretty::LINEBREAK" ) . $CGI::Pretty::LINEBREAK; +} sub _make_tag_func { my ($self,$tagname) = @_; return $self->SUPER::_make_tag_func($tagname) if $tagname=~/^(start|end)_/; + # As Lincoln as noted, the last else clause is VERY hairy, and it + # took me a while to figure out what I was trying to do. + # What it does is look for tags that shouldn't be indented (e.g. PRE) + # and makes sure that when we nest tags, those tags don't get + # indented. + # For an example, try print td( pre( "hello\nworld" ) ); + # If we didn't care about stuff like that, the code would be + # MUCH simpler. BTW: I won't claim to be a regular expression + # guru, so if anybody wants to contribute something that would + # be quicker, easier to read, etc, I would be more than + # willing to put it in - Brian + return qq{ sub $tagname { # handle various cases in which we're called # most of this bizarre stuff is to avoid -w errors shift if \$_[0] && -# (!ref(\$_[0]) && \$_[0] eq \$CGI::DefaultClass) || + (!ref(\$_[0]) && \$_[0] eq \$CGI::DefaultClass) || (ref(\$_[0]) && (substr(ref(\$_[0]),0,3) eq 'CGI' || UNIVERSAL::isa(\$_[0],'CGI'))); @@ -43,58 +78,64 @@ sub _make_tag_func { return \$tag unless \@_; my \@result; - if ( "$NON_PRETTIFY_ENDTAGS" =~ /\$untag/ ) { - \@result = map { "\$tag\$_\$untag\\n" } + my \$NON_PRETTIFY_ENDTAGS = join "", map { "" } \@CGI::Pretty::AS_IS; + + if ( \$NON_PRETTIFY_ENDTAGS =~ /\$untag/ ) { + \@result = map { "\$tag\$_\$untag\$CGI::Pretty::LINEBREAK" } (ref(\$_[0]) eq 'ARRAY') ? \@{\$_[0]} : "\@_"; } else { \@result = map { chomp; if ( \$_ !~ /<\\// ) { - s/\\n/\\n /g; + s/\$CGI::Pretty::LINEBREAK/\$CGI::Pretty::LINEBREAK\$CGI::Pretty::INDENT/g; } else { - my \$text = ""; - my ( \$pretag, \$thistag, \$posttag ); - while ( /<\\/.*>/si ) { - if ( (\$pretag, \$thistag, \$posttag ) = - /(.*?)<(.*?)>(.*)/si ) { - \$pretag =~ s/\\n/\\n /g; - \$text .= "\$pretag<\$thistag>"; - - ( \$thistag ) = split ' ', \$thistag; - my \$endtag = ""; - if ( "$NON_PRETTIFY_ENDTAGS" =~ /\$endtag/ ) { - if ( ( \$pretag, \$posttag ) = - \$posttag =~ /(.*?)\$endtag(.*)/si ) { - \$text .= "\$pretag\$endtag"; - } - } - - \$_ = \$posttag; - } - } - \$_ = \$text; - if ( defined \$posttag ) { - \$posttag =~ s/\\n/\\n /g; - \$_ .= \$posttag; - } + my \$tmp = \$_; + CGI::Pretty::_prettyPrint( \\\$tmp ); + \$_ = \$tmp; } - "\$tag\\n \$_\\n\$untag\\n" } + "\$tag\$CGI::Pretty::LINEBREAK\$CGI::Pretty::INDENT\$_\$CGI::Pretty::LINEBREAK\$untag\$CGI::Pretty::LINEBREAK" } (ref(\$_[0]) eq 'ARRAY') ? \@{\$_[0]} : "\@_"; } + local \$" = ""; return "\@result"; } }; } +sub start_html { + return CGI::start_html( @_ ) . $CGI::Pretty::LINEBREAK; +} + +sub end_html { + return CGI::end_html( @_ ) . $CGI::Pretty::LINEBREAK; +} + sub new { my $class = shift; my $this = $class->SUPER::new( @_ ); + Apache->request->register_cleanup(\&CGI::Pretty::_reset_globals) if ($CGI::MOD_PERL); + $class->_reset_globals if $CGI::PERLEX; + return bless $this, $class; } +sub initialize_globals { + # This is the string used for indentation of tags + $CGI::Pretty::INDENT = "\t"; + + # This is the string used for seperation between tags + $CGI::Pretty::LINEBREAK = "\n"; + + # These tags are not prettify'd. + @CGI::Pretty::AS_IS = qw( A PRE CODE SCRIPT TEXTAREA ); + + 1; +} +sub _reset_globals { initialize_globals(); } + 1; =head1 NAME @@ -148,22 +189,43 @@ the list of tags that are not to be touched, push them onto the C<@AS_IS> array: push @CGI::Pretty::AS_IS,qw(CODE XMP); +=head2 Customizing the Indenting + +If you wish to have your own personal style of indenting, you can change the +C<$INDENT> variable: + + $CGI::Pretty::INDENT = "\t\t"; + +would cause the indents to be two tabs. + +Similarly, if you wish to have more space between lines, you may change the +C<$LINEBREAK> variable: + + $CGI::Pretty::LINEBREAK = "\n\n"; + +would create two carriage returns between lines. + +If you decide you want to use the regular CGI indenting, you can easily do +the following: + + $CGI::Pretty::INDENT = $CGI::Pretty::LINEBREAK = ""; + =head1 BUGS This section intentionally left blank. =head1 AUTHOR -Brian Paulsen , with minor modifications by +Brian Paulsen , with minor modifications by Lincoln Stein for incorporation into the CGI.pm distribution. -Copyright 1998, Brian Paulsen. All rights reserved. +Copyright 1999, Brian Paulsen. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. -Bug reports and comments to bpaulsen@lehman.com. You can also write +Bug reports and comments to Brian@ThePaulsens.com. You can also write to lstein@cshl.org, but this code looks pretty hairy to me and I'm not sure I understand it! @@ -172,4 +234,3 @@ sure I understand it! L =cut - diff --git a/lib/CGI/Switch.pm b/lib/CGI/Switch.pm index 8afc6a6..b16b9c0 100644 --- a/lib/CGI/Switch.pm +++ b/lib/CGI/Switch.pm @@ -1,71 +1,24 @@ -package CGI::Switch; -use Carp; -use strict; -use vars qw($VERSION @Pref); -$VERSION = '0.06'; -@Pref = qw(CGI::Apache CGI); #default - -sub import { - my($self,@arg) = @_; - @Pref = @arg if @arg; -} - -sub new { - shift; - my($file,$pack); - for $pack (@Pref) { - ($file = $pack) =~ s|::|/|g; - eval { require "$file.pm"; }; - if ($@) { -#XXX warn $@; - next; - } else { -#XXX warn "Going to try $pack\->new\n"; - my $obj; - eval {$obj = $pack->new(@_)}; - if ($@) { -#XXX warn $@; - } else { - return $obj; - } - } - } - Carp::croak "Couldn't load+construct any of @Pref\n"; -} - +use CGI; 1; + __END__ =head1 NAME -CGI::Switch - Try more than one constructors and return the first object available +CGI::Switch - Backward compatibility module for defunct CGI::Switch =head1 SYNOPSIS - - use CGISwitch; - - -or- +Do not use this module. It is deprecated. - use CGI::Switch This, That, CGI::XA, Foo, Bar, CGI; - - my $q = new CGI::Switch; +=head1 ABSTRACT =head1 DESCRIPTION -Per default the new() method tries to call new() in the three packages -Apache::CGI, CGI::XA, and CGI. It returns the first CGI object it -succeeds with. +=head1 AUTHOR INFORMATION -The import method allows you to set up the default order of the -modules to be tested. +=head1 BUGS =head1 SEE ALSO -perl(1), Apache(3), CGI(3), CGI::XA(3) - -=head1 AUTHOR - -Andreas KEnig Ea.koenig@mind.deE - =cut diff --git a/lib/CPAN.pm b/lib/CPAN.pm index 2f22b77..bbebf6f 100644 --- a/lib/CPAN.pm +++ b/lib/CPAN.pm @@ -6,13 +6,13 @@ use vars qw{$Try_autoload $Frontend $Defaultsite }; #}; -$VERSION = '1.50'; +$VERSION = '1.52'; -# $Id: CPAN.pm,v 1.264 1999/05/23 14:26:49 k Exp $ +# $Id: CPAN.pm,v 1.276 2000/01/08 15:29:46 k Exp $ # only used during development: $Revision = ""; -# $Revision = "[".substr(q$Revision: 1.264 $, 10)."]"; +# $Revision = "[".substr(q$Revision: 1.276 $, 10)."]"; use Carp (); use Config (); @@ -61,7 +61,7 @@ use strict qw(vars); @CPAN::ISA = qw(CPAN::Debug Exporter); @EXPORT = qw( - autobundle bundle expand force get + autobundle bundle expand force get cvs_import install make readme recompile shell test clean ); @@ -90,7 +90,7 @@ sub AUTOLOAD { #-> sub CPAN::shell ; sub shell { my($self) = @_; - $Suppress_readline ||= ! -t STDIN; + $Suppress_readline = ! -t STDIN unless defined $Suppress_readline; CPAN::Config->load unless $CPAN::Config_loaded++; my $prompt = "cpan> "; @@ -113,6 +113,12 @@ sub shell { $readline::rl_completion_function = $readline::rl_completion_function = 'CPAN::Complete::cpl'; } + # $term->OUT is autoflushed anyway + my $odef = select STDERR; + $| = 1; + select STDOUT; + $| = 1; + select $odef; } no strict; @@ -120,7 +126,8 @@ sub shell { my $getcwd; $getcwd = $CPAN::Config->{'getcwd'} || 'cwd'; my $cwd = CPAN->$getcwd(); - my $try_detect_readline = $term->ReadLine eq "Term::ReadLine::Stub"; + my $try_detect_readline; + $try_detect_readline = $term->ReadLine eq "Term::ReadLine::Stub" if $term; my $rl_avail = $Suppress_readline ? "suppressed" : ($term->ReadLine ne "Term::ReadLine::Stub") ? "enabled" : "available (try ``install Bundle::CPAN'')"; @@ -190,7 +197,8 @@ ReadLine support $rl_avail my $redef; local($SIG{__WARN__}) = CPAN::Shell::dotdot_onreload(\$redef); require Term::ReadLine; - $CPAN::Frontend->myprint("\n$redef subroutines in Term::ReadLine redefined\n"); + $CPAN::Frontend->myprint("\n$redef subroutines in ". + "Term::ReadLine redefined\n"); goto &shell; } } @@ -575,7 +583,7 @@ Please make sure the directory exists and is writable. } my $fh; unless ($fh = FileHandle->new(">$lockfile")) { - if ($! =~ /Permission/ || $!{EACCES}) { + if ($! =~ /Permission/) { my $incc = $INC{'CPAN/Config.pm'}; my $myincc = MM->catfile($ENV{HOME},'.cpan','CPAN','MyConfig.pm'); $CPAN::Frontend->myprint(qq{ @@ -613,6 +621,27 @@ or print "Caught SIGINT\n"; $Signal++; }; + +# From: Larry Wall +# Subject: Re: deprecating SIGDIE +# To: perl5-porters@perl.org +# Date: Thu, 30 Sep 1999 14:58:40 -0700 (PDT) +# +# The original intent of __DIE__ was only to allow you to substitute one +# kind of death for another on an application-wide basis without respect +# to whether you were in an eval or not. As a global backstop, it should +# not be used any more lightly (or any more heavily :-) than class +# UNIVERSAL. Any attempt to build a general exception model on it should +# be politely squashed. Any bug that causes every eval {} to have to be +# modified should be not so politely squashed. +# +# Those are my current opinions. It is also my optinion that polite +# arguments degenerate to personal arguments far too frequently, and that +# when they do, it's because both people wanted it to, or at least didn't +# sufficiently want it not to. +# +# Larry + $SIG{'__DIE__'} = \&cleanup; $self->debug("Signal handler set.") if $CPAN::DEBUG; } @@ -817,7 +846,7 @@ sub disk_usage { if ($^O eq 'MacOS') { require Mac::Files; my $cat = Mac::Files::FSpGetCatInfo($_); - $Du += $cat->ioFlLgLen() + $cat->ioFlRLgLen(); + $Du += $cat->ioFlLgLen() + $cat->ioFlRLgLen() if $cat; } else { $Du += (-s _); } @@ -1136,7 +1165,8 @@ Known options: commit commit session changes to disk init go through a dialog to set all parameters -You may edit key values in the follow fashion: +You may edit key values in the follow fashion (the "o" is a literal +letter o): o conf build_cache 15 @@ -1182,29 +1212,29 @@ sub h { $CPAN::Frontend->myprint("Detailed help not yet implemented\n"); } else { $CPAN::Frontend->myprint(q{ -command arguments description -a string authors -b or display bundles -d /regex/ info distributions -m or about modules -i none anything of above - -r as reinstall recommendations -u above uninstalled distributions -See manpage for autobundle, recompile, force, look, etc. - -make make -test modules, make test (implies make) -install dists, bundles, make install (implies test) -clean "r" or "u" make clean -readme display the README file - -reload index|cpan load most recent indices/CPAN.pm -h or ? display this menu -o various set and query options -! perl-code eval a perl command -q quit the shell subroutine -}); +Display Information + a authors + b string display bundles + d or info distributions + m /regex/ about modules + i or anything of above + r none reinstall recommendations + u uninstalled distributions + +Download, Test, Make, Install... + get download + make make (implies get) + test modules, make test (implies make) + install dists, bundles make install (implies test) + clean make clean + look open subshell in these dists' directories + readme display these dists' README files + +Other + h,? display this menu ! perl-code eval a perl command + o conf [opt] set and query options q quit the cpan shell + reload cpan load CPAN.pm again reload index load newer indices + autobundle Snapshot force cmd unconditionally do cmd}); } } @@ -1326,10 +1356,13 @@ sub o { } } } else { - $CPAN::Frontend->myprint("Valid options for debug are ". - join(", ",sort(keys %CPAN::DEBUG), 'all'). - qq{ or a number. Completion works on the options. }. - qq{Case is ignored.\n\n}); + my $raw = "Valid options for debug are ". + join(", ",sort(keys %CPAN::DEBUG), 'all'). + qq{ or a number. Completion works on the options. }. + qq{Case is ignored.}; + require Text::Wrap; + $CPAN::Frontend->myprint(Text::Wrap::fill("","",$raw)); + $CPAN::Frontend->myprint("\n\n"); } if ($CPAN::DEBUG) { $CPAN::Frontend->myprint("Options set for debugging:\n"); @@ -1595,21 +1628,34 @@ sub expand { my $class = "CPAN::$type"; my $obj; if (defined $regex) { - for $obj ( sort {$a->id cmp $b->id} $CPAN::META->all_objects($class)) { - push @m, $obj - if - $obj->id =~ /$regex/i - or + for $obj ( + sort + {$a->id cmp $b->id} + $CPAN::META->all_objects($class) + ) { + unless ($obj->id){ + # BUG, we got an empty object somewhere + CPAN->debug(sprintf( + "Empty id on obj[%s]%%[%s]", + $obj, + join(":", %$obj) + )) if $CPAN::DEBUG; + next; + } + push @m, $obj + if $obj->id =~ /$regex/i + or ( ( - $] < 5.00303 ### provide sort of compatibility with 5.003 + $] < 5.00303 ### provide sort of + ### compatibility with 5.003 || $obj->can('name') ) && $obj->name =~ /$regex/i ); - } + } } else { my($xarg) = $arg; if ( $type eq 'Bundle' ) { @@ -1703,6 +1749,15 @@ sub mydie { die "\n"; } +sub setup_output { + return if -t STDOUT; + my $odef = select STDERR; + $| = 1; + select STDOUT; + $| = 1; + select $odef; +} + #-> sub CPAN::Shell::rematein ; # RE-adme||MA-ke||TE-st||IN-stall sub rematein { @@ -1713,6 +1768,7 @@ sub rematein { $pragma = $meth; $meth = shift @some; } + setup_output(); CPAN->debug("pragma[$pragma]meth[$meth] some[@some]") if $CPAN::DEBUG; my($s,@s); foreach $s (@some) { @@ -1789,6 +1845,8 @@ sub install { shift->rematein('install',@_); } sub clean { shift->rematein('clean',@_); } #-> sub CPAN::Shell::look ; sub look { shift->rematein('look',@_); } +#-> sub CPAN::Shell::cvs_import ; +sub cvs_import { shift->rematein('cvs_import',@_); } package CPAN::FTP; @@ -1965,6 +2023,9 @@ sub localize { my $ret = $self->$method(\@host_seq,$file,$aslocal); if ($ret) { $Themethod = $level; + my $now = time; + # utime $now, $now, $aslocal; # too bad, if we do that, we + # might alter a local mirror $self->debug("level[$level]") if $CPAN::DEBUG; return $ret; } else { @@ -2045,6 +2106,9 @@ sub hosteasy { my $res = $Ua->mirror($url, $aslocal); if ($res->is_success) { $Thesite = $i; + my $now = time; + utime $now, $now, $aslocal; # download time is more + # important than upload time return $aslocal; } elsif ($url !~ /\.gz$/) { my $gzurl = "$url.gz"; @@ -2119,8 +2183,8 @@ sub hosthard { HOSTHARD: for $i (@$host_seq) { my $url = $CPAN::Config->{urllist}[$i] || $CPAN::Defaultsite; unless ($self->is_reachable($url)) { - $CPAN::Frontend->myprint("Skipping $url (not reachable)\n"); - next; + $CPAN::Frontend->myprint("Skipping $url (not reachable)\n"); + next; } $url .= "/" unless substr($url,-1) eq "/"; $url .= $file; @@ -2130,90 +2194,107 @@ sub hosthard { # if ($url =~ m|^ftp://(.*?)/(.*)/(.*)|) { # to if ($url =~ m|^([^:]+)://(.*?)/(.*)/(.*)|) { - # proto not yet used - ($proto,$host,$dir,$getfile) = ($1,$2,$3,$4); + # proto not yet used + ($proto,$host,$dir,$getfile) = ($1,$2,$3,$4); } else { - next HOSTHARD; # who said, we could ftp anything except ftp? + next HOSTHARD; # who said, we could ftp anything except ftp? } + $self->debug("localizing funkyftpwise[$url]") if $CPAN::DEBUG; my($f,$funkyftp); for $f ('lynx','ncftpget','ncftp') { - next unless exists $CPAN::Config->{$f}; - $funkyftp = $CPAN::Config->{$f}; - next unless defined $funkyftp; - next if $funkyftp =~ /^\s*$/; - my($want_compressed); - my $aslocal_uncompressed; - ($aslocal_uncompressed = $aslocal) =~ s/\.gz//; - my($source_switch) = ""; - $source_switch = " -source" if $funkyftp =~ /\blynx$/; - $source_switch = " -c" if $funkyftp =~ /\bncftp$/; - $CPAN::Frontend->myprint( - qq[ + next unless exists $CPAN::Config->{$f}; + $funkyftp = $CPAN::Config->{$f}; + next unless defined $funkyftp; + next if $funkyftp =~ /^\s*$/; + my($want_compressed); + my $aslocal_uncompressed; + ($aslocal_uncompressed = $aslocal) =~ s/\.gz//; + my($source_switch) = ""; + if ($f eq "lynx"){ + $source_switch = " -source"; + } elsif ($f eq "ncftp"){ + $source_switch = " -c"; + } + my($chdir) = ""; + my($stdout_redir) = " > $aslocal_uncompressed"; + if ($f eq "ncftpget"){ + $chdir = "cd $aslocal_dir && "; + $stdout_redir = ""; + } + $CPAN::Frontend->myprint( + qq[ Trying with "$funkyftp$source_switch" to get $url ]); - my($system) = "$funkyftp$source_switch '$url' $devnull > ". - "$aslocal_uncompressed"; + my($system) = + "$chdir$funkyftp$source_switch '$url' $devnull$stdout_redir"; + $self->debug("system[$system]") if $CPAN::DEBUG; + my($wstatus); + if (($wstatus = system($system)) == 0 + && + ($f eq "lynx" ? + -s $aslocal_uncompressed # lynx returns 0 on my + # system even if it fails + : 1 + ) + ) { + if (-s $aslocal) { + # Looks good + } elsif ($aslocal_uncompressed ne $aslocal) { + # test gzip integrity + if ( + CPAN::Tarzip->gtest($aslocal_uncompressed) + ) { + rename $aslocal_uncompressed, $aslocal; + } else { + CPAN::Tarzip->gzip($aslocal_uncompressed, + "$aslocal_uncompressed.gz"); + } + } + $Thesite = $i; + return $aslocal; + } elsif ($url !~ /\.gz$/) { + unlink $aslocal_uncompressed if + -f $aslocal_uncompressed && -s _ == 0; + my $gz = "$aslocal.gz"; + my $gzurl = "$url.gz"; + $CPAN::Frontend->myprint( + qq[ +Trying with "$funkyftp$source_switch" to get + $url.gz +]); + my($system) = "$funkyftp$source_switch '$url.gz' $devnull > ". + "$aslocal_uncompressed.gz"; $self->debug("system[$system]") if $CPAN::DEBUG; my($wstatus); if (($wstatus = system($system)) == 0 && - -s $aslocal_uncompressed # lynx returns 0 on my - # system even if it fails + -s "$aslocal_uncompressed.gz" ) { - if ($aslocal_uncompressed ne $aslocal) { - # test gzip integrity - if ( - CPAN::Tarzip->gtest($aslocal_uncompressed) - ) { - rename $aslocal_uncompressed, $aslocal; - } else { - CPAN::Tarzip->gzip($aslocal_uncompressed, - "$aslocal_uncompressed.gz"); - } - } - $Thesite = $i; - return $aslocal; - } elsif ($url !~ /\.gz$/) { - unlink $aslocal_uncompressed if - -f $aslocal_uncompressed && -s _ == 0; - my $gz = "$aslocal.gz"; - my $gzurl = "$url.gz"; - $CPAN::Frontend->myprint( - qq[ -Trying with "$funkyftp$source_switch" to get - $url.gz -]); - my($system) = "$funkyftp$source_switch '$url.gz' $devnull > ". - "$aslocal_uncompressed.gz"; - $self->debug("system[$system]") if $CPAN::DEBUG; - my($wstatus); - if (($wstatus = system($system)) == 0 - && - -s "$aslocal_uncompressed.gz" - ) { - # test gzip integrity - if (CPAN::Tarzip->gtest("$aslocal_uncompressed.gz")) { - CPAN::Tarzip->gunzip("$aslocal_uncompressed.gz", - $aslocal); - } else { - rename $aslocal_uncompressed, $aslocal; - } - $Thesite = $i; - return $aslocal; + # test gzip integrity + if (CPAN::Tarzip->gtest("$aslocal_uncompressed.gz")) { + CPAN::Tarzip->gunzip("$aslocal_uncompressed.gz", + $aslocal); } else { - unlink "$aslocal_uncompressed.gz" if - -f "$aslocal_uncompressed.gz"; + rename $aslocal_uncompressed, $aslocal; } + $Thesite = $i; + return $aslocal; } else { - my $estatus = $wstatus >> 8; - my $size = -f $aslocal ? ", left\n$aslocal with size ".-s _ : ""; - $CPAN::Frontend->myprint(qq{ + unlink "$aslocal_uncompressed.gz" if + -f "$aslocal_uncompressed.gz"; + } + } else { + my $estatus = $wstatus >> 8; + my $size = -f $aslocal ? + ", left\n$aslocal with size ".-s _ : + "\nWarning: expected file [$aslocal] doesn't exist"; + $CPAN::Frontend->myprint(qq{ System call "$system" returned status $estatus (wstat $wstatus)$size }); - } + } } } } @@ -2241,12 +2322,12 @@ sub hosthardest { next; } my($host,$dir,$getfile) = ($1,$2,$3); - my($netrcfile,$fh); my $timestamp = 0; my($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime, $ctime,$blksize,$blocks) = stat($aslocal); $timestamp = $mtime ||= 0; my($netrc) = CPAN::FTP::netrc->new; + my($netrcfile) = $netrc->netrc; my($verbose) = $CPAN::DEBUG{'FTP'} & $CPAN::DEBUG ? " -v" : ""; my $targetfile = File::Basename::basename($aslocal); my(@dialog); @@ -2259,7 +2340,7 @@ sub hosthardest { "get $getfile $targetfile", "quit" ); - if (! $netrc->netrc) { + if (! $netrcfile) { CPAN->debug("No ~/.netrc file found") if $CPAN::DEBUG; } elsif ($netrc->hasdefault || $netrc->contains($host)) { CPAN->debug(sprintf("hasdef[%d]cont($host)[%d]", @@ -2496,10 +2577,10 @@ sub cpl { /^$word/, sort qw( ! a b d h i m o q r u autobundle clean - make test install force reload look + make test install force reload look cvs_import ) ); - } elsif ( $line !~ /^[\!abdhimorutl]/ ) { + } elsif ( $line !~ /^[\!abcdhimorutl]/ ) { @return = (); } elsif ($line =~ /^a\s/) { @return = cplx('CPAN::Author',$word); @@ -2507,7 +2588,7 @@ sub cpl { @return = cplx('CPAN::Bundle',$word); } elsif ($line =~ /^d\s/) { @return = cplx('CPAN::Distribution',$word); - } elsif ($line =~ /^([mru]|make|clean|test|install|readme|look)\s/ ) { + } elsif ($line =~ /^([mru]|make|clean|test|install|readme|look|cvs_import)\s/ ) { @return = (cplx('CPAN::Module',$word),cplx('CPAN::Bundle',$word)); } elsif ($line =~ /^i\s/) { @return = cpl_any($word); @@ -2589,6 +2670,11 @@ sub reload { } return if $last_time + $CPAN::Config->{index_expire}*86400 > $time and ! $force; + ## IFF we are developing, it helps to wipe out the memory between + ## reloads, otherwise it is not what a user expects. + + ## undef $CPAN::META; # Neue Gruendlichkeit since v1.52(r1.274) + ## $CPAN::META = CPAN->new; my($debug,$t2); $last_time = $time; @@ -2708,7 +2794,7 @@ sub rd_modpacks { my($mod,$version,$dist) = split; ### $version =~ s/^\+//; - # if it is a bundle, instatiate a bundle object + # if it is a bundle, instantiate a bundle object my($bundle,$id,$userid); if ($mod eq 'CPAN' && @@ -2721,6 +2807,7 @@ sub rd_modpacks { if ($version > $CPAN::VERSION){ $CPAN::Frontend->myprint(qq{ There\'s a new CPAN.pm version (v$version) available! + [Current version is v$CPAN::VERSION] You might want to try install Bundle::CPAN reload cpan @@ -2764,12 +2851,20 @@ sub rd_modpacks { } # instantiate a distribution object - unless ($CPAN::META->exists('CPAN::Distribution',$dist)) { - $CPAN::META->instance( - 'CPAN::Distribution' => $dist - )->set( - 'CPAN_USERID' => $userid - ); + if ($CPAN::META->exists('CPAN::Distribution',$dist)) { + # we do not need CONTAINSMODS unless we do something with + # this dist, so we better produce it on demand. + + ## my $obj = $CPAN::META->instance( + ## 'CPAN::Distribution' => $dist + ## ); + ## $obj->{CONTAINSMODS}{$mod} = undef; # experimental + } else { + $CPAN::META->instance( + 'CPAN::Distribution' => $dist + )->set( + 'CPAN_USERID' => $userid + ); } return if $CPAN::Signal; @@ -2862,9 +2957,15 @@ sub as_string { $extra .= ")"; } if (ref($self->{$_}) eq "ARRAY") { # language interface? XXX - push @m, sprintf " %-12s %s%s\n", $_, "@{$self->{$_}}", $extra; + push @m, sprintf " %-12s %s%s\n", $_, "@{$self->{$_}}", $extra; + } elsif (ref($self->{$_}) eq "HASH") { + push @m, sprintf( + " %-12s %s%s\n", + $_, + join(" ",keys %{$self->{$_}}), + $extra); } else { - push @m, sprintf " %-12s %s%s\n", $_, $self->{$_}, $extra; + push @m, sprintf " %-12s %s%s\n", $_, $self->{$_}, $extra; } } join "", @m, "\n"; @@ -2909,6 +3010,25 @@ sub email { shift->{'EMAIL'} } package CPAN::Distribution; +#-> sub CPAN::Distribution::as_string ; +sub as_string { + my $self = shift; + $self->containsmods; + $self->SUPER::as_string(@_); +} + +#-> sub CPAN::Distribution::containsmods ; +sub containsmods { + my $self = shift; + return if exists $self->{CONTAINSMODS}; + for my $mod ($CPAN::META->all_objects("CPAN::Module")) { + my $mod_file = $mod->{CPAN_FILE} or next; + my $dist_id = $self->{ID} or next; + my $mod_id = $mod->{ID} or next; + $self->{CONTAINSMODS}{$mod_id} = undef if $mod_file eq $dist_id; + } +} + #-> sub CPAN::Distribution::called_for ; sub called_for { my($self,$id) = @_; @@ -3114,6 +3234,44 @@ Please define it with "o conf shell " chdir($pwd); } +sub cvs_import { + my($self) = @_; + $self->get; + my $dir = $self->dir; + + my $package = $self->called_for; + my $module = $CPAN::META->instance('CPAN::Module', $package); + my $version = $module->cpan_version; + + my $userid = $self->{CPAN_USERID}; + + my $cvs_dir = (split '/', $dir)[-1]; + $cvs_dir =~ s/-\d+[^-]+$//; + my $cvs_root = + $CPAN::Config->{cvsroot} || $ENV{CVSROOT}; + my $cvs_site_perl = + $CPAN::Config->{cvs_site_perl} || $ENV{CVS_SITE_PERL}; + if ($cvs_site_perl) { + $cvs_dir = "$cvs_site_perl/$cvs_dir"; + } + my $cvs_log = qq{"imported $package $version sources"}; + $version =~ s/\./_/g; + my @cmd = ('cvs', '-d', $cvs_root, 'import', '-m', $cvs_log, + "$cvs_dir", $userid, "v$version"); + + my $getcwd; + $getcwd = $CPAN::Config->{'getcwd'} || 'cwd'; + my $pwd = CPAN->$getcwd(); + chdir($dir); + + $CPAN::Frontend->myprint(qq{Working directory is $dir\n}); + + $CPAN::Frontend->myprint(qq{@cmd\n}); + system(@cmd) == 0 or + $CPAN::Frontend->mydie("cvs import failed"); + chdir($pwd); +} + #-> sub CPAN::Distribution::readme ; sub readme { my($self) = @_; @@ -3325,8 +3483,7 @@ sub perl { $perl ||= $candidate if MM->maybe_command($candidate); unless ($perl) { my ($component,$perl_name); - DIST_PERLNAME: - foreach $perl_name ($^X, 'perl', 'perl5', "perl$Config::Config{version}") { + DIST_PERLNAME: foreach $perl_name ($^X, 'perl', 'perl5', "perl$]") { PATH_COMPONENT: foreach $component (MM->path(), $Config::Config{'binexp'}) { next unless defined($component) && $component; @@ -3706,13 +3863,14 @@ sub contains { my $fh = FileHandle->new; local $/ = "\n"; open($fh,$parsefile) or die "Could not open '$parsefile': $!"; - my $inpod = 0; + my $in_cont = 0; $self->debug("parsefile[$parsefile]") if $CPAN::DEBUG; while (<$fh>) { - $inpod = m/^=(?!head1\s+CONTENTS)/ ? 0 : - m/^=head1\s+CONTENTS/ ? 1 : $inpod; - next unless $inpod; + $in_cont = m/^=(?!head1\s+CONTENTS)/ ? 0 : + m/^=head1\s+CONTENTS/ ? 1 : $in_cont; + next unless $in_cont; next if /^=/; + s/\#.*//; next if /^\s+$/; chomp; push @result, (split " ", $_, 2)[0]; @@ -3758,7 +3916,7 @@ sub find_bundle_file { $what2 =~ s/:Bundle://; $what2 =~ tr|:|/|; } else { - $what2 =~ s|Bundle/||; + $what2 =~ s|Bundle[/\\]||; } my $bu; while (<$fh>) { @@ -3824,13 +3982,19 @@ explicitly a file $s. # recap with less noise if ( $meth eq "install") { if (%fail) { - $CPAN::Frontend->myprint(qq{\nBundle summary: }. - qq{The following items seem to }. - qq{have had installation problems:\n}); + require Text::Wrap; + my $raw = sprintf(qq{Bundle summary: +The following items in bundle %s had installation problems:}, + $self->id + ); + $CPAN::Frontend->myprint(Text::Wrap::fill("","",$raw)); + $CPAN::Frontend->myprint("\n"); + my $paragraph = ""; for $s ($self->contains) { - $CPAN::Frontend->myprint( "$s " ) if $fail{$s}; + $paragraph .= "$s " if $fail{$s}; } - $CPAN::Frontend->myprint(qq{\n}); + $CPAN::Frontend->myprint(Text::Wrap::fill(" "," ",$paragraph)); + $CPAN::Frontend->myprint("\n"); } else { $self->{'install'} = 'YES'; } @@ -4060,6 +4224,8 @@ sub rematein { sub readme { shift->rematein('readme') } #-> sub CPAN::Module::look ; sub look { shift->rematein('look') } +#-> sub CPAN::Module::cvs_import ; +sub cvs_import { shift->rematein('cvs_import') } #-> sub CPAN::Module::get ; sub get { shift->rematein('get',@_); } #-> sub CPAN::Module::make ; @@ -4140,7 +4306,7 @@ sub inst_version { local($^W) = 0 if $] < 5.00303 && $ExtUtils::MakeMaker::VERSION < 5.38; # warn "HERE"; my $have = MM->parse_version($parsefile) || "undef"; - $have =~ s/\s+//g; + $have =~ s/\s*//g; # stringify to float around floating point issues $have; } @@ -4251,7 +4417,7 @@ sub DESTROY { $gz->gzclose(); } else { my $fh = $self->{FH}; - $fh->close; + $fh->close if defined $fh; } undef $self; } @@ -4262,29 +4428,30 @@ sub untar { if (MM->maybe_command($CPAN::Config->{'gzip'}) && MM->maybe_command($CPAN::Config->{'tar'})) { - if ($^O =~ /win/i) { # irgggh - # people find the most curious tar binaries that cannot handle - # pipes - my $system = "$CPAN::Config->{'gzip'} --decompress $file"; - if (system($system)==0) { - $CPAN::Frontend->myprint(qq{Uncompressed $file successfully\n}); - } else { - $CPAN::Frontend->mydie( - qq{Couldn\'t uncompress $file\n} - ); - } - $file =~ s/\.gz$//; - $system = "$CPAN::Config->{tar} xvf $file"; - if (system($system)==0) { - $CPAN::Frontend->myprint(qq{Untarred $file successfully\n}); - } else { - $CPAN::Frontend->mydie(qq{Couldn\'t untar $file\n}); - } - return 1; + my $system = "$CPAN::Config->{'gzip'} --decompress --stdout " . + "< $file | $CPAN::Config->{tar} xvf -"; + if (system($system) != 0) { + # people find the most curious tar binaries that cannot handle + # pipes + my $system = "$CPAN::Config->{'gzip'} --decompress $file"; + if (system($system)==0) { + $CPAN::Frontend->myprint(qq{Uncompressed $file successfully\n}); + } else { + $CPAN::Frontend->mydie( + qq{Couldn\'t uncompress $file\n} + ); + } + $file =~ s/\.gz$//; + $system = "$CPAN::Config->{tar} xvf $file"; + $CPAN::Frontend->myprint(qq{Using Tar:$system:\n}); + if (system($system)==0) { + $CPAN::Frontend->myprint(qq{Untarred $file successfully\n}); + } else { + $CPAN::Frontend->mydie(qq{Couldn\'t untar $file\n}); + } + return 1; } else { - my $system = "$CPAN::Config->{'gzip'} --decompress --stdout " . - "< $file | $CPAN::Config->{tar} xvf -"; - return system($system) == 0; + return 1; } } elsif ($CPAN::META->has_inst("Archive::Tar") && @@ -4340,8 +4507,8 @@ Modules are fetched from one or more of the mirrored CPAN directory. The CPAN module also supports the concept of named and versioned -'bundles' of modules. Bundles simplify the handling of sets of -related modules. See BUNDLES below. +I of modules. Bundles simplify the handling of sets of +related modules. See Bundles below. The package contains a session manager and a cache manager. There is no status retained between sessions. The session manager keeps track @@ -4392,29 +4559,14 @@ objects. The parser recognizes a regular expression only if you enclose it between two slashes. The principle is that the number of found objects influences how an -item is displayed. If the search finds one item, the result is displayed -as object-Eas_string, but if we find more than one, we display -each as object-Eas_glimpse. E.g. - - cpan> a ANDK - Author id = ANDK - EMAIL a.koenig@franz.ww.TU-Berlin.DE - FULLNAME Andreas König - - - cpan> a /andk/ - Author id = ANDK - EMAIL a.koenig@franz.ww.TU-Berlin.DE - FULLNAME Andreas König - - - cpan> a /and.*rt/ - Author ANDYD (Andy Dougherty) - Author MERLYN (Randal L. Schwartz) +item is displayed. If the search finds one item, the result is +displayed with the rather verbose method C, but if we find +more than one, we display each object with the terse method +. =item make, test, install, clean modules or distributions -These commands take any number of arguments and investigates what is +These commands take any number of arguments and investigate what is necessary to perform the action. If the argument is a distribution file name (recognized by embedded slashes), it is processed. If it is a module, CPAN determines the distribution file in which this module @@ -4456,12 +4608,11 @@ A C command results in a being executed within the distribution file's working directory. -=item readme, look module or distribution +=item get, readme, look module or distribution -These two commands take only one argument, be it a module or a -distribution file. C unconditionally runs, displaying the -README of the associated distribution file. C gets and -untars (if not yet done) the distribution file, changes to the +C downloads a distribution file without further action. C +displays the README file of the associated distribution. C gets +and untars (if not yet done) the distribution file, changes to the appropriate directory and opens a subshell process in that directory. =item Signals @@ -4796,24 +4947,24 @@ shell with the command set defined within the C command: =over 2 -=item o conf Escalar optionE +=item Cscalar optionE> prints the current value of the I -=item o conf Escalar optionE EvalueE +=item Cscalar optionE EvalueE> Sets the value of the I to I -=item o conf Elist optionE +=item Clist optionE> prints the current value of the I in MakeMaker's neatvalue format. -=item o conf Elist optionE [shift|pop] +=item Clist optionE [shift|pop]> shifts or pops the array in the I variable -=item o conf Elist optionE [unshift|push|splice] ElistE +=item Clist optionE [unshift|push|splice] ElistE> works like the corresponding perl commands. @@ -4916,10 +5067,10 @@ ftp) you will need to use LWP. =item ftp firewall -This where the firewall machine runs a ftp server. This kind of firewall will -only let you access ftp serves outside the firewall. This is usually done by -connecting to the firewall with ftp, then entering a username like -"user@outside.host.com" +This where the firewall machine runs a ftp server. This kind of +firewall will only let you access ftp servers outside the firewall. +This is usually done by connecting to the firewall with ftp, then +entering a username like "user@outside.host.com" To access servers outside these type of firewalls with perl you will need to use Net::FTP. @@ -4971,7 +5122,7 @@ traditional method of building a Perl module package from a shell. =head1 AUTHOR -Andreas König Ea.koenig@kulturbox.deE +Andreas Koenig Eandreas.koenig@anima.deE =head1 SEE ALSO diff --git a/lib/CPAN/FirstTime.pm b/lib/CPAN/FirstTime.pm index 2899849..0e795da 100644 --- a/lib/CPAN/FirstTime.pm +++ b/lib/CPAN/FirstTime.pm @@ -16,7 +16,7 @@ use FileHandle (); use File::Basename (); use File::Path (); use vars qw($VERSION); -$VERSION = substr q$Revision: 1.37 $, 10; +$VERSION = substr q$Revision: 1.38 $, 10; =head1 NAME @@ -360,17 +360,19 @@ sub conf_sites { require File::Copy; File::Copy::copy($m,$mby) or die "Could not update $mby: $!"; } + my $loopcount = 0; while () { if ( ! -f $mby ){ print qq{You have no $mby I\'m trying to fetch one }; $mby = CPAN::FTP->localize($m,$mby,3); - } elsif (-M $mby > 30 ) { - print qq{Your $mby is older than 30 days, + } elsif (-M $mby > 60 && $loopcount == 0) { + print qq{Your $mby is older than 60 days, I\'m trying to fetch one }; $mby = CPAN::FTP->localize($m,$mby,3); + $loopcount++; } elsif (-s $mby == 0) { print qq{You have an empty $mby, I\'m trying to fetch one diff --git a/lib/CPAN/Nox.pm b/lib/CPAN/Nox.pm index e9cb189..8b59ca0 100644 --- a/lib/CPAN/Nox.pm +++ b/lib/CPAN/Nox.pm @@ -1,7 +1,12 @@ package CPAN::Nox; +use strict; +use vars qw($VERSION @EXPORT); -BEGIN{$CPAN::Suppress_readline=1 unless defined $CPAN::term;} +BEGIN{ + $CPAN::Suppress_readline=1 unless defined $CPAN::term; +} +use base 'Exporter'; use CPAN; $VERSION = "1.00"; @@ -12,6 +17,8 @@ $CPAN::META->has_inst('Compress::Zlib','no'); *AUTOLOAD = \&CPAN::AUTOLOAD; +__END__ + =head1 NAME CPAN::Nox - Wrapper around CPAN.pm without using any XS module diff --git a/lib/Carp/Heavy.pm b/lib/Carp/Heavy.pm index 161e7fb..553a0ed 100644 --- a/lib/Carp/Heavy.pm +++ b/lib/Carp/Heavy.pm @@ -87,7 +87,7 @@ sub longmess_heavy { # set args to the string "undef" if undefined $_ = "undef", next unless defined $_; if (ref $_) { - # dunno what this is for... + # force reference to string representation $_ .= ''; s/'/\\'/g; } @@ -128,6 +128,30 @@ sub longmess_heavy { } +# ancestors() returns the complete set of ancestors of a module + +sub ancestors($$); + +sub ancestors($$){ + my( $pack, $href ) = @_; + if( @{"${pack}::ISA"} ){ + my $risa = \@{"${pack}::ISA"}; + my %tree = (); + @tree{@$risa} = (); + foreach my $mod ( @$risa ){ + # visit ancestors - if not already in the gallery + if( ! defined( $$href{$mod} ) ){ + my @ancs = ancestors( $mod, $href ); + @tree{@ancs} = (); + } + } + return ( keys( %tree ) ); + } else { + return (); + } +} + + # shortmess() is called by carp() and croak() to skip all the way up to # the top-level caller's package and report the error from there. confess() # and cluck() generate a full stack trace so they call longmess() to @@ -140,6 +164,8 @@ sub shortmess_heavy { # Short-circuit &longmess if called via multiple packages my $error = join '', @_; my ($prevpack) = caller(1); my $extra = $CarpLevel; + + my @Clans = ( $prevpack ); my $i = 2; my ($pack,$file,$line); # when reporting an error, we want to report it from the context of the @@ -150,33 +176,45 @@ sub shortmess_heavy { # Short-circuit &longmess if called via multiple packages # track of all the packages to which the calling package belongs. We # do this by examining its @ISA variable. Any call from a base class # method (one of our caller's @ISA packages) can be ignored - my %isa = ($prevpack,1); + my %isa; - # merge all the caller's @ISA packages into %isa. - @isa{@{"${prevpack}::ISA"}} = () - if(@{"${prevpack}::ISA"}); + # merge all the caller's @ISA packages and ancestors into %isa. + my @pars = ancestors( $prevpack, \%isa ); + @isa{@pars} = () if @pars; + $isa{$prevpack} = 1; # now we crawl up the calling stack and look at all the packages in # there. For each package, we look to see if it has an @ISA and then # we see if our caller features in that list. That would imply that # our caller is a derived class of that package and its calls can also # be ignored +CALLER: while (($pack,$file,$line) = caller($i++)) { - if(@{$pack . "::ISA"}) { - my @i = @{$pack . "::ISA"}; - my %i; - @i{@i} = (); - # merge any relevant packages into %isa - @isa{@i,$pack} = () - if(exists $i{$prevpack} || exists $isa{$pack}); - } - # and here's where we do the ignoring... if the package in - # question is one of our caller's base or derived packages then - # we can ignore it (skip it) and go onto the next (but note that - # the continue { } block below gets called every time) - next - if(exists $isa{$pack}); + # Chances are, the caller's caller (or its caller...) is already + # in the gallery - if so, ignore this caller. + next if exists( $isa{$pack} ); + + # no: collect this module's ancestors. + my @i = ancestors( $pack, \%isa ); + my %i; + if( @i ){ + @i{@i} = (); + # check whether our representative of one of the clans is + # in this family tree. + foreach my $cl (@Clans){ + if( exists( $i{$cl} ) ){ + # yes: merge all of the family tree into %isa + @isa{@i,$pack} = (); + # and here's where we do some more ignoring... + # if the package in question is one of our caller's + # base or derived packages then we can ignore it (skip it) + # and go onto the next. + next CALLER if exists( $isa{$pack} ); + last; + } + } + } # Hey! We've found a package that isn't one of our caller's # clan....but wait, $extra refers to the number of 'extra' levels @@ -184,9 +222,8 @@ sub shortmess_heavy { # Short-circuit &longmess if called via multiple packages # We must merge the package into the %isa hash (so we can ignore it # if it pops up again), decrement $extra, and continue. if ($extra-- > 0) { - %isa = ($pack,1); - @isa{@{$pack . "::ISA"}} = () - if(@{$pack . "::ISA"}); + push( @Clans, $pack ); + @isa{@i,$pack} = (); } else { # OK! We've got a candidate package. Time to construct the @@ -204,9 +241,6 @@ sub shortmess_heavy { # Short-circuit &longmess if called via multiple packages return $msg; } } - continue { - $prevpack = $pack; - } # uh-oh! It looks like we crawled all the way up the stack and # never found a candidate package. Oh well, let's call longmess diff --git a/lib/Class/Struct.pm b/lib/Class/Struct.pm index 3e08e80..b4f2117 100644 --- a/lib/Class/Struct.pm +++ b/lib/Class/Struct.pm @@ -2,10 +2,10 @@ package Class::Struct; ## See POD after __END__ -require 5.002; +use 5.005_64; use strict; -use vars qw(@ISA @EXPORT $VERSION); +our(@ISA, @EXPORT, $VERSION); use Carp; @@ -355,7 +355,7 @@ The element is an array, initialized by default to C<()>. With no argument, the accessor returns a reference to the element's whole array (whether or not the element was -specified as C<'@'> or C<'*@'). +specified as C<'@'> or C<'*@'>). With one or two arguments, the first argument is an index specifying one element of the array; the second argument, if @@ -370,7 +370,7 @@ The element is a hash, initialized by default to C<()>. With no argument, the accessor returns a reference to the element's whole hash (whether or not the element was -specified as C<'%'> or C<'*%'). +specified as C<'%'> or C<'*%'>). With one or two arguments, the first argument is a key specifying one element of the hash; the second argument, if present, is @@ -520,6 +520,7 @@ struct's constructor. print "(which was a ", $cat->breed->name, ")\n"; print "had two kittens: ", join(' and ', @{$cat->kittens}), "\n"; +=back =head1 Author and Modification History diff --git a/lib/Cwd.pm b/lib/Cwd.pm index ee1bc28..e3c4590 100644 --- a/lib/Cwd.pm +++ b/lib/Cwd.pm @@ -20,7 +20,7 @@ getcwd - get pathname of current working directory chdir "/tmp"; print $ENV{'PWD'}; - use Cwd 'abs_path'; + use Cwd 'abs_path'; # aka realpath() print abs_path($ENV{'PWD'}); use Cwd 'fast_abs_path'; @@ -32,8 +32,11 @@ The getcwd() function re-implements the getcwd(3) (or getwd(3)) functions in Perl. The abs_path() function takes a single argument and returns the -absolute pathname for that argument. It uses the same algorithm as -getcwd(). (actually getcwd() is abs_path(".")) +absolute pathname for that argument. It uses the same algorithm +as getcwd(). (Actually, getcwd() is abs_path(".")) Symbolic links +and relative-path components ("." and "..") are resolved to return +the canonical pathname, just like realpath(3). Also callable as +realpath(). The fastcwd() function looks the same as getcwd(), but runs faster. It's also more dangerous because it might conceivably chdir() you out @@ -67,12 +70,12 @@ kept up to date if all packages which use chdir import it from Cwd. use Carp; -$VERSION = '2.01'; +$VERSION = '2.02'; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(cwd getcwd fastcwd fastgetcwd); -@EXPORT_OK = qw(chdir abs_path fast_abs_path); +@EXPORT_OK = qw(chdir abs_path fast_abs_path realpath fast_realpath); # The 'natural and safe form' for UNIX (pwd may be setuid root) @@ -257,6 +260,10 @@ sub abs_path $cwd; } +# added function alias for those of us more +# used to the libc function. --tchrist 27-Jan-00 +*realpath = \&abs_path; + sub fast_abs_path { my $cwd = getcwd(); my $path = shift || '.'; @@ -266,6 +273,10 @@ sub fast_abs_path { $realpath; } +# added function alias to follow principle of least surprise +# based on previous aliasing. --tchrist 27-Jan-00 +*fast_realpath = \&fast_abs_path; + # --- PORTING SECTION --- @@ -331,7 +342,7 @@ sub _qnx_abs_path { } { - local $^W = 0; # assignments trigger 'subroutine redefined' warning + no warnings; # assignments trigger 'subroutine redefined' warning if ($^O eq 'VMS') { *cwd = \&_vms_cwd; diff --git a/lib/Dumpvalue.pm b/lib/Dumpvalue.pm index 18a40ee..94b6aa6 100644 --- a/lib/Dumpvalue.pm +++ b/lib/Dumpvalue.pm @@ -1,7 +1,7 @@ -require 5.005; # For (defined ref) and $#$v +use 5.005_64; # for (defined ref) and $#$v and our package Dumpvalue; use strict; -use vars qw(%address *stab %subs); +our(%address, $stab, @stab, %stab, %subs); # translate control chars to ^X - Randal Schwartz # Modifications to print types by Peter Gordon v1.0 @@ -347,16 +347,30 @@ sub dumpglob { } } +sub CvGV_name { + my $self = shift; + my $in = shift; + return if $self->{skipCvGV}; # Backdoor to avoid problems if XS broken... + $in = \&$in; # Hard reference... + eval {require Devel::Peek; 1} or return; + my $gv = Devel::Peek::CvGV($in) or return; + *$gv{PACKAGE} . '::' . *$gv{NAME}; +} + sub dumpsub { my $self = shift; my ($off,$sub) = @_; + my $ini = $sub; + my $s; $sub = $1 if $sub =~ /^\{\*(.*)\}$/; - my $subref = \&$sub; - my $place = $DB::sub{$sub} || (($sub = $subs{"$subref"}) && $DB::sub{$sub}) - || ($self->{subdump} && ($sub = $self->findsubs("$subref")) - && $DB::sub{$sub}); + my $subref = defined $1 ? \&$sub : \&$ini; + my $place = $DB::sub{$sub} || (($s = $subs{"$subref"}) && $DB::sub{$s}) + || (($s = $self->CvGV_name($subref)) && $DB::sub{$s}) + || ($self->{subdump} && ($s = $self->findsubs("$subref")) + && $DB::sub{$s}); + $s = $sub unless defined $s; $place = '???' unless defined $place; - print( (' ' x $off) . "&$sub in $place\n" ); + print( (' ' x $off) . "&$s in $place\n" ); } sub findsubs { diff --git a/lib/English.pm b/lib/English.pm index 9f29a48..4e3210b 100644 --- a/lib/English.pm +++ b/lib/English.pm @@ -15,14 +15,6 @@ English - use nice English (or awk) names for ugly punctuation variables =head1 DESCRIPTION -You should I use this module in programs intended to be portable -among Perl versions, programs that must perform regular expression -matching operations efficiently, or libraries intended for use with -such programs. In a sense, this module is deprecated. The reasons -for this have to do with implementation details of the Perl -interpreter which are too thorny to go into here. Perhaps someday -they will be fixed to make "C" more practical. - This module provides aliases for the built-in variables whose names no one seems to like to read. Variables with side-effects which get triggered just by accessing them (like $0) will still @@ -35,9 +27,15 @@ $INPUT_RECORD_SEPARATOR if you are using the English module. See L for a complete list of these. +=head1 BUGS + +This module provokes sizeable inefficiencies for regular expressions, +due to unfortunate implementation details. If performance matters, +consider avoiding English. + =cut -local $^W = 0; +no warnings; # Grandfather $NAME import sub import { @@ -89,6 +87,7 @@ sub import { *EGID *PROGRAM_NAME *PERL_VERSION + *PERL_VERSION_TUPLE *ACCUMULATOR *DEBUGGING *SYSTEM_FD_MAX @@ -167,6 +166,7 @@ sub import { # Internals. *PERL_VERSION = *] ; + *PERL_VERSION_TUPLE = *^V ; *ACCUMULATOR = *^A ; *COMPILING = *^C ; *DEBUGGING = *^D ; diff --git a/lib/ExtUtils/Command.pm b/lib/ExtUtils/Command.pm index e900e51..bccc76c 100644 --- a/lib/ExtUtils/Command.pm +++ b/lib/ExtUtils/Command.pm @@ -1,4 +1,6 @@ package ExtUtils::Command; + +use 5.005_64; use strict; # use AutoLoader; use Carp; @@ -7,7 +9,7 @@ use File::Compare; use File::Basename; use File::Path qw(rmtree); require Exporter; -use vars qw(@ISA @EXPORT $VERSION); +our(@ISA, @EXPORT, $VERSION); @ISA = qw(Exporter); @EXPORT = qw(cp rm_f rm_rf mv cat eqtime mkpath touch test_f); $VERSION = '1.01'; diff --git a/lib/ExtUtils/Install.pm b/lib/ExtUtils/Install.pm index d6b1375..3c183a3 100644 --- a/lib/ExtUtils/Install.pm +++ b/lib/ExtUtils/Install.pm @@ -1,12 +1,13 @@ package ExtUtils::Install; +use 5.005_64; +our(@ISA, @EXPORT, $VERSION); $VERSION = substr q$Revision: 1.28 $, 10; # $Date: 1998/01/25 07:08:24 $ use Exporter; use Carp (); use Config qw(%Config); -use vars qw(@ISA @EXPORT $VERSION); @ISA = ('Exporter'); @EXPORT = ('install','uninstall','pm_to_blib', 'install_default'); $Is_VMS = $^O eq 'VMS'; @@ -15,7 +16,7 @@ my $splitchar = $^O eq 'VMS' ? '|' : ($^O eq 'os2' || $^O eq 'dos') ? ';' : ':'; my @PERL_ENV_LIB = split $splitchar, defined $ENV{'PERL5LIB'} ? $ENV{'PERL5LIB'} : $ENV{'PERLLIB'} || ''; my $Inc_uninstall_warn_handler; -#use vars qw( @EXPORT @ISA $Is_VMS ); +#our(@EXPORT, @ISA, $Is_VMS); #use strict; sub forceunlink { diff --git a/lib/ExtUtils/Installed.pm b/lib/ExtUtils/Installed.pm index 41f3c9b..da4a653 100644 --- a/lib/ExtUtils/Installed.pm +++ b/lib/ExtUtils/Installed.pm @@ -1,4 +1,6 @@ package ExtUtils::Installed; + +use 5.005_64; use strict; use Carp qw(); use ExtUtils::Packlist; @@ -6,8 +8,7 @@ use ExtUtils::MakeMaker; use Config; use File::Find; use File::Basename; -use vars qw($VERSION); -$VERSION = '0.02'; +our $VERSION = '0.02'; sub _is_type($$$) { diff --git a/lib/ExtUtils/Liblist.pm b/lib/ExtUtils/Liblist.pm index b992ec0..c858236 100644 --- a/lib/ExtUtils/Liblist.pm +++ b/lib/ExtUtils/Liblist.pm @@ -1,8 +1,9 @@ package ExtUtils::Liblist; -use vars qw($VERSION); + +use 5.005_64; # Broken out of MakeMaker from version 4.11 -$VERSION = substr q$Revision: 1.25 $, 10; +our $VERSION = substr q$Revision: 1.25 $, 10; use Config; use Cwd 'cwd'; diff --git a/lib/ExtUtils/MM_Cygwin.pm b/lib/ExtUtils/MM_Cygwin.pm index 7a92290..a5ba410 100644 --- a/lib/ExtUtils/MM_Cygwin.pm +++ b/lib/ExtUtils/MM_Cygwin.pm @@ -24,7 +24,6 @@ sub cflags { / *= */ and $self->{$`} = $'; }; $self->{CCFLAGS} .= " -DUSEIMPORTLIB" if ($Config{useshrplib} eq 'true'); - $self->{CCFLAGS} .= " -DCYGWIN" unless ($self->{CCFLAGS} =~ /\-DCYGWIN/); return $self->{CFLAGS} = qq{ CCFLAGS = $self->{CCFLAGS} diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index f4329e1..c5cf706 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -2766,7 +2766,7 @@ sub parse_version { $_ }; \$$2 }; - local($^W) = 0; + no warnings; $result = eval($eval); warn "Could not eval '$eval' in $parsefile: $@" if $@; $result = "undef" unless defined $result; diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm index f3de323..5eccf78 100644 --- a/lib/ExtUtils/MM_VMS.pm +++ b/lib/ExtUtils/MM_VMS.pm @@ -13,7 +13,7 @@ require Exporter; use VMS::Filespec; use File::Basename; use File::Spec; -use vars qw($Revision @ISA); +our($Revision, @ISA); $Revision = '5.56 (27-Apr-1999)'; @ISA = qw( File::Spec ); diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm index 534f26d..e08c679 100644 --- a/lib/ExtUtils/MM_Win32.pm +++ b/lib/ExtUtils/MM_Win32.pm @@ -388,7 +388,6 @@ PM_TO_BLIB = }.join(" \\\n\t", %{$self->{PM}}).q{ sub path { - local $^W = 1; my($self) = @_; my $path = $ENV{'PATH'} || $ENV{'Path'} || $ENV{'path'}; my @path = split(';',$path); diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index 0426575..c4b7553 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -180,7 +180,6 @@ sub eval_in_x { sub full_setup { $Verbose ||= 0; - $^W=1; # package name for the classes into which the first object will be blessed $PACKNAME = "PACK000"; diff --git a/lib/ExtUtils/Manifest.pm b/lib/ExtUtils/Manifest.pm index 58c91bc..8bb3fc8 100644 --- a/lib/ExtUtils/Manifest.pm +++ b/lib/ExtUtils/Manifest.pm @@ -25,7 +25,7 @@ $MANIFEST = 'MANIFEST'; # Really cool fix from Ilya :) unless (defined $Config{d_link}) { - local $^W; + no warnings; *ln = \&cp; } diff --git a/lib/ExtUtils/Mksymlists.pm b/lib/ExtUtils/Mksymlists.pm index 9dcedbf..a0126cc 100644 --- a/lib/ExtUtils/Mksymlists.pm +++ b/lib/ExtUtils/Mksymlists.pm @@ -1,10 +1,12 @@ package ExtUtils::Mksymlists; + +use 5.005_64; use strict qw[ subs refs ]; # no strict 'vars'; # until filehandles are exempted use Carp; use Exporter; -use vars qw( @ISA @EXPORT $VERSION ); +our(@ISA, @EXPORT, $VERSION); @ISA = 'Exporter'; @EXPORT = '&Mksymlists'; $VERSION = substr q$Revision: 1.17 $, 10; diff --git a/lib/ExtUtils/Packlist.pm b/lib/ExtUtils/Packlist.pm index eeb0a5b..88ea206 100644 --- a/lib/ExtUtils/Packlist.pm +++ b/lib/ExtUtils/Packlist.pm @@ -1,8 +1,9 @@ package ExtUtils::Packlist; + +use 5.005_64; use strict; use Carp qw(); -use vars qw($VERSION); -$VERSION = '0.03'; +our $VERSION = '0.03'; # Used for generating filehandle globs. IO::File might not be available! my $fhname = "FH1"; diff --git a/lib/ExtUtils/xsubpp b/lib/ExtUtils/xsubpp index ff9b452..4fedd3b 100755 --- a/lib/ExtUtils/xsubpp +++ b/lib/ExtUtils/xsubpp @@ -995,7 +995,9 @@ while (fetch_para()) { %XsubAliases = %XsubAliasValues = %Interfaces = (); $DoSetMagic = 1; - @args = split(/\s*,\s*/, $orig_args); + my $temp_args = $orig_args; + $temp_args =~ s/\\\s*//g; + @args = split(/\s*,\s*/, $temp_args); if (defined($class)) { my $arg0 = ((defined($static) or $func_name eq 'new') ? "CLASS" : "THIS"); diff --git a/lib/Fatal.pm b/lib/Fatal.pm index d1d95af..5b832f6 100644 --- a/lib/Fatal.pm +++ b/lib/Fatal.pm @@ -1,8 +1,9 @@ package Fatal; +use 5.005_64; use Carp; use strict; -use vars qw( $AUTOLOAD $Debug $VERSION); +our($AUTOLOAD, $Debug, $VERSION); $VERSION = 1.02; @@ -115,7 +116,7 @@ EOS no strict 'refs'; # to avoid: Can't use string (...) as a symbol ref ... $code = eval("package $pkg; use Carp; $code"); die if $@; - local($^W) = 0; # to avoid: Subroutine foo redefined ... + no warnings; # to avoid: Subroutine foo redefined ... *{$sub} = $code; } } diff --git a/lib/File/Basename.pm b/lib/File/Basename.pm index d1c8666..da2caee 100644 --- a/lib/File/Basename.pm +++ b/lib/File/Basename.pm @@ -135,11 +135,11 @@ BEGIN { - +use 5.005_64; +our(@ISA, @EXPORT, $VERSION, $Fileparse_fstype, $Fileparse_igncase); require Exporter; @ISA = qw(Exporter); @EXPORT = qw(fileparse fileparse_set_fstype basename dirname); -use vars qw($VERSION $Fileparse_fstype $Fileparse_igncase); $VERSION = "2.6"; diff --git a/lib/File/Compare.pm b/lib/File/Compare.pm index dce78e2..8a8afac 100644 --- a/lib/File/Compare.pm +++ b/lib/File/Compare.pm @@ -1,7 +1,8 @@ package File::Compare; +use 5.005_64; use strict; -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $Too_Big *FROM *TO); +our($VERSION, @ISA, @EXPORT, @EXPORT_OK, $Too_Big); require Exporter; use Carp; @@ -115,6 +116,7 @@ sub compare { return -1; } +sub cmp; *cmp = \&compare; sub compare_text { diff --git a/lib/File/Copy.pm b/lib/File/Copy.pm index 8df54e5..8638bee 100644 --- a/lib/File/Copy.pm +++ b/lib/File/Copy.pm @@ -7,10 +7,14 @@ package File::Copy; +use 5.005_64; use strict; use Carp; -use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION $Too_Big - © &syscopy &cp &mv $Syscopy_is_copy); +our(@ISA, @EXPORT, @EXPORT_OK, $VERSION, $Too_Big, $Syscopy_is_copy); +sub copy; +sub syscopy; +sub cp; +sub mv; # Note that this module implements only *part* of the API defined by # the File/Copy.pm module of the File-Tools-2.0 package. However, that diff --git a/lib/File/Find.pm b/lib/File/Find.pm index c674b2c..42905de 100644 --- a/lib/File/Find.pm +++ b/lib/File/Find.pm @@ -1,5 +1,5 @@ package File::Find; -require 5.005; +use 5.005_64; require Exporter; require Cwd; @@ -53,12 +53,12 @@ If either I or I is in effect: =over 6 -=item +=item * It is guarantueed that an I has been called before the user's I function is called. This enables fast file checks involving S< _>. -=item +=item * There is a variable C<$File::Find::fullname> which holds the absolute pathname of the file with all symbolic links resolved @@ -270,7 +270,7 @@ sub Follow_SymLink($) { return $AbsName; } -use vars qw/ $dir $name $fullname $prune /; +our($dir, $name, $fullname, $prune); sub _find_dir_symlnk($$$); sub _find_dir($$$); @@ -309,6 +309,8 @@ sub _find_opt { $top_item =~ s|/$|| unless $top_item eq '/'; $Is_Dir= 0; + ($topdev,$topino,$topmode,$topnlink) = stat $top_item; + if ($follow) { if (substr($top_item,0,1) eq '/') { $abs_dir = $top_item; @@ -331,7 +333,6 @@ sub _find_opt { } else { # no follow $topdir = $top_item; - ($topdev,$topino,$topmode,$topnlink) = lstat $top_item; unless (defined $topnlink) { warn "Can't stat $top_item: $!\n"; next Proc_Top_Item; diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 634b2cd..59b72ba 100644 --- a/lib/File/Path.pm +++ b/lib/File/Path.pm @@ -91,16 +91,15 @@ Charles Bailey > =cut +use 5.005_64; use Carp; use File::Basename (); -use DirHandle (); use Exporter (); use strict; -use vars qw( $VERSION @ISA @EXPORT ); -$VERSION = "1.0402"; -@ISA = qw( Exporter ); -@EXPORT = qw( mkpath rmtree ); +our $VERSION = "1.0403"; +our @ISA = qw( Exporter ); +our @EXPORT = qw( mkpath rmtree ); my $Is_VMS = $^O eq 'VMS'; @@ -170,10 +169,14 @@ sub rmtree { or carp "Can't make directory $root read+writeable: $!" unless $safe; - my $d = DirHandle->new($root) - or carp "Can't read $root: $!"; - @files = $d->read; - $d->close; + if (opendir my $d, $root) { + @files = readdir $d; + closedir $d; + } + else { + carp "Can't read $root: $!"; + @files = (); + } # Deleting large numbers of files from VMS Files-11 filesystems # is faster if done in reverse ASCIIbetical order diff --git a/lib/File/Spec/VMS.pm b/lib/File/Spec/VMS.pm index 00c068a..7949146 100644 --- a/lib/File/Spec/VMS.pm +++ b/lib/File/Spec/VMS.pm @@ -22,6 +22,8 @@ See File::Spec::Unix for a documentation of the methods provided there. This package overrides the implementation of these methods, not the semantics. +=over + =item eliminate_macros Expands MM[KS]/Make macros in a text string, using the contents of @@ -111,6 +113,7 @@ sub fixpath { $fixedpath; } +=back =head2 Methods always loaded diff --git a/lib/File/Spec/Win32.pm b/lib/File/Spec/Win32.pm index 0ea4970..120b799 100644 --- a/lib/File/Spec/Win32.pm +++ b/lib/File/Spec/Win32.pm @@ -81,7 +81,6 @@ sub catfile { } sub path { - local $^W = 1; my $path = $ENV{'PATH'} || $ENV{'Path'} || $ENV{'path'}; my @path = split(';',$path); foreach (@path) { $_ = '.' if $_ eq '' } @@ -309,14 +308,18 @@ sub abs2rel { $path_directories = CORE::join( '\\', @pathchunks ); $base_directories = CORE::join( '\\', @basechunks ); - # $base now contains the directories the resulting relative path - # must ascend out of before it can descend to $path_directory. So, + # $base_directories now contains the directories the resulting relative + # path must ascend out of before it can descend to $path_directory. So, # replace all names with $parentDir - $base_directories =~ s|[^/]+|..|g ; + + #FA Need to replace between backslashes... + $base_directories =~ s|[^\\]+|..|g ; # Glue the two together, using a separator if necessary, and preventing an # empty result. - if ( $path ne '' && $base ne '' ) { + + #FA Must check that new directories are not empty. + if ( $path_directories ne '' && $base_directories ne '' ) { $path_directories = "$base_directories\\$path_directories" ; } else { $path_directories = "$base_directories$path_directories" ; diff --git a/lib/File/stat.pm b/lib/File/stat.pm index f5d17f7..0cf7a0b 100644 --- a/lib/File/stat.pm +++ b/lib/File/stat.pm @@ -1,9 +1,11 @@ package File::stat; use strict; +use 5.005_64; +our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); + BEGIN { use Exporter (); - use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS); @EXPORT = qw(stat lstat); @EXPORT_OK = qw( $st_dev $st_ino $st_mode $st_nlink $st_uid $st_gid @@ -13,7 +15,7 @@ BEGIN { ); %EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] ); } -use vars @EXPORT_OK; +use vars @EXPORT_OK; # Class::Struct forbids use of @ISA sub import { goto &Exporter::import } diff --git a/lib/FileHandle.pm b/lib/FileHandle.pm index eec9b61..34c3475 100644 --- a/lib/FileHandle.pm +++ b/lib/FileHandle.pm @@ -1,8 +1,8 @@ package FileHandle; -use 5.003_11; +use 5.005_64; use strict; -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); +our($VERSION, @ISA, @EXPORT, @EXPORT_OK); $VERSION = "2.00"; diff --git a/lib/Getopt/Std.pm b/lib/Getopt/Std.pm index e027bad..e5b369c 100644 --- a/lib/Getopt/Std.pm +++ b/lib/Getopt/Std.pm @@ -28,21 +28,25 @@ which take an argument don't care whether there is a space between the switch and the argument. Note that, if your code is running under the recommended C pragma, it may be helpful to declare these package variables -via C perhaps something like this: +'vars'> pragma, you will need to declare these package variables +with "our": - use vars qw/ $opt_foo $opt_bar /; + our($opt_foo, $opt_bar); -For those of you who don't like additional variables being created, getopt() +For those of you who don't like additional global variables being created, getopt() and getopts() will also accept a hash reference as an optional second argument. Hash keys will be x (where x is the switch name) with key values the value of the argument or 1 if no argument is specified. +To allow programs to process arguments that look like switches, but aren't, +both functions will stop processing switches when they see the argument +C<-->. The C<--> will be removed from @ARGV. + =cut @ISA = qw(Exporter); @EXPORT = qw(getopt getopts); -$VERSION = '1.01'; +$VERSION = '1.02'; # Process single-character switches with switch clustering. Pass one argument # which is a string containing all switches that take an argument. For each @@ -60,6 +64,10 @@ sub getopt ($;$) { while (@ARGV && ($_ = $ARGV[0]) =~ /^-(.)(.*)/) { ($first,$rest) = ($1,$2); + if (/^--$/) { # early exit if -- + shift @ARGV; + last; + } if (index($argumentative,$first) >= 0) { if ($rest ne '') { shift(@ARGV); @@ -68,22 +76,22 @@ sub getopt ($;$) { shift(@ARGV); $rest = shift(@ARGV); } - if (ref $hash) { - $$hash{$first} = $rest; - } - else { - ${"opt_$first"} = $rest; - push( @EXPORT, "\$opt_$first" ); - } + if (ref $hash) { + $$hash{$first} = $rest; + } + else { + ${"opt_$first"} = $rest; + push( @EXPORT, "\$opt_$first" ); + } } else { - if (ref $hash) { - $$hash{$first} = 1; - } - else { - ${"opt_$first"} = 1; - push( @EXPORT, "\$opt_$first" ); - } + if (ref $hash) { + $$hash{$first} = 1; + } + else { + ${"opt_$first"} = 1; + push( @EXPORT, "\$opt_$first" ); + } if ($rest ne '') { $ARGV[0] = "-$rest"; } @@ -111,31 +119,35 @@ sub getopts ($;$) { @args = split( / */, $argumentative ); while(@ARGV && ($_ = $ARGV[0]) =~ /^-(.)(.*)/) { ($first,$rest) = ($1,$2); + if (/^--$/) { # early exit if -- + shift @ARGV; + last; + } $pos = index($argumentative,$first); - if($pos >= 0) { - if(defined($args[$pos+1]) and ($args[$pos+1] eq ':')) { + if ($pos >= 0) { + if (defined($args[$pos+1]) and ($args[$pos+1] eq ':')) { shift(@ARGV); - if($rest eq '') { + if ($rest eq '') { ++$errs unless @ARGV; $rest = shift(@ARGV); } - if (ref $hash) { - $$hash{$first} = $rest; - } - else { - ${"opt_$first"} = $rest; - push( @EXPORT, "\$opt_$first" ); - } + if (ref $hash) { + $$hash{$first} = $rest; + } + else { + ${"opt_$first"} = $rest; + push( @EXPORT, "\$opt_$first" ); + } } else { - if (ref $hash) { - $$hash{$first} = 1; - } - else { - ${"opt_$first"} = 1; - push( @EXPORT, "\$opt_$first" ); - } - if($rest eq '') { + if (ref $hash) { + $$hash{$first} = 1; + } + else { + ${"opt_$first"} = 1; + push( @EXPORT, "\$opt_$first" ); + } + if ($rest eq '') { shift(@ARGV); } else { @@ -146,7 +158,7 @@ sub getopts ($;$) { else { warn "Unknown option: $first\n"; ++$errs; - if($rest ne '') { + if ($rest ne '') { $ARGV[0] = "-$rest"; } else { @@ -162,4 +174,3 @@ sub getopts ($;$) { } 1; - diff --git a/lib/Math/BigFloat.pm b/lib/Math/BigFloat.pm index 1a9195e..d8d643c 100644 --- a/lib/Math/BigFloat.pm +++ b/lib/Math/BigFloat.pm @@ -74,7 +74,7 @@ sub fnorm; sub fsqrt; sub fnorm { #(string) return fnum_str local($_) = @_; s/\s+//g; # strip white space - local $^W = 0; # $4 and $5 below might legitimately be undefined + no warnings; # $4 and $5 below might legitimately be undefined if (/^([+-]?)(\d*)(\.(\d*))?([Ee]([+-]?\d+))?$/ && "$2$4" ne '') { &norm(($1 ? "$1$2$4" : "+$2$4"),(($4 ne '') ? $6-length($4) : $6)); } else { diff --git a/lib/Math/Complex.pm b/lib/Math/Complex.pm index b339573..5b7ddb6 100644 --- a/lib/Math/Complex.pm +++ b/lib/Math/Complex.pm @@ -8,9 +8,10 @@ require Exporter; package Math::Complex; +use 5.005_64; use strict; -use vars qw($VERSION @ISA @EXPORT %EXPORT_TAGS); +our($VERSION, @ISA, @EXPORT, %EXPORT_TAGS); my ( $i, $ip2, %logn ); @@ -179,21 +180,21 @@ sub cplxe { # # The number defined as pi = 180 degrees # -use constant pi => 4 * CORE::atan2(1, 1); +sub pi () { 4 * CORE::atan2(1, 1) } # # pit2 # # The full circle # -use constant pit2 => 2 * pi; +sub pit2 () { 2 * pi } # # pip2 # # The quarter circle # -use constant pip2 => pi / 2; +sub pip2 () { pi / 2 } # # deg1 @@ -201,14 +202,14 @@ use constant pip2 => pi / 2; # One degree in radians, used in stringify_polar. # -use constant deg1 => pi / 180; +sub deg1 () { pi / 180 } # # uplog10 # # Used in log10(). # -use constant uplog10 => 1 / CORE::log(10); +sub uplog10 () { 1 / CORE::log(10) } # # i diff --git a/lib/Math/Trig.pm b/lib/Math/Trig.pm index c659137..68dcb94 100644 --- a/lib/Math/Trig.pm +++ b/lib/Math/Trig.pm @@ -7,13 +7,12 @@ require Exporter; package Math::Trig; +use 5.005_64; use strict; use Math::Complex qw(:trig); -use vars qw($VERSION $PACKAGE - @ISA - @EXPORT @EXPORT_OK %EXPORT_TAGS); +our($VERSION, $PACKAGE, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); @ISA = qw(Exporter); @@ -37,8 +36,8 @@ my @rdlcnv = qw(cartesian_to_cylindrical %EXPORT_TAGS = ('radial' => [ @rdlcnv ]); -use constant pi2 => 2 * pi; -use constant pip2 => pi / 2; +sub pi2 () { 2 * pi } # use constant generates warning +sub pip2 () { pi / 2 } # use constant generates warning use constant DR => pi2/360; use constant RD => 360/pi2; use constant DG => 400/360; diff --git a/lib/Net/Ping.pm b/lib/Net/Ping.pm index 5454060..0c8622e 100644 --- a/lib/Net/Ping.pm +++ b/lib/Net/Ping.pm @@ -10,12 +10,11 @@ package Net::Ping; # program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. -require 5.002; +use 5.005_64; require Exporter; use strict; -use vars qw(@ISA @EXPORT $VERSION - $def_timeout $def_proto $max_datasize); +our(@ISA, @EXPORT, $VERSION, $def_timeout, $def_proto, $max_datasize); use FileHandle; use Socket qw( SOCK_DGRAM SOCK_STREAM SOCK_RAW PF_INET inet_aton sockaddr_in ); diff --git a/lib/Net/hostent.pm b/lib/Net/hostent.pm index d586358..6cfde72 100644 --- a/lib/Net/hostent.pm +++ b/lib/Net/hostent.pm @@ -1,9 +1,10 @@ package Net::hostent; use strict; +use 5.005_64; +our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); BEGIN { use Exporter (); - use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS); @EXPORT = qw(gethostbyname gethostbyaddr gethost); @EXPORT_OK = qw( $h_name @h_aliases diff --git a/lib/Net/netent.pm b/lib/Net/netent.pm index fbc6d98..d8c094a 100644 --- a/lib/Net/netent.pm +++ b/lib/Net/netent.pm @@ -1,9 +1,10 @@ package Net::netent; use strict; +use 5.005_64; +our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); BEGIN { use Exporter (); - use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS); @EXPORT = qw(getnetbyname getnetbyaddr getnet); @EXPORT_OK = qw( $n_name @n_aliases diff --git a/lib/Net/protoent.pm b/lib/Net/protoent.pm index 737ff5a..334af78 100644 --- a/lib/Net/protoent.pm +++ b/lib/Net/protoent.pm @@ -1,9 +1,10 @@ package Net::protoent; use strict; +use 5.005_64; +our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); BEGIN { use Exporter (); - use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS); @EXPORT = qw(getprotobyname getprotobynumber getprotoent); @EXPORT_OK = qw( $p_name @p_aliases $p_proto ); %EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] ); diff --git a/lib/Net/servent.pm b/lib/Net/servent.pm index fb85dd0..c892af0 100644 --- a/lib/Net/servent.pm +++ b/lib/Net/servent.pm @@ -1,9 +1,10 @@ package Net::servent; use strict; +use 5.005_64; +our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); BEGIN { use Exporter (); - use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS); @EXPORT = qw(getservbyname getservbyport getservent getserv); @EXPORT_OK = qw( $s_name @s_aliases $s_port $s_proto ); %EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] ); diff --git a/lib/Pod/Checker.pm b/lib/Pod/Checker.pm index aa5c549..c661c75 100644 --- a/lib/Pod/Checker.pm +++ b/lib/Pod/Checker.pm @@ -10,9 +10,11 @@ package Pod::Checker; use vars qw($VERSION); -$VERSION = 1.090; ## Current version of this package +$VERSION = 1.096; ## Current version of this package require 5.004; ## requires this Perl version or later +use Pod::ParseUtils; ## for hyperlinks and lists + =head1 NAME Pod::Checker, podchecker() - check pod documents for syntax errors @@ -23,15 +25,19 @@ Pod::Checker, podchecker() - check pod documents for syntax errors $syntax_okay = podchecker($filepath, $outputpath, %options); + my $checker = new Pod::Checker %options; + =head1 OPTIONS/ARGUMENTS C<$filepath> is the input POD to read and C<$outputpath> is where to write POD syntax error messages. Either argument may be a scalar -indcating a file-path, or else a reference to an open filehandle. +indicating a file-path, or else a reference to an open filehandle. If unspecified, the input-file it defaults to C<\*STDIN>, and the output-file defaults to C<\*STDERR>. -=head2 Options +=head2 podchecker() + +This function can take a hash of options: =over 4 @@ -45,20 +51,25 @@ Turn warnings on/off. See L<"Warnings">. B will perform syntax checking of Perl5 POD format documentation. -I -As of this writing, all it does is check for unknown '=xxxx' commands, -unknown 'X<...>' interior-sequences, and unterminated interior sequences. +I It is hoped that curious/ambitious user will help flesh out and add the -additional features they wish to see in B and B. +additional features they wish to see in B and B +and verify that the checks are consistent with L. -The following additional checks are preformed: +The following checks are preformed: =over 4 =item * -Check for proper balancing of C<=begin> and C<=end>. +Unknown '=xxxx' commands, unknown 'X<...>' interior-sequences, +and unterminated interior sequences. + +=item * + +Check for proper balancing of C<=begin> and C<=end>. The contents of such +a block are generally ignored, i.e. no syntax checks are performed. =item * @@ -66,55 +77,156 @@ Check for proper nesting and balancing of C<=over>, C<=item> and C<=back>. =item * -Check for same nested interior-sequences (e.g. C...LE...E...E>). +Check for same nested interior-sequences (e.g. +C...LE...E...E>). =item * -Check for malformed entities. +Check for malformed or nonexisting entities C...E>. =item * -Check for correct syntax of hyperlinks CE>. See L for -details. +Check for correct syntax of hyperlinks C...E>. See L +for details. =item * -Check for unresolved document-internal links. +Check for unresolved document-internal links. This check may also reveal +misspelled links that seem to be internal links but should be links +to something else. =back -=head2 Warnings +=head2 Additional Features + +While checking, this module collects document properties, e.g. the nodes +for hyperlinks (C<=headX>, C<=item>). POD translators can use this feature +to syntax-check and get the nodes in a first pass before actually starting +to convert. This is expensive in terms of execution time, but allows for +very robust conversions. + +=head1 DIAGNOSTICS -The following warnings are printed. These may not necessarily cause trouble, -but indicate mediocre style. +=head2 Errors =over 4 -=item * +=item * =over on line I without closing =back -Spurious characters after C<=back> and C<=end>. +The C<=over> command does not have a corresponding C<=back> before the +next heading (C<=head1> or C<=head2>) or the end of the file. -=item * +=item * =item without previous =over -Unescaped C> and C> in the text. +=item * =back without previous =over -=item * +An C<=item> or C<=back> command has been found outside a +C<=over>/C<=back> block. -Missing arguments for C<=begin> and C<=over>. +=item * No argument for =begin -=item * +A C<=begin> command was found that is not followed by the formatter +specification. -Empty C<=over> / C<=back> list. +=item * =end without =begin -=item * +A standalone C<=end> command was found. + +=item * Nested =begin's + +There were at least two concecutive C<=begin> commands without +the corresponding C<=end>. Only one C<=begin> may be active at +a time. + +=item * =for without formatter specification -Hyperlinks: leading/trailing whitespace, brackets C<()> in the page name. +There is no specification of the formatter after the C<=for> command. + +=item * unresolved internal link I + +The given link to I does not have a matching node in the current +POD. This also happend when a single word node name is not enclosed in +C<"">. + +=item * Unknown command "I" + +An invalid POD command has been found. Valid are C<=head1>, C<=head2>, +C<=over>, C<=item>, C<=back>, C<=begin>, C<=end>, C<=for>, C<=pod>, +C<=cut> + +=item * Unknown interior-sequence "I" + +An invalid markup command has been encountered. Valid are: +CE>, CE>, CE>, CE>, +CE>, CE>, CE>, CE>, +CE> + +=item * nested commands IE...IE...E...E + +Two nested identical markup commands have been found. Generally this +does not make sense. + +=item * garbled entity I + +The I found cannot be interpreted as an character entity. + +=item * malformed link LEE + +The link found cannot be parsed because it does not conform to the +syntax described in L. =back -=head1 DIAGNOSTICS +=head2 Warnings -I<[T.B.D.]> +These may not necessarily cause trouble, but indicate mediocre style. + +=over 4 + +=item * No numeric argument for =over + +The C<=over> command is supposed to have a numeric argument (the +indentation). + +=item * Spurious character(s) after =back + +The C<=back> command does not take any arguments. + +=item * I unescaped CE> in paragraph + +Angle brackets not written as CltE> and CgtE> +can potentially cause errors as they could be misinterpreted as +markup commands. + +=item * Non-standard entity + +A character entity was found that does not belong to the standard +ISO set. + +=item * No items in =over + +The list does not contain any items. + +=item * No argument for =item + +C<=item> without any parameters is deprecated. It should either be followed +by C<*> to indicate an unordered list, by a number (optionally followed +by a dot) to indicate an ordered (numbered) list or simple text for a +definition list. + +=item * Verbatim paragraph in NAME section + +The NAME section (C<=head1 NAME>) should consist of a single paragraph +with the script/module name, followed by a dash `-' and a very short +description of what the thing is good for. + +=item * Hyperlinks + +There are some warnings wrt. hyperlinks: +Leading/trailing whitespace, newlines in hyperlinks, +brackets C<()>. + +=back =head1 RETURN VALUE @@ -174,6 +286,117 @@ my %VALID_SEQUENCES = ( 'E' => 1, ); +# stolen from HTML::Entities +my %ENTITIES = ( + # Some normal chars that have special meaning in SGML context + amp => '&', # ampersand +'gt' => '>', # greater than +'lt' => '<', # less than + quot => '"', # double quote + + # PUBLIC ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML + AElig => 'Æ', # capital AE diphthong (ligature) + Aacute => 'Á', # capital A, acute accent + Acirc => 'Â', # capital A, circumflex accent + Agrave => 'À', # capital A, grave accent + Aring => 'Å', # capital A, ring + Atilde => 'Ã', # capital A, tilde + Auml => 'Ä', # capital A, dieresis or umlaut mark + Ccedil => 'Ç', # capital C, cedilla + ETH => 'Ð', # capital Eth, Icelandic + Eacute => 'É', # capital E, acute accent + Ecirc => 'Ê', # capital E, circumflex accent + Egrave => 'È', # capital E, grave accent + Euml => 'Ë', # capital E, dieresis or umlaut mark + Iacute => 'Í', # capital I, acute accent + Icirc => 'Î', # capital I, circumflex accent + Igrave => 'Ì', # capital I, grave accent + Iuml => 'Ï', # capital I, dieresis or umlaut mark + Ntilde => 'Ñ', # capital N, tilde + Oacute => 'Ó', # capital O, acute accent + Ocirc => 'Ô', # capital O, circumflex accent + Ograve => 'Ò', # capital O, grave accent + Oslash => 'Ø', # capital O, slash + Otilde => 'Õ', # capital O, tilde + Ouml => 'Ö', # capital O, dieresis or umlaut mark + THORN => 'Þ', # capital THORN, Icelandic + Uacute => 'Ú', # capital U, acute accent + Ucirc => 'Û', # capital U, circumflex accent + Ugrave => 'Ù', # capital U, grave accent + Uuml => 'Ü', # capital U, dieresis or umlaut mark + Yacute => 'Ý', # capital Y, acute accent + aacute => 'á', # small a, acute accent + acirc => 'â', # small a, circumflex accent + aelig => 'æ', # small ae diphthong (ligature) + agrave => 'à', # small a, grave accent + aring => 'å', # small a, ring + atilde => 'ã', # small a, tilde + auml => 'ä', # small a, dieresis or umlaut mark + ccedil => 'ç', # small c, cedilla + eacute => 'é', # small e, acute accent + ecirc => 'ê', # small e, circumflex accent + egrave => 'è', # small e, grave accent + eth => 'ð', # small eth, Icelandic + euml => 'ë', # small e, dieresis or umlaut mark + iacute => 'í', # small i, acute accent + icirc => 'î', # small i, circumflex accent + igrave => 'ì', # small i, grave accent + iuml => 'ï', # small i, dieresis or umlaut mark + ntilde => 'ñ', # small n, tilde + oacute => 'ó', # small o, acute accent + ocirc => 'ô', # small o, circumflex accent + ograve => 'ò', # small o, grave accent + oslash => 'ø', # small o, slash + otilde => 'õ', # small o, tilde + ouml => 'ö', # small o, dieresis or umlaut mark + szlig => 'ß', # small sharp s, German (sz ligature) + thorn => 'þ', # small thorn, Icelandic + uacute => 'ú', # small u, acute accent + ucirc => 'û', # small u, circumflex accent + ugrave => 'ù', # small u, grave accent + uuml => 'ü', # small u, dieresis or umlaut mark + yacute => 'ý', # small y, acute accent + yuml => 'ÿ', # small y, dieresis or umlaut mark + + # Some extra Latin 1 chars that are listed in the HTML3.2 draft (21-May-96) + copy => '©', # copyright sign + reg => '®', # registered sign + nbsp => "\240", # non breaking space + + # Additional ISO-8859/1 entities listed in rfc1866 (section 14) + iexcl => '¡', + cent => '¢', + pound => '£', + curren => '¤', + yen => '¥', + brvbar => '¦', + sect => '§', + uml => '¨', + ordf => 'ª', + laquo => '«', +'not' => '¬', # not is a keyword in perl + shy => '­', + macr => '¯', + deg => '°', + plusmn => '±', + sup1 => '¹', + sup2 => '²', + sup3 => '³', + acute => '´', + micro => 'µ', + para => '¶', + middot => '·', + cedil => '¸', + ordm => 'º', + raquo => '»', + frac14 => '¼', + frac12 => '½', + frac34 => '¾', + iquest => '¿', +'times' => '×', # times is a keyword in perl + divide => '÷', +); + ##--------------------------------------------------------------------------- ##--------------------------------- @@ -219,16 +442,18 @@ sub initialize { ## Initialize number of errors, and setup an error function to ## increment this number and then print to the designated output. $self->{_NUM_ERRORS} = 0; - $self->errorsub('poderror'); + $self->errorsub('poderror'); # set the error handling subroutine $self->{_commands} = 0; # total number of POD commands encountered $self->{_list_stack} = []; # stack for nested lists $self->{_have_begin} = ''; # stores =begin $self->{_links} = []; # stack for internal hyperlinks $self->{_nodes} = []; # stack for =head/=item nodes + # print warnings? $self->{-warnings} = 1 unless(defined $self->{-warnings}); + $self->{_current_head1} = ''; # the current =head1 block } -## Invoked as $self->poderror( @args ), or $self->poderror( {%opts}, @args ) +# Invoked as $self->poderror( @args ), or $self->poderror( {%opts}, @args ) sub poderror { my $self = shift; my %opts = (ref $_[0]) ? %{shift()} : (); @@ -243,13 +468,43 @@ sub poderror { ++($self->{_NUM_ERRORS}) if(!%opts || ($opts{-severity} && $opts{-severity} eq 'ERROR')); my $out_fh = $self->output_handle(); - print $out_fh ($severity, $msg, $line, $file, "\n"); + print $out_fh ($severity, $msg, $line, $file, "\n") + if($self->{-warnings} || !%opts || $opts{-severity} ne 'WARNING'); } +# set/retrieve the number of errors found sub num_errors { return (@_ > 1) ? ($_[0]->{_NUM_ERRORS} = $_[1]) : $_[0]->{_NUM_ERRORS}; } +# set and/or retrieve canonical name of POD +sub name { + return (@_ > 1 && $_[1]) ? + ($_[0]->{-name} = $_[1]) : $_[0]->{-name}; +} + +# set/return nodes of the current POD +sub node { + my ($self,$text) = @_; + if(defined $text) { + $text =~ s/[\s\n]+$//; # strip trailing whitespace + # add node + push(@{$self->{_nodes}}, $text); + return $text; + } + @{$self->{_nodes}}; +} + +# set/return hyperlinks of the current POD +sub hyperlink { + my $self = shift; + if($_[0]) { + push(@{$self->{_links}}, $_[0]); + return $_[0]; + } + @{$self->{_links}}; +} + ## overrides for Pod::Parser sub end_pod { @@ -273,7 +528,6 @@ sub end_pod { # first build the node names from the paragraph text my %nodes; foreach($self->node()) { - #print "Have node: +$_+\n"; $nodes{$_} = 1; if(/^(\S+)\s+/) { # we have more than one word. Use the first as a node, too. @@ -282,7 +536,6 @@ sub end_pod { } } foreach($self->hyperlink()) { - #print "Seek node: +$_+\n"; my $line = ''; s/^(\d+):// && ($line = $1); if($_ && !$nodes{$_}) { @@ -307,6 +560,7 @@ sub end_pod { } } +# check a POD command directive sub command { my ($self, $cmd, $paragraph, $line_num, $pod_para) = @_; my ($file, $line) = $pod_para->file_line; @@ -320,32 +574,47 @@ sub command { $self->{_commands}++; # found a valid command ## check syntax of particular command if($cmd eq 'over') { + # check for argument + $arg = $self->interpolate_and_check($paragraph, $line,$file); + my $indent = 4; # default + if($arg && $arg =~ /^\s*(\d+)\s*$/) { + $indent = $1; + } else { + $self->poderror({ -line => $line, -file => $file, + -severity => 'WARNING', + -msg => "No numeric argument for =over"}); + } # start a new list - unshift(@{$self->{_list_stack}}, - Pod::List->new( - -indent => $paragraph, + unshift(@{$self->{_list_stack}}, Pod::List->new( + -indent => $indent, -start => $line, -file => $file)); } elsif($cmd eq 'item') { + # are we in a list? unless(@{$self->{_list_stack}}) { $self->poderror({ -line => $line, -file => $file, -severity => 'ERROR', -msg => "=item without previous =over" }); + # auto-open in case we encounter many more + unshift(@{$self->{_list_stack}}, + Pod::List->new( + -indent => 'auto', + -start => $line, + -file => $file)); } - else { - # check for argument - $arg = $self->_interpolate_and_check($paragraph, $line, $file); - unless($arg && $arg =~ /(\S+)/) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', - -msg => "No argument for =item" }); - } - # add this item - $self->{_list_stack}[0]->item($arg || ''); - # remember this node - $self->node($arg) if($arg); + # check for argument + $arg = $self->interpolate_and_check($paragraph, $line, $file); + unless($arg && $arg =~ /(\S+)/) { + $self->poderror({ -line => $line, -file => $file, + -severity => 'WARNING', + -msg => "No argument for =item" }); + $arg = ' '; # empty } + # add this item + $self->{_list_stack}[0]->item($arg); + # remember this node + $self->node($arg); } elsif($cmd eq 'back') { # check if we have an open list @@ -356,7 +625,7 @@ sub command { } else { # check for spurious characters - $arg = $self->_interpolate_and_check($paragraph, $line,$file); + $arg = $self->interpolate_and_check($paragraph, $line,$file); if($arg && $arg =~ /\S/) { $self->poderror({ -line => $line, -file => $file, -severity => 'WARNING', @@ -380,13 +649,19 @@ sub command { while($list = shift(@{$self->{_list_stack}})) { $self->poderror({ -line => $line, -file => $file, -severity => 'ERROR', - -msg => "unclosed =over (line ". $list->start() . - ") at $cmd" }); + -msg => "=over on line ". $list->start() . + " without closing =back (at $cmd)" }); } } # remember this node - $arg = $self->_interpolate_and_check($paragraph, $line,$file); + $arg = $self->interpolate_and_check($paragraph, $line,$file); $self->node($arg) if($arg); + if($cmd eq 'head1') { + $arg =~ s/[\s\n]+$//; + $self->{_current_head1} = $arg; + } else { + $self->{_current_head1} = ''; + } } elsif($cmd eq 'begin') { if($self->{_have_begin}) { @@ -398,10 +673,10 @@ sub command { } else { # check for argument - $arg = $self->_interpolate_and_check($paragraph, $line,$file); + $arg = $self->interpolate_and_check($paragraph, $line,$file); unless($arg && $arg =~ /(\S+)/) { $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', + -severity => 'ERROR', -msg => "No argument for =begin"}); } # remember the =begin @@ -413,27 +688,37 @@ sub command { # close the existing =begin $self->{_have_begin} = ''; # check for spurious characters - $arg = $self->_interpolate_and_check($paragraph, $line,$file); - if($arg && $arg =~ /\S/) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', - -msg => "Spurious character(s) after =end" }); - } + $arg = $self->interpolate_and_check($paragraph, $line,$file); + # the closing argument is optional + #if($arg && $arg =~ /\S/) { + # $self->poderror({ -line => $line, -file => $file, + # -severity => 'WARNING', + # -msg => "Spurious character(s) after =end" }); + #} } else { # don't have a matching =begin $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', + -severity => 'ERROR', -msg => "=end without =begin" }); } } - } + elsif($cmd eq 'for') { + unless($paragraph =~ /\s*(\S+)\s*/) { + $self->poderror({ -line => $line, -file => $file, + -severity => 'ERROR', + -msg => "=for without formatter specification" }); + } + $arg = ''; # do not expand paragraph below + } ## Check the interior sequences in the command-text - $self->_interpolate_and_check($paragraph, $line,$file) + $self->interpolate_and_check($paragraph, $line,$file) unless(defined $arg); + } } -sub _interpolate_and_check { +# process a block of some text +sub interpolate_and_check { my ($self, $paragraph, $line, $file) = @_; ## Check the interior sequences in the command-text # and return the text @@ -452,10 +737,11 @@ sub _check_ptree { my $count; # count the unescaped angle brackets my $i = $_; - if($count = $i =~ s/[<>]/$self->expand_unescaped_bracket($&)/ge) { + if($count = $i =~ tr/<>/<>/) { $self->poderror({ -line => $line, -file => $file, -severity => 'WARNING', - -msg => "$count unescaped <>" }); + -msg => "$count unescaped <> in paragraph" }) + if($self->{-warnings}); } $text .= $i; next; @@ -488,7 +774,21 @@ sub _check_ptree { -msg => "garbled entity " . $_->raw_text()}); next; } - $text .= $self->expand_entity($$contents[0]); + my $ent = $$contents[0]; + if($ent =~ /^\d+$/) { + # numeric entity + $text .= chr($ent); + } + elsif($ENTITIES{$ent}) { + # known ISO entity + $text .= $ENTITIES{$ent}; + } + else { + $self->poderror({ -line => $line, -file => $file, + -severity => 'WARNING', + -msg => "Non-standard entity " . $_->raw_text()}); + $text .= "E<$ent>"; + } } elsif($cmd eq 'L') { # try to parse the hyperlink @@ -496,7 +796,7 @@ sub _check_ptree { unless(defined $link) { $self->poderror({ -line => $line, -file => $file, -severity => 'ERROR', - -msg => "malformed link L<>: $@"}); + -msg => "malformed link " . $_->raw_text() ." : $@"}); next; } $link->line($line); # remember line @@ -511,13 +811,14 @@ sub _check_ptree { $text .= $self->_check_ptree($self->parse_text($link->text(), $line), $line, $file, "$nestlist$cmd"); my $node = ''; - $node = $self->_check_ptree($self->parse_text($link->node(), - $line), $line, $file, "$nestlist$cmd") - if($link->node()); - # store internal link + # remember internal link # _TODO_ what if there is a link to the page itself by the name, - # e.g. Tk::Pod : L - $self->hyperlink("$line:$node") if($node && !$link->page()); + # e.g. in Tk::Pod : L + if($link->node() && !$link->page() && $link->type() ne 'hyperlink') { + $node = $self->_check_ptree($self->parse_text($link->node(), + $line), $line, $file, "$nestlist$cmd"); + $self->hyperlink("$line:$node") if($node); + } } elsif($cmd =~ /[BCFIS]/) { # add the guts @@ -531,397 +832,35 @@ sub _check_ptree { $text; } -# default method - just return it -sub expand_unescaped_bracket { - my ($self,$bracket) = @_; - $bracket; -} - -# keep the entities -sub expand_entity { - my ($self,$entity) = @_; - "E<$entity>"; -} - -# _TODO_ overloadable methods for BC..Z<...> expansion +# _TODO_ overloadable methods for BC..Z<...> expansion? +# process a block of verbatim text sub verbatim { ## Nothing to check - ## my ($self, $paragraph, $line_num, $pod_para) = @_; + my ($self, $paragraph, $line_num, $pod_para) = @_; + if($self->{_current_head1} eq 'NAME') { + my ($file, $line) = $pod_para->file_line; + $self->poderror({ -line => $line, -file => $file, + -severity => 'WARNING', + -msg => 'Verbatim paragraph in NAME section' }); + } } +# process a block of regular text sub textblock { my ($self, $paragraph, $line_num, $pod_para) = @_; my ($file, $line) = $pod_para->file_line; - $self->_interpolate_and_check($paragraph, $line,$file); -} - -# set/return nodes of the current POD -sub node { - my ($self,$text) = @_; - if(defined $text) { - $text =~ s/[\s\n]+$//; # strip trailing whitespace - # add node - push(@{$self->{_nodes}}, $text); - return $text; - } - @{$self->{_nodes}}; -} - -# set/return hyperlinks of the current POD -sub hyperlink { - my $self = shift; - if($_[0]) { - push(@{$self->{_links}}, $_[0]); - return $_[0]; - } - @{$self->{_links}}; -} - -#----------------------------------------------------------------------------- -# Pod::List -# -# class to hold POD list info (=over, =item, =back) -#----------------------------------------------------------------------------- - -package Pod::List; - -use Carp; - -sub new { - my $this = shift; - my $class = ref($this) || $this; - my %params = @_; - my $self = {%params}; - bless $self, $class; - $self->initialize(); - return $self; -} - -sub initialize { - my $self = shift; - $self->{-file} ||= 'unknown'; - $self->{-start} ||= 'unknown'; - $self->{-indent} ||= 4; # perlpod: "should be the default" - $self->{_items} = []; -} - -# The POD file name the list appears in -sub file { - return (@_ > 1) ? ($_[0]->{-file} = $_[1]) : $_[0]->{-file}; -} - -# The line in the file the node appears -sub start { - return (@_ > 1) ? ($_[0]->{-start} = $_[1]) : $_[0]->{-start}; -} - -# indent level -sub indent { - return (@_ > 1) ? ($_[0]->{-indent} = $_[1]) : $_[0]->{-indent}; -} - -# The individual =items of this list -sub item { - my ($self,$item) = @_; - if(defined $item) { - push(@{$self->{_items}}, $item); - return $item; - } - else { - return @{$self->{_items}}; - } -} - -#----------------------------------------------------------------------------- -# Pod::Hyperlink -# -# class to hold hyperlinks (L<>) -#----------------------------------------------------------------------------- - -package Pod::Hyperlink; - -=head1 NAME - -Pod::Hyperlink - class for manipulation of POD hyperlinks - -=head1 SYNOPSIS - - my $link = Pod::Hyperlink->new('alternative text|page/"section in page"'); - -=head1 DESCRIPTION - -The B class is mainly designed to parse the contents of the -C...E> sequence, providing a simple interface for accessing the -different parts of a POD hyperlink. - -=head1 METHODS - -=over 4 - -=item new() - -The B method can either be passed a set of key/value pairs or a single -scalar value, namely the contents of a C...E> sequence. An object -of the class C is returned. The value C indicates a -failure, the error message is stored in C<$@>. - -=item parse() - -This method can be used to (re)parse a (new) hyperlink. The result is stored -in the current object. - -=item markup($on,$off,$pageon,$pageoff) - -The result of this method is a string the represents the textual value of the -link, but with included arbitrary markers that highlight the active portion -of the link. This will mainly be used by POD translators and saves the -effort of determining which words have to be highlighted. Examples: Depending -on the type of link, the following text will be returned, the C<*> represent -the places where the section/item specific on/off markers will be placed -(link to a specific node) and C<+> for the pageon/pageoff markers (link to the -top of the page). - - the +perl+ manpage - the *$|* entry in the +perlvar+ manpage - the section on *OPTIONS* in the +perldoc+ manpage - the section on *DESCRIPTION* elsewhere in this document - -This method is read-only. - -=item text() - -This method returns the textual representation of the hyperlink as above, -but without markers (read only). - -=item warning() - -After parsing, this method returns any warnings ecountered during the -parsing process. - -=item page() - -This method sets or returns the POD page this link points to. - -=item node() - -As above, but the destination node text of the link. - -=item type() - -The node type, either C

    or C. - -=item alttext() - -Sets or returns an alternative text specified in the link. -=item line(), file() - -Just simple slots for storing information about the line and the file -the link was incountered in. Has to be filled in manually. - -=back - -=head1 AUTHOR - -Marek Rouchal Emarek@saftsack.fs.uni-bayreuth.deE, borrowing -a lot of things from L and L. - -=cut - -use Carp; - -sub new { - my $this = shift; - my $class = ref($this) || $this; - my $self = +{}; - bless $self, $class; - $self->initialize(); - if(defined $_[0]) { - if(ref($_[0])) { - # called with a list of parameters - %$self = %{$_[0]}; - } - else { - # called with L<> contents - return undef unless($self->parse($_[0])); - } - } - return $self; -} - -sub initialize { - my $self = shift; - $self->{-line} ||= 'undef'; - $self->{-file} ||= 'undef'; - $self->{-page} ||= ''; - $self->{-node} ||= ''; - $self->{-alttext} ||= ''; - $self->{-type} ||= 'undef'; - $self->{_warnings} = []; - $self->_construct_text(); -} - -sub parse { - my $self = shift; - local($_) = $_[0]; - # syntax check the link and extract destination - my ($alttext,$page,$section,$item) = ('','','',''); - - # strip leading/trailing whitespace - if(s/^[\s\n]+//) { - $self->warning("ignoring leading whitespace in link"); - } - if(s/[\s\n]+$//) { - $self->warning("ignoring trailing whitespace in link"); - } - - # collapse newlines with whitespace - s/\s*\n\s*/ /g; - - # extract alternative text - if(s!^([^|/"\n]*)[|]!!) { - $alttext = $1; - } - # extract page - if(s!^([^|/"\s]*)(?=/|$)!!) { - $page = $1; - } - # extract section - if(s!^/?"([^"\n]+)"$!!) { # e.g. L - $section = $1; - } - # extact item - if(s!^/(.*)$!!) { - $item = $1; - } - # last chance here - if(s!^([^|"\s\n/][^"\n/]*)$!!) { # e.g. L - $section = $1; - } - # now there should be nothing left - if(length) { - _invalid_link("garbled entry (spurious characters `$_')"); - return undef; - } - elsif(!(length($page) || length($section) || length($item))) { - _invalid_link("empty link"); - return undef; - } - elsif($alttext =~ /[<>]/) { - _invalid_link("alternative text contains < or >"); - return undef; - } - else { # no errors so far - if($page =~ /[(]\d\w*[)]$/) { - $self->warning("brackets in `$page'"); - $page = $`; # strip that extension - } - if($page =~ /^(\s*)(\S+)(\s*)/ && (length($1) || length($3))) { - $self->warning("whitespace in `$page'"); - $page = $2; # strip that extension + # skip this paragraph if in a =begin block + unless($self->{_have_begin}) { + my $block = $self->interpolate_and_check($paragraph, $line,$file); + if($self->{_current_head1} eq 'NAME') { + if($block =~ /^\s*(\S+?)\s*[,-]/) { + # this is the canonical name + $self->{-name} = $1 unless(defined $self->{-name}); + } } } - $self->page($page); - $self->node($section || $item); # _TODO_ do not distinguish for now - $self->alttext($alttext); - $self->type($item ? 'item' : 'section'); - 1; -} - -sub _construct_text { - my $self = shift; - my $alttext = $self->alttext(); - my $type = $self->type(); - my $section = $self->node(); - my $page = $self->page(); - $self->{_text} = - $alttext ? $alttext : ( - !$section ? '' : - $type eq 'item' ? 'the ' . $section . ' entry' : - 'the section on ' . $section ) . - ($page ? ($section ? ' in ':''). 'the ' . $page . ' manpage' : - 'elsewhere in this document'); - # for being marked up later - $self->{_markup} = - $alttext ? '' . $alttext . '' : ( - !$section ? '' : - $type eq 'item' ? 'the ' . $section . ' entry' : - 'the section on ' . $section . '' ) . - ($page ? ($section ? ' in ':'') . 'the ' . - $page . ' manpage' : - ' elsewhere in this document'); -} - -# include markup -sub markup { - my ($self,$on,$off,$pageon,$pageoff) = @_; - $on ||= ''; - $off ||= ''; - $pageon ||= ''; - $pageoff ||= ''; - $_[0]->_construct_text; - my $str = $self->{_markup}; - $str =~ s//$on/; - $str =~ s//$off/; - $str =~ s//$pageon/; - $str =~ s//$pageoff/; - return $str; -} - -# The complete link's text -sub text { - $_[0]->_construct_text(); - $_[0]->{_text}; -} - -# The POD page the link appears on -sub warning { - my $self = shift; - if(@_) { - push(@{$self->{_warnings}}, @_); - return @_; - } - return @{$self->{_warnings}}; -} - -# The POD file name the link appears in -sub file { - return (@_ > 1) ? ($_[0]->{-file} = $_[1]) : $_[0]->{-file}; -} - -# The line in the file the link appears -sub line { - return (@_ > 1) ? ($_[0]->{-line} = $_[1]) : $_[0]->{-line}; -} - -# The POD page the link appears on -sub page { - return (@_ > 1) ? ($_[0]->{-page} = $_[1]) : $_[0]->{-page}; -} - -# The link destination -sub node { - return (@_ > 1) ? ($_[0]->{-node} = $_[1]) : $_[0]->{-node}; -} - -# Potential alternative text -sub alttext { - return (@_ > 1) ? ($_[0]->{-alttext} = $_[1]) : $_[0]->{-alttext}; -} - -# The type -sub type { - return (@_ > 1) ? ($_[0]->{-type} = $_[1]) : $_[0]->{-type}; -} - -sub _invalid_link { - my ($msg) = @_; - # this sets @_ - #eval { die "$msg\n" }; - #chomp $@; - $@ = $msg; # this seems to work, too! - undef; } 1; diff --git a/lib/Pod/Find.pm b/lib/Pod/Find.pm new file mode 100644 index 0000000..399bbba --- /dev/null +++ b/lib/Pod/Find.pm @@ -0,0 +1,259 @@ +############################################################################# +# Pod/Find.pm -- finds files containing POD documentation +# +# Author: Marek Rouchal +# +# borrowing code from Nick Ing-Simmon's PodToHtml +# This file is part of "PodParser". Pod::Find is free software; +# you can redistribute it and/or modify it under the same terms +# as Perl itself. +############################################################################# + +package Pod::Find; + +use vars qw($VERSION); +$VERSION = 0.10; ## Current version of this package +require 5.005; ## requires this Perl version or later + +############################################################################# + +=head1 NAME + +Pod::Find - find POD documents in directory trees + +=head1 SYNOPSIS + + use Pod::Find qw(pod_find simplify_name); + my %pods = pod_find({ -verbose => 1, -inc => 1 }); + foreach(keys %pods) { + print "found library POD `$pods{$_}' in $_\n"; + } + + print "podname=",simplify_name('a/b/c/mymodule.pod'),"\n"; + +=head1 DESCRIPTION + +B provides a function B that searches for POD +documents in a given set of files and directories. It returns a hash +with the file names as keys and the POD name as value. The POD name +is derived from the file name and its position in the directory tree. + +E.g. when searching in F<$HOME/perl5lib>, the file +F<$HOME/perl5lib/MyModule.pm> would get the POD name I, +whereas F<$HOME/perl5lib/Myclass/Subclass.pm> would be +I. The name information can be used for POD +translators. + +Only text files containing at least one valid POD command are found. + +A warning is printed if more than one POD file with the same POD name +is found, e.g. F in different directories. This usually +indicates duplicate occurences of modules in the I<@INC> search path. + +The function B is equivalent to B, but also +strips Perl-like extensions (.pm, .pl, .pod). + +Note that neither B nor B are exported by +default so be sure to specify them in the B statement if you need them: + + use Pod::Find qw(pod_find simplify_name); + +=head1 OPTIONS + +The first argument for B may be a hash reference with options. +The rest are either directories that are searched recursively or files. +The POD names of files are the plain basenames with any Perl-like extension +(.pm, .pl, .pod) stripped. + +=over 4 + +=item B<-verbose> + +Print progress information while scanning. + +=item B<-perl> + +Apply Perl-specific heuristics to find the correct PODs. This includes +stripping Perl-like extensions, omitting subdirectories that are numeric +but do I match the current Perl interpreter's version id, suppressing +F as a module hierarchy name etc. + +=item B<-script> + +Search for PODs in the current Perl interpreter's installation +B. This is taken from the local L module. + +=item B<-inc> + +Search for PODs in the current Perl interpreter's I<@INC> paths. + +=back + +=head1 AUTHOR + +Marek Rouchal Emarek@saftsack.fs.uni-bayreuth.deE, +heavily borrowing code from Nick Ing-Simmons' PodToHtml. + +=head1 SEE ALSO + +L, L + +=cut + +use strict; +#use diagnostics; +use Exporter; +use File::Find; +use Cwd; + +use vars qw(@ISA @EXPORT_OK $VERSION); +@ISA = qw(Exporter); +@EXPORT_OK = qw(&pod_find &simplify_name); + +# package global variables +my $SIMPLIFY_RX; + +# return a hash of the +sub pod_find +{ + my %opts; + if(ref $_[0]) { + %opts = %{shift()}; + } + + $opts{-verbose} ||= 0; + $opts{-perl} ||= 0; + + my (@search) = @_; + + if($opts{-script}) { + require Config; + push(@search, $Config::Config{scriptdir}); + $opts{-perl} = 1; + } + + if($opts{-inc}) { + push(@search, grep($_ ne '.',@INC)); + $opts{-perl} = 1; + } + + if($opts{-perl}) { + require Config; + # this code simplifies the POD name for Perl modules: + # * remove "site_perl" + # * remove e.g. "i586-linux" + # * remove e.g. 5.00503 + # * remove pod/ if followed by *.pod (e.g. in pod/perlfunc.pod) + $SIMPLIFY_RX = + qr!^(?i:site_perl/|$Config::Config{archname}/|\d+\.\d+([_.]?\d+)?/|pod/(?=.*?\.pod$))*!o; + } + + my %dirs_visited; + my %pods; + my %names; + my $pwd = cwd(); + + foreach my $try (@search) { + unless($try =~ m:^/:) { + # make path absolute + $try = join('/',$pwd,$try); + } + $try =~ s:/\.?(?=/|$)::; # simplify path + my $name; + if(-f $try) { + if($name = _check_and_extract_name($try, $opts{-verbose})) { + _check_for_duplicates($try, $name, \%names, \%pods); + } + next; + } + my $root_rx = qr!^\Q$try\E/!; + File::Find::find( sub { + my $item = $File::Find::name; + if(-d) { + if($dirs_visited{$item}) { + warn "Directory '$item' already seen, skipping.\n" + if($opts{-verbose}); + $File::Find::prune = 1; + return; + } + else { + $dirs_visited{$item} = 1; + } + if($opts{-perl} && /^(\d+\.[\d_]+)$/ && eval "$1" != $]) { + $File::Find::prune = 1; + warn "Perl $] version mismatch on $_, skipping.\n" + if($opts{-verbose}); + } + return; + } + if($name = _check_and_extract_name($item, $opts{-verbose}, $root_rx)) { + _check_for_duplicates($item, $name, \%names, \%pods); + } + }, $try); # end of File::Find::find + } + chdir $pwd; + %pods; +} + +sub _check_for_duplicates { + my ($file, $name, $names_ref, $pods_ref) = @_; + if($$names_ref{$name}) { + warn "Duplicate POD found (shadowing?): $name ($file)\n"; + warn " Already seen in ", + join(' ', grep($$pods_ref{$_} eq $name, keys %$pods_ref)),"\n"; + } + else { + $$names_ref{$name} = 1; + } + $$pods_ref{$file} = $name; +} + +sub _check_and_extract_name { + my ($file, $verbose, $root_rx) = @_; + + # check extension or executable + unless($file =~ /\.(pod|pm|pl)$/i || (-f $file && -x _ && -T _)) { + return undef; + } + + # check for one line of POD + unless(open(POD,"<$file")) { + warn "Error: $file is unreadable: $!\n"; + return undef; + } + local $/ = undef; + my $pod = ; + close(POD); + unless($pod =~ /\n=(head\d|pod|over|item)\b/) { + warn "No POD in $file, skipping.\n" + if($verbose); + return; + } + undef $pod; + + # strip non-significant path components + # _TODO_ what happens on e.g. Win32? + my $name = $file; + if(defined $root_rx) { + $name =~ s!$root_rx!!; + $name =~ s!$SIMPLIFY_RX!!o if(defined $SIMPLIFY_RX); + } + else { + $name =~ s:^.*/::; + } + $name =~ s/\.(pod|pm|pl)$//i; + $name =~ s!/+!::!g; + $name; +} + +# basic simplification of the POD name: +# basename & strip extension +sub simplify_name { + my ($str) = @_; + $str =~ s:^.*/::; + $str =~ s:\.p([lm]|od)$::i; + $str; +} + +1; + diff --git a/lib/Pod/Html.pm b/lib/Pod/Html.pm index 15757ec..4d77bc0 100644 --- a/lib/Pod/Html.pm +++ b/lib/Pod/Html.pm @@ -5,7 +5,7 @@ use Getopt::Long; # package for handling command-line parameters use File::Spec::Unix; require Exporter; use vars qw($VERSION); -$VERSION = 1.02; +$VERSION = 1.03; @ISA = Exporter; @EXPORT = qw(pod2html htmlify); use Cwd; @@ -176,10 +176,6 @@ Uses $Config{pod2html} to setup default options. Tom Christiansen, Etchrist@perl.comE. -=head1 BUGS - -Has trouble with C<> etc in = commands. - =head1 SEE ALSO L @@ -216,13 +212,8 @@ my $quiet = 0; # not quiet by default my $verbose = 0; # not verbose by default my $doindex = 1; # non-zero if we should generate an index my $listlevel = 0; # current list depth -my @listitem = (); # stack of HTML commands to use when a =item is - # encountered. the top of the stack is the - # current list. -my @listdata = (); # similar to @listitem, but for the text after - # an =item -my @listend = (); # similar to @listitem, but the text to use to - # end the list. +my @listend = (); # the text to use to end the list. +my $after_lpar = 0; # set to true after a par in an =item my $ignore = 1; # whether or not to format text. we don't # format text until we hit our first pod # directive. @@ -236,11 +227,13 @@ my $top = 1; # true if we are at the top of the doc. used # to prevent the first
    directive. my $paragraph; # which paragraph we're processing (used # for error messages) +my $ptQuote = 0; # status of double-quote conversion my %pages = (); # associative array used to find the location # of pages referenced by L<> links. my %sections = (); # sections within this page my %items = (); # associative array used to find the location # of =item directives referenced by C<> links +my %local_items = (); # local items - avoid destruction of %items my $Is83; # is dos with short filenames (8.3) sub init_globals { @@ -263,13 +256,8 @@ $quiet = 0; # not quiet by default $verbose = 0; # not verbose by default $doindex = 1; # non-zero if we should generate an index $listlevel = 0; # current list depth -@listitem = (); # stack of HTML commands to use when a =item is - # encountered. the top of the stack is the - # current list. -@listdata = (); # similar to @listitem, but for the text after - # an =item -@listend = (); # similar to @listitem, but the text to use to - # end the list. +@listend = (); # the text to use to end the list. +$after_lpar = 0; # set to true after a par in an =item $ignore = 1; # whether or not to format text. we don't # format text until we hit our first pod # directive. @@ -291,9 +279,28 @@ $paragraph = ''; # which paragraph we're processing (used # of pages referenced by L<> links. #%items = (); # associative array used to find the location # of =item directives referenced by C<> links +%local_items = (); $Is83=$^O eq 'dos'; } +# +# clean_data: global clean-up of pod data +# +sub clean_data($){ + my( $dataref ) = @_; + my $i; + for( $i = 0; $i <= $#$dataref; $i++ ){ + ${$dataref}[$i] =~ s/\s+\Z//; + + # have a look for all-space lines + if( ${$dataref}[$i] =~ /^\s+$/m ){ + my @chunks = split( /^\s+$/m, ${$dataref}[$i] ); + splice( @$dataref, $i, 1, @chunks ); + } + } +} + + sub pod2html { local(@ARGV) = @_; local($/); @@ -341,6 +348,7 @@ sub pod2html { $/ = ""; my @poddata = ; close(POD); + clean_data( \@poddata ); # scan the pod for =head[1-6] directives and build an index my $index = scan_headings(\%sections, @poddata); @@ -410,12 +418,13 @@ END_OF_HEAD get_cache($dircache, $itemcache, \@podpath, $podroot, $recurse); # scan the pod for =item directives - scan_items("", \%items, @poddata); + scan_items( \%local_items, "", @poddata); # put an index at the top of the file. note, if $doindex is 0 we # still generate an index, but surround it with an html comment. # that way some other program can extract it if desired. $index =~ s/--+/-/g; + print HTML "\n"; print HTML "\n"; print HTML "call emit_C($par) lev=$lev, par with BI=$x\n"; + + $res = emit_C( $text, $lev > 1 || ($par =~ /[BI] - convert to character + $$rstr =~ s/^(\w+)>//; + $res = "&$1;"; + + } elsif( $func eq 'F' ){ + # F - italizice + $res = '' . process_text1( $lev, $rstr ) . ''; + + } elsif( $func eq 'I' ){ + # I - italizice + $res = '' . process_text1( $lev, $rstr ) . ''; + + } elsif( $func eq 'L' ){ + # L - link + ## L => produce text, use cross-ref for linking + ## L => make text from cross-ref + ## need to extract text + my $par = go_ahead( $rstr, 'L' ); + + # some L<>'s that shouldn't be: + # a) full-blown URL's are emitted as-is + if( $par =~ m{^\w+://}s ){ + return make_URL_href( $par ); + } + # b) C<...> is stripped and treated as C<> + if( $par =~ /^C<(.*)>$/ ){ + my $text = depod( $1 ); + return emit_C( $text, $lev > 1 || ($par =~ /[BI] L<$par> to page $page, ident $ident\n"; + + } elsif( $par =~ m{^(.*?)/"?(.*?)"?$} ){ # [name]/"section" + # even though this should be a "section", we go for ident first + ( $page, $ident ) = ( $1, $2 ); + ### print STDERR "--> L<$par> to page $page, section $section\n"; + + } elsif( $par =~ /\s/ ){ # this must be a section with missing quotes + ( $page, $section ) = ( '', $par ); + ### print STDERR "--> L<$par> to void page, section $section\n"; + + } else { + ( $page, $section ) = ( $par, '' ); + ### print STDERR "--> L<$par> to page $par, void section\n"; + } + + # now, either $section or $ident is defined. the convoluted logic + # below tries to resolve L<> according to what the user specified. + # failing this, we try to find the next best thing... + my( $url, $ltext, $fid ); + + RESOLVE: { + if( defined $ident ){ + ## try to resolve $ident as an item + ( $url, $fid ) = coderef( $page, $ident ); + if( $url ){ + if( ! defined( $linktext ) ){ + $linktext = $ident; + $linktext .= " in " if $ident && $page; + $linktext .= "the $page manpage" if $page; + } + ### print STDERR "got coderef url=$url\n"; + last RESOLVE; + } + ## no luck: go for a section (auto-quoting!) + $section = $ident; + } + ## now go for a section + my $htmlsection = htmlify( $section ); + $url = page_sect( $page, $htmlsection ); + if( $url ){ + if( ! defined( $linktext ) ){ + $linktext = $section; + $linktext .= " in " if $section && $page; + $linktext .= "the $page manpage" if $page; + } + ### print STDERR "got page/section url=$url\n"; + last RESOLVE; + } + ## no luck: go for an ident + if( $section ){ + $ident = $section; + } else { + $ident = $page; + $page = undef(); + } + ( $url, $fid ) = coderef( $page, $ident ); + if( $url ){ + if( ! defined( $linktext ) ){ + $linktext = $ident; + $linktext .= " in " if $ident && $page; + $linktext .= "the $page manpage" if $page; + } + ### print STDERR "got section=>coderef url=$url\n"; + last RESOLVE; + } + + # warning; show some text. + $linktext = $opar unless defined $linktext; + warn "$0: $podfile: cannot resolve L<$opar> in paragraph $paragraph."; + } + + # now we have an URL or just plain code + $$rstr = $linktext . '>' . $$rstr; + if( defined( $url ) ){ + $res = "" . process_text1( $lev, $rstr ) . ''; + } else { + $res = '' . process_text1( $lev, $rstr ) . ''; + } + + } elsif( $func eq 'S' ){ + # S - non-breaking spaces + $res = process_text1( $lev, $rstr ); + $res =~ s/ / /g; + + } elsif( $func eq 'X' ){ + # X<> - ignore + $$rstr =~ s/^[^>]*>//; + + } elsif( $func eq 'Z' ){ + # Z<> - empty + warn "$0: $podfile: invalid X<> in paragraph $paragraph." + unless $$rstr =~ s/^>//; + + } else { + while( $$rstr =~ s/\A(.*?)([BCEFILSXZ]<|>)//s ){ + # all others: either recurse into new function or + # terminate at closing angle bracket + my $pt = $1; + $pt .= '>' if $2 eq '>' && $lev == 1; + $res .= $lev == 1 ? pure_text( $pt ) : inIS_text( $pt ); + return $res if $2 eq '>' && $lev > 1; + if( $2 ne '>' ){ + $res .= process_text1( $lev, $rstr, substr($2,0,1) ); + } + + } + if( $lev == 1 ){ + $res .= pure_text( $$rstr ); } else { - $result .= "$rest\n"; - $rest = ""; + warn "$0: $podfile: undelimited $func<> in paragraph $paragraph."; } } - $result .= $rest if $rest; - - # restore the leading and trailing white-space - $result = "$lead$result$trail"; + return $res; +} - return $result; +# +# go_ahead: extract text of an IS (can be nested) +# +sub go_ahead($$){ + my( $rstr, $func ) = @_; + my $res = ''; + my $level = 1; + while( $$rstr =~ s/\A(.*?)([BCEFILSXZ]<|>)//s ){ + $res .= $1; + if( $2 eq '>' ){ + return $res if --$level == 0; + } else { + ++$level; + } + $res .= $2; + } + warn "$0: $podfile: undelimited $func<> in paragraph $paragraph."; + return $res; } # -# pre_escape - convert & in text to $amp; +# emit_C - output result of C +# $text is the depod-ed text # -sub pre_escape { - my($str) = @_; - $$str =~ s/&(?!\w+;|#)/&/g; # XXX not bulletproof +sub emit_C($;$){ + my( $text, $nocode ) = @_; + my $res; + my( $url, $fid ) = coderef( undef(), $text ); + + # need HTML-safe text + my $linktext = html_escape( $text ); + + if( defined( $url ) && + (!defined( $EmittedItem ) || $EmittedItem ne $fid ) ){ + $res = "$linktext"; + } elsif( 0 && $nocode ){ + $res = $linktext; + } else { + $res = "$linktext"; + } + return $res; } # +# html_escape: make text safe for HTML +# +sub html_escape { + my $rest = $_[0]; + $rest =~ s/&/&/g; + $rest =~ s//>/g; + $rest =~ s/"/"/g; + return $rest; +} + + +# # dosify - convert filenames to 8.3 # sub dosify { @@ -1460,54 +1647,24 @@ sub dosify { } # -# process_L - convert a pod L<> directive to a corresponding HTML link. -# most of the links made are inferred rather than known about directly -# (i.e it's not known whether the =head\d section exists in the target file, -# or whether a .pod file exists in the case of split files). however, the -# guessing usually works. +# page_sect - make an URL from the text of a L<> # -# Unlike the other directives, this should be called with an unprocessed -# string, else tags in the link won't be matched. -# -sub process_L { - my($str) = @_; - my($s1, $s2, $linktext, $page, $page83, $section, $link); # work strings - - $str =~ s/\n/ /g; # undo word-wrapped tags - $s1 = $str; - for ($s1) { - # LREF: a la HREF L - $linktext = $1 if s:^([^|]+)\|::; - - # make sure sections start with a / - s,^",/",g; - s,^,/,g if (!m,/, && / /); - - # check if there's a section specified - if (m,^(.*?)/"?(.*?)"?$,) { # yes - ($page, $section) = ($1, $2); - } else { # no - ($page, $section) = ($_, ""); - } - - # check if we know that this is a section in this page - if (!defined $pages{$page} && defined $sections{$page}) { - $section = $page; - $page = ""; - } - - # remove trailing punctuation, like () - $section =~ s/\W*$// ; +sub page_sect($$) { + my( $page, $section ) = @_; + my( $linktext, $page83, $link); # work strings + + # check if we know that this is a section in this page + if (!defined $pages{$page} && defined $sections{$page}) { + $section = $page; + $page = ""; + ### print STDERR "reset page='', section=$section\n"; } $page83=dosify($page); $page=$page83 if (defined $pages{$page83}); if ($page eq "") { - $link = "#" . htmlify(0,$section); - $linktext = $section unless defined($linktext); + $link = "#" . htmlify( $section ); } elsif ( $page =~ /::/ ) { - $linktext = ($section ? "$section" : "$page") - unless defined($linktext); $page =~ s,::,/,g; # Search page cache for an entry keyed under the html page name, # then look to see what directory that page might be in. NOTE: @@ -1529,45 +1686,42 @@ sub process_L { # but A::C is found in lib/A/C.pm, then A::B is assumed to be in # lib/A/B.pm. This is also limited, but it's an improvement. # Maybe a hints file so that the links point to the correct places - # non-theless? - # Also, maybe put a warn "$0: cannot resolve..." here. + # nonetheless? + } $link = "$htmlroot/$page.html"; - $link .= "#" . htmlify(0,$section) if ($section); + $link .= "#" . htmlify( $section ) if ($section); } elsif (!defined $pages{$page}) { - warn "$0: $podfile: cannot resolve L<$str> in paragraph $paragraph: no such page '$page'\n" unless $quiet; $link = ""; - $linktext = $page unless defined($linktext); } else { - $linktext = ($section ? "$section" : "the $page manpage") unless defined($linktext); - $section = htmlify(0,$section) if $section ne ""; + $section = htmlify( $section ) if $section ne ""; + ### print STDERR "...section=$section\n"; # if there is a directory by the name of the page, then assume that an # appropriate section will exist in the subdirectory # if ($section ne "" && $pages{$page} =~ /([^:]*[^(\.pod|\.pm)]):/) { if ($section ne "" && $pages{$page} =~ /([^:]*(?$linktext"; } else { - $s1 = "$linktext"; + return undef(); } - return $s1; } # @@ -1626,110 +1777,63 @@ sub relativize_url { return $rel_path ; } -# -# process_BFI - process any of the B<>, F<>, or I<> pod-escapes and -# convert them to corresponding HTML directives. -# -sub process_BFI { - my($tag, $str) = @_; - my($s1); # work string - my(%repltext) = ( 'B' => 'STRONG', - 'F' => 'EM', - 'I' => 'EM'); - - # extract the modified text and convert to HTML - $s1 = "<$repltext{$tag}>$str"; - return $s1; -} # -# process_C - process the C<> pod-escape. +# coderef - make URL from the text of a C<> # -sub process_C { - my($str, $doref) = @_; - my($s1, $s2); +sub coderef($$){ + my( $page, $item ) = @_; + my( $url ); + + my $fid = fragment_id( $item ); + return( $url, $fid ); + if( defined( $page ) ){ + # we have been given a $page... + $page =~ s{::}{/}g; + + # Do we take it? Item could be a section! + my $base = $items{$fid} || ""; + $base =~ s{[^/]*/}{}; + if( $base ne "$page.html" ){ + ### print STDERR "coderef( $page, $item ): items{$fid} = $items{$fid} = $base => discard page!\n"; + $page = undef(); + } - $s1 = $str; - $s1 =~ s/\([^()]*\)//g; # delete parentheses - $s2 = $s1; - $s1 =~ s/\W//g; # delete bogus characters - $str = html_escape($str); + } else { + # no page - local items precede cached items + if( exists $local_items{$fid} ){ + $page = $local_items{$fid}; + } else { + $page = $items{$fid}; + } + } # if there was a pod file that we found earlier with an appropriate # =item directive, then create a link to that page. - if ($doref && defined $items{$s1}) { - if ( $items{$s1} ) { - my $link = "$htmlroot/$items{$s1}#item_" . htmlify(0,$s2) ; - # Here, we take advantage of the knowledge that $htmlfileurl ne '' - # implies $htmlroot eq ''. - my $url ; - if ( $htmlfileurl ne '' ) { - $link = "$htmldir$link" ; - $url = relativize_url( $link, $htmlfileurl ) ; - } - else { - $url = $link ; + if( defined $page ){ + if( $page ){ + if( exists $pages{$page} and $pages{$page} =~ /([^:.]*)\.[^:]*:/){ + $page = $1 . '.html'; } - $s1 = "$str" ; - } - else { - $s1 = "$str" ; - } - $s1 =~ s,(perl\w+/(\S+)\.html)#item_\2\b,$1,; - confess "s1 has space: $s1" if $s1 =~ /HREF="[^"]*\s[^"]*"/; - } else { - $s1 = "$str"; - # warn "$0: $podfile: cannot resolve C<$str> in paragraph $paragraph\n" if $verbose - } - - - return $s1; -} - -# -# process_E - process the E<> pod directive which seems to escape a character. -# -sub process_E { - my($str) = @_; - - for ($str) { - s,([^/].*),\&$1\;,g; - } - - return $str; -} - -# -# process_Z - process the Z<> pod directive which really just amounts to -# ignoring it. this allows someone to start a paragraph with an = -# -sub process_Z { - my($str) = @_; - - # there is no equivalent in HTML for this so just ignore it. - $str = ""; - return $str; -} + my $link = "$htmlroot/$page#item_$fid"; -# -# process_S - process the S<> pod directive which means to convert all -# spaces in the string to non-breaking spaces (in HTML-eze). -# -sub process_S { - my($str) = @_; + # Here, we take advantage of the knowledge that $htmlfileurl + # ne '' implies $htmlroot eq ''. + if ( $htmlfileurl ne '' ) { + $link = "$htmldir$link" ; + $url = relativize_url( $link, $htmlfileurl ) ; + } else { + $url = $link ; + } + } else { + $url = "#item_" . $fid; + } - # convert all spaces in the text to non-breaking spaces in HTML. - $str =~ s/ / /g; - return $str; + confess "url has space: $url" if $url =~ /"[^"]*\s[^"]*"/; + } + return( $url, $fid ); } -# -# process_X - this is supposed to make an index entry. we'll just -# ignore it. -# -sub process_X { - return ''; -} # @@ -1757,29 +1861,129 @@ sub finish_list { # # htmlify - converts a pod section specification to a suitable section -# specification for HTML. if first arg is 1, only takes 1st word. +# specification for HTML. Note that we keep spaces and special characters +# except ", ? (Netscape problem) and the hyphen (writer's problem...). # sub htmlify { - my($compact, $heading) = @_; + my( $heading) = @_; + $heading =~ s/(\s+)/ /g; + $heading =~ s/\s+\Z//; + $heading =~ s/\A\s+//; + # The hyphen is a disgrace to the English language. + $heading =~ s/[-"?]//g; + $heading = lc( $heading ); + return $heading; +} - if ($compact) { - $heading =~ /^(\w+)/; - $heading = $1; - } +# +# depod - convert text by eliminating all interior sequences +# Note: can be called with copy or modify semantics +# +my %E2c; +$E2c{lt} = '<'; +$E2c{gt} = '>'; +$E2c{sol} = '/'; +$E2c{verbar} = '|'; + +sub depod1($;$); + +sub depod($){ + my $string; + if( ref( $_[0] ) ){ + $string = ${$_[0]}; + ${$_[0]} = depod1( \$string ); + } else { + $string = $_[0]; + depod1( \$string ); + } +} - # $heading = lc($heading); - $heading =~ s/[^\w\s]/_/g; - $heading =~ s/(\s+)/ /g; - $heading =~ s/^\s*(.*?)\s*$/$1/s; - $heading =~ s/ /_/g; - $heading =~ s/\A(.{32}).*\Z/$1/s; - $heading =~ s/\s+\Z//; - $heading =~ s/_{2,}/_/g; +sub depod1($;$){ + my( $rstr, $func ) = @_; + my $res = ''; + return $res unless defined $$rstr; + if( ! defined( $func ) ){ + # skip to next begin of an interior sequence + while( $$rstr =~ s/\A(.*?)([BCEFILSXZ]) - convert to character + $$rstr =~ s/^(\w+)>//; + $res .= $E2c{$1} || ""; + } elsif( $func eq 'X' ){ + # X<> - ignore + $$rstr =~ s/^[^>]*>//; + } elsif( $func eq 'Z' ){ + # Z<> - empty + $$rstr =~ s/^>//; + } else { + # all others: either recurse into new function or + # terminate at closing angle bracket + while( $$rstr =~ s/\A(.*?)([BCEFILSXZ]<|>)// ){ + $res .= $1; + last if $2 eq '>'; + $res .= depod1( $rstr, substr($2,0,1) ); + } + ## If we're here and $2 ne '>': undelimited interior sequence. + ## Ignored, as this is called without proper indication of where we are. + ## Rely on process_text to produce diagnostics. + } + return $res; +} - return $heading; +# +# fragment_id - construct a fragment identifier from: +# a) =item text +# b) contents of C<...> +# +my @hc; +sub fragment_id { + my $text = shift(); + $text =~ s/\s+\Z//s; + if( $text ){ + # a method or function? + return $1 if $text =~ /(\w+)\s*\(/; + return $1 if $text =~ /->\s*(\w+)\s*\(?/; + + # a variable name? + return $1 if $text =~ /^([$@%*]\S+)/; + + # some pattern matching operator? + return $1 if $text =~ m|^(\w+/).*/\w*$|; + + # fancy stuff... like "do { }" + return $1 if $text =~ m|^(\w+)\s*{.*}$|; + + # honour the perlfunc manpage: func [PAR[,[ ]PAR]...] + # and some funnies with ... Module ... + return $1 if $text =~ m{^([a-z\d]+)(\s+[A-Z\d,/& ]+)?$}; + return $1 if $text =~ m{^([a-z\d]+)\s+Module(\s+[A-Z\d,/& ]+)?$}; + + # text? normalize! + $text =~ s/\s+/_/sg; + $text =~ s{(\W)}{ + defined( $hc[ord($1)] ) ? $hc[ord($1)] + : ( $hc[ord($1)] = sprintf( "%%%02X", ord($1) ) ) }gxe; + $text = substr( $text, 0, 50 ); + } else { + return undef(); + } } -BEGIN { +# +# make_URL_href - generate HTML href from URL +# Special treatment for CGI queries. +# +sub make_URL_href($){ + my( $url ) = @_; + if( $url !~ + s{^(http:[-\w/#~:.+=&%@!]+)(\?.*)$}{$1}i ){ + $url = "$url"; + } + return $url; } 1; diff --git a/lib/Pod/ParseUtils.pm b/lib/Pod/ParseUtils.pm new file mode 100644 index 0000000..a66e8f5 --- /dev/null +++ b/lib/Pod/ParseUtils.pm @@ -0,0 +1,792 @@ +############################################################################# +# Pod/ParseUtils.pm -- helpers for POD parsing and conversion +# +# Copyright (C) 1999 by Marek Rouchal. All rights reserved. +# This file is part of "PodParser". PodParser is free software; +# you can redistribute it and/or modify it under the same terms +# as Perl itself. +############################################################################# + +package Pod::ParseUtils; + +use vars qw($VERSION); +$VERSION = 0.2; ## Current version of this package +require 5.004; ## requires this Perl version or later + +=head1 NAME + +Pod::ParseUtils - helpers for POD parsing and conversion + +=head1 SYNOPSIS + + use Pod::ParseUtils; + + my $list = new Pod::List; + my $link = Pod::Hyperlink->new('Pod::Parser'); + +=head1 DESCRIPTION + +B contains a few object-oriented helper packages for +POD parsing and processing (i.e. in POD formatters and translators). + +=cut + +#----------------------------------------------------------------------------- +# Pod::List +# +# class to hold POD list info (=over, =item, =back) +#----------------------------------------------------------------------------- + +package Pod::List; + +use Carp; + +=head2 Pod::List + +B can be used to hold information about POD lists +(written as =over ... =item ... =back) for further processing. +The following methods are available: + +=over 4 + +=item new() + +Create a new list object. Properties may be specified through a hash +reference like this: + + my $list = Pod::List->new({ -start => $., -indent => 4 }); + +See the individual methods/properties for details. + +=cut + +sub new { + my $this = shift; + my $class = ref($this) || $this; + my %params = @_; + my $self = {%params}; + bless $self, $class; + $self->initialize(); + return $self; +} + +sub initialize { + my $self = shift; + $self->{-file} ||= 'unknown'; + $self->{-start} ||= 'unknown'; + $self->{-indent} ||= 4; # perlpod: "should be the default" + $self->{_items} = []; + $self->{-type} ||= ''; +} + +=item file() + +Without argument, retrieves the file name the list is in. This must +have been set before by either specifying B<-file> in the B +method or by calling the B method with a scalar argument. + +=cut + +# The POD file name the list appears in +sub file { + return (@_ > 1) ? ($_[0]->{-file} = $_[1]) : $_[0]->{-file}; +} + +=item start() + +Without argument, retrieves the line number where the list started. +This must have been set before by either specifying B<-start> in the +B method or by calling the B method with a scalar +argument. + +=cut + +# The line in the file the node appears +sub start { + return (@_ > 1) ? ($_[0]->{-start} = $_[1]) : $_[0]->{-start}; +} + +=item indent() + +Without argument, retrieves the indent level of the list as specified +in C<=over n>. This must have been set before by either specifying +B<-indent> in the B method or by calling the B method +with a scalar argument. + +=cut + +# indent level +sub indent { + return (@_ > 1) ? ($_[0]->{-indent} = $_[1]) : $_[0]->{-indent}; +} + +=item type() + +Without argument, retrieves the list type, which can be an arbitrary value, +e.g. C
      , C