mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Punt to attic files not in 5.6.1 OR not needed by FreeBSD.
This commit is contained in:
parent
3ef3e55298
commit
81703db930
41 changed files with 0 additions and 31065 deletions
|
|
@ -1,879 +0,0 @@
|
|||
# In addition to actual maintainers this file also lists "interested parties".
|
||||
#
|
||||
# The maintainer aliases come from AUTHORS. They may be defined in
|
||||
# a layered way: 'doc' expands to tchrist which expands to Tom Christiansen.
|
||||
#
|
||||
# A file that is in MANIFEST need not be here at all.
|
||||
# In any case, if nobody else is listed as maintainer,
|
||||
# PUMPKING (from AUTHORS) should be it.
|
||||
#
|
||||
# Filenames can contain * which means qr(.*) on the filenames found
|
||||
# using File::Find (it's _not_ filename glob).
|
||||
#
|
||||
# Maintainership definitions are of course cumulative: if A maintains
|
||||
# X/* and B maintains X/Y/Z, if X/Y/Z is changed, both A and B should
|
||||
# be notified.
|
||||
#
|
||||
# The filename(glob) and the maintainer(s) are separated by one or more tabs.
|
||||
|
||||
Artistic
|
||||
Changes
|
||||
Changes5.000
|
||||
Changes5.001
|
||||
Changes5.002
|
||||
Changes5.003
|
||||
Changes5.004
|
||||
Changes5.005
|
||||
Configure cfg
|
||||
Copying
|
||||
EXTERN.h
|
||||
INSTALL
|
||||
INTERN.h
|
||||
MANIFEST
|
||||
Makefile.SH
|
||||
objXSUB.h
|
||||
Policy_sh.SH
|
||||
Porting/* cfg
|
||||
Porting/Contract
|
||||
Porting/Glossary
|
||||
Porting/config.sh
|
||||
Porting/config_H
|
||||
Porting/findvars
|
||||
Porting/fixCORE
|
||||
Porting/fixvars
|
||||
Porting/genlog
|
||||
Porting/makerel
|
||||
Porting/p4d2p
|
||||
Porting/p4desc
|
||||
Porting/patching.pod dgris
|
||||
Porting/patchls
|
||||
Porting/pumpkin.pod
|
||||
README
|
||||
README.amiga amiga
|
||||
README.beos beos
|
||||
README.cygwin cygwin
|
||||
README.dos dos
|
||||
README.hpux hpux
|
||||
README.lexwarn lexwarn
|
||||
README.machten machten
|
||||
README.mpeix mpeix
|
||||
README.os2 os2
|
||||
README.os390 mvs
|
||||
README.plan9 plan9
|
||||
README.posix-bc posix-bc
|
||||
README.qnx qnx
|
||||
README.threads
|
||||
README.vmesa vmesa
|
||||
README.vms vms
|
||||
README.vos vos
|
||||
README.win32 win32
|
||||
Todo
|
||||
Todo-5.005
|
||||
XSlock.h
|
||||
XSUB.h
|
||||
av.c
|
||||
av.h
|
||||
beos/* beos
|
||||
bytecode.h
|
||||
bytecode.pl
|
||||
byterun.c
|
||||
byterun.h
|
||||
cc_runtime.h
|
||||
cflags.SH
|
||||
config_h.SH cfg
|
||||
configpm
|
||||
configure.com vms
|
||||
configure.gnu
|
||||
cop.h
|
||||
cv.h
|
||||
cygwin/* cygwin
|
||||
deb.c
|
||||
djgpp/* dos
|
||||
doio.c
|
||||
doop.c
|
||||
dosish.h
|
||||
dump.c
|
||||
ebcdic.c
|
||||
eg/ADB
|
||||
eg/README
|
||||
eg/cgi/* cgi
|
||||
eg/changes
|
||||
eg/client
|
||||
eg/down
|
||||
eg/dus
|
||||
eg/findcp
|
||||
eg/findtar
|
||||
eg/g/gcp
|
||||
eg/g/gcp.man
|
||||
eg/g/ged
|
||||
eg/g/ghosts
|
||||
eg/g/gsh
|
||||
eg/g/gsh.man
|
||||
eg/muck
|
||||
eg/muck.man
|
||||
eg/myrup
|
||||
eg/nih
|
||||
eg/relink
|
||||
eg/rename
|
||||
eg/rmfrom
|
||||
eg/scan/scan_df
|
||||
eg/scan/scan_last
|
||||
eg/scan/scan_messages
|
||||
eg/scan/scan_passwd
|
||||
eg/scan/scan_ps
|
||||
eg/scan/scan_sudo
|
||||
eg/scan/scan_suid
|
||||
eg/scan/scanner
|
||||
eg/server
|
||||
eg/shmkill
|
||||
eg/sysvipc/README
|
||||
eg/sysvipc/ipcmsg
|
||||
eg/sysvipc/ipcsem
|
||||
eg/sysvipc/ipcshm
|
||||
eg/travesty
|
||||
eg/unuc
|
||||
eg/uudecode
|
||||
eg/van/empty
|
||||
eg/van/unvanish
|
||||
eg/van/vanexp
|
||||
eg/van/vanish
|
||||
eg/who
|
||||
eg/wrapsuid
|
||||
emacs/* ilya
|
||||
embed.h
|
||||
embed.pl
|
||||
embedvar.h
|
||||
ext/*/hints* cfg
|
||||
ext/B/* nik
|
||||
ext/B/B/Deparse.pm smccam
|
||||
ext/DB_File* pmarquess
|
||||
ext/DB_File/hints/dynixptx.pl dynix/ptx
|
||||
ext/Data/Dumper/* gsar
|
||||
ext/Devel/DProf/*
|
||||
ext/Devel/Peek/* ilya
|
||||
ext/DynaLoader/DynaLoader_pm.PL
|
||||
ext/DynaLoader/Makefile.PL
|
||||
ext/DynaLoader/README
|
||||
ext/DynaLoader/dl_aix.xs aix
|
||||
ext/DynaLoader/dl_dld.xs rsanders
|
||||
ext/DynaLoader/dl_dlopen.xs timb
|
||||
ext/DynaLoader/dl_hpux.xs hpux
|
||||
ext/DynaLoader/dl_mpeix.xs mpeix
|
||||
ext/DynaLoader/dl_next.xs next
|
||||
ext/DynaLoader/dl_none.xs
|
||||
ext/DynaLoader/dl_vms.xs vms
|
||||
ext/DynaLoader/dl_vmesa.xs vmesa
|
||||
ext/DynaLoader/dlutils.c
|
||||
ext/DynaLoader/hints/linux.pl linux
|
||||
ext/Errno/* gbarr
|
||||
ext/Fcntl/* jhi
|
||||
ext/GDBM_File/GDBM_File.pm
|
||||
ext/GDBM_File/GDBM_File.xs
|
||||
ext/GDBM_File/Makefile.PL
|
||||
ext/GDBM_File/typemap
|
||||
ext/IO/*
|
||||
ext/IPC/SysV/* gbarr
|
||||
ext/NDBM_File/Makefile.PL
|
||||
ext/NDBM_File/NDBM_File.pm
|
||||
ext/NDBM_File/NDBM_File.xs
|
||||
ext/NDBM_File/hints/dec_osf.pl dec_osf
|
||||
ext/NDBM_File/hints/dynixptx.pl dynix/ptx
|
||||
ext/NDBM_File/hints/solaris.pl solaris
|
||||
ext/NDBM_File/hints/svr4.pl svr4
|
||||
ext/NDBM_File/typemap
|
||||
ext/ODBM_File/Makefile.PL
|
||||
ext/ODBM_File/ODBM_File.pm
|
||||
ext/ODBM_File/ODBM_File.xs
|
||||
ext/ODBM_File/hints/dec_osf.pl dec_osf
|
||||
ext/ODBM_File/hints/hpux.pl hpux
|
||||
ext/ODBM_File/hints/sco.pl sco
|
||||
ext/ODBM_File/hints/solaris.pl solaris
|
||||
ext/ODBM_File/hints/svr4.pl svr4
|
||||
ext/ODBM_File/hints/ultrix.pl
|
||||
ext/ODBM_File/typemap
|
||||
ext/Opcode/Makefile.PL
|
||||
ext/Opcode/Opcode.pm
|
||||
ext/Opcode/Opcode.xs
|
||||
ext/Opcode/Safe.pm
|
||||
ext/Opcode/ops.pm
|
||||
ext/POSIX/Makefile.PL
|
||||
ext/POSIX/POSIX.pm
|
||||
ext/POSIX/POSIX.pod
|
||||
ext/POSIX/POSIX.xs
|
||||
ext/POSIX/hints/bsdos.pl bsdos
|
||||
ext/POSIX/hints/dynixptx.pl dynix/ptx
|
||||
ext/POSIX/hints/freebsd.pl freebsd
|
||||
ext/POSIX/hints/linux.pl linux
|
||||
ext/POSIX/hints/netbsd.pl netbsd
|
||||
ext/POSIX/hints/next_3.pl next
|
||||
ext/POSIX/hints/openbsd.pl openbsd
|
||||
ext/POSIX/hints/sunos_4.pl sunos4
|
||||
ext/POSIX/typemap
|
||||
ext/SDBM_File/Makefile.PL
|
||||
ext/SDBM_File/SDBM_File.pm
|
||||
ext/SDBM_File/SDBM_File.xs
|
||||
ext/SDBM_File/sdbm/CHANGES
|
||||
ext/SDBM_File/sdbm/COMPARE
|
||||
ext/SDBM_File/sdbm/Makefile.PL
|
||||
ext/SDBM_File/sdbm/README
|
||||
ext/SDBM_File/sdbm/README.too
|
||||
ext/SDBM_File/sdbm/biblio
|
||||
ext/SDBM_File/sdbm/dba.c
|
||||
ext/SDBM_File/sdbm/dbd.c
|
||||
ext/SDBM_File/sdbm/dbe.1
|
||||
ext/SDBM_File/sdbm/dbe.c
|
||||
ext/SDBM_File/sdbm/dbm.c
|
||||
ext/SDBM_File/sdbm/dbm.h
|
||||
ext/SDBM_File/sdbm/dbu.c
|
||||
ext/SDBM_File/sdbm/grind
|
||||
ext/SDBM_File/sdbm/hash.c
|
||||
ext/SDBM_File/sdbm/linux.patches
|
||||
ext/SDBM_File/sdbm/makefile.sdbm
|
||||
ext/SDBM_File/sdbm/pair.c
|
||||
ext/SDBM_File/sdbm/pair.h
|
||||
ext/SDBM_File/sdbm/readme.ms
|
||||
ext/SDBM_File/sdbm/sdbm.3
|
||||
ext/SDBM_File/sdbm/sdbm.c
|
||||
ext/SDBM_File/sdbm/sdbm.h
|
||||
ext/SDBM_File/sdbm/tune.h
|
||||
ext/SDBM_File/sdbm/util.c
|
||||
ext/SDBM_File/typemap
|
||||
ext/Socket/Makefile.PL
|
||||
ext/Socket/Socket.pm
|
||||
ext/Socket/Socket.xs
|
||||
ext/Thread/Makefile.PL
|
||||
ext/Thread/Notes
|
||||
ext/Thread/README
|
||||
ext/Thread/Thread.pm
|
||||
ext/Thread/Thread.xs
|
||||
ext/Thread/Thread/Queue.pm
|
||||
ext/Thread/Thread/Semaphore.pm
|
||||
ext/Thread/Thread/Signal.pm
|
||||
ext/Thread/Thread/Specific.pm
|
||||
ext/Thread/create.t
|
||||
ext/Thread/die.t
|
||||
ext/Thread/die2.t
|
||||
ext/Thread/io.t
|
||||
ext/Thread/join.t
|
||||
ext/Thread/join2.t
|
||||
ext/Thread/list.t
|
||||
ext/Thread/lock.t
|
||||
ext/Thread/queue.t
|
||||
ext/Thread/specific.t
|
||||
ext/Thread/sync.t
|
||||
ext/Thread/sync2.t
|
||||
ext/Thread/typemap
|
||||
ext/Thread/unsync.t
|
||||
ext/Thread/unsync2.t
|
||||
ext/Thread/unsync3.t
|
||||
ext/Thread/unsync4.t
|
||||
ext/attrs/Makefile.PL
|
||||
ext/attrs/attrs.pm
|
||||
ext/attrs/attrs.xs
|
||||
ext/re/Makefile.PL
|
||||
ext/re/hints/mpeix.pl mpeix
|
||||
ext/re/re.pm regex
|
||||
ext/re/re.xs regex
|
||||
ext/util/make_ext
|
||||
ext/util/mkbootstrap
|
||||
fakethr.h
|
||||
form.h
|
||||
global.sym
|
||||
globals.c
|
||||
globvar.sym
|
||||
gv.c
|
||||
gv.h
|
||||
h2pl/README
|
||||
h2pl/cbreak.pl
|
||||
h2pl/cbreak2.pl
|
||||
h2pl/eg/sizeof.ph
|
||||
h2pl/eg/sys/errno.pl
|
||||
h2pl/eg/sys/ioctl.pl
|
||||
h2pl/eg/sysexits.pl
|
||||
h2pl/getioctlsizes
|
||||
h2pl/mksizes
|
||||
h2pl/mkvars
|
||||
h2pl/tcbreak
|
||||
h2pl/tcbreak2
|
||||
handy.h
|
||||
hints/* cfg
|
||||
hints/3b1.sh
|
||||
hints/3b1cc
|
||||
hints/README.hints
|
||||
hints/aix.sh aix
|
||||
hints/altos486.sh
|
||||
hints/amigaos.sh amiga
|
||||
hints/apollo.sh
|
||||
hints/aux_3.sh
|
||||
hints/beos.sh beos
|
||||
hints/broken-db.msg
|
||||
hints/bsdos.sh bsdos
|
||||
hints/convexos.sh
|
||||
hints/cxux.sh cxux
|
||||
hints/cygwin.sh cygwinx
|
||||
hints/dcosx.sh
|
||||
hints/dec_osf.sh dec_osf
|
||||
hints/dgux.sh dgux
|
||||
hints/dos_djgpp.sh dos
|
||||
hints/dynix.sh dynix/ptx
|
||||
hints/dynixptx.sh dynix/ptx
|
||||
hints/epix.sh
|
||||
hints/esix4.sh
|
||||
hints/fps.sh
|
||||
hints/freebsd.sh freebsd
|
||||
hints/genix.sh
|
||||
hints/greenhills.sh
|
||||
hints/hpux.sh hpux
|
||||
hints/i386.sh
|
||||
hints/irix* irix
|
||||
hints/isc.sh
|
||||
hints/isc_2.sh
|
||||
hints/linux.sh linux
|
||||
hints/lynxos.sh lynxos
|
||||
hints/machten.sh machten
|
||||
hints/machten_2.sh
|
||||
hints/mips.sh
|
||||
hints/mpc.sh
|
||||
hints/mpeix.sh mpeix
|
||||
hints/ncr_tower.sh
|
||||
hints/netbsd.sh netbsd
|
||||
hints/newsos4.sh
|
||||
hints/next* step
|
||||
hints/openbsd.sh openbsd
|
||||
hints/opus.sh
|
||||
hints/os2.sh os2
|
||||
hints/os390.sh mvs
|
||||
hints/posix-bc.sh posix-bc
|
||||
hints/powerux.sh powerux
|
||||
hints/qnx.sh qnx
|
||||
hints/sco.sh
|
||||
hints/sco_2_3_0.sh
|
||||
hints/sco_2_3_1.sh
|
||||
hints/sco_2_3_2.sh
|
||||
hints/sco_2_3_3.sh
|
||||
hints/sco_2_3_4.sh
|
||||
hints/solaris_2.sh solaris
|
||||
hints/stellar.sh
|
||||
hints/sunos_4* sunos4
|
||||
hints/svr4.sh svr4
|
||||
hints/ti1500.sh
|
||||
hints/titanos.sh
|
||||
hints/ultrix_4.sh ultrix
|
||||
hints/umips.sh
|
||||
hints/unicos* unicos
|
||||
hints/unisysdynix.sh
|
||||
hints/utekv.sh
|
||||
hints/uts.sh
|
||||
hints/uwin.sh uwin
|
||||
hints/vmesa.sh vmesa
|
||||
hv.c
|
||||
hv.h
|
||||
installhtml
|
||||
installman
|
||||
installperl
|
||||
intrpvar.h
|
||||
iperlsys.h
|
||||
jpl/* jpl
|
||||
keywords.h
|
||||
keywords.pl
|
||||
lib/AnyDBM_File.pm
|
||||
lib/AutoLoader.pm
|
||||
lib/AutoSplit.pm
|
||||
lib/Benchmark.pm jhi,timb
|
||||
lib/CGI* cgi
|
||||
lib/CPAN* cpan
|
||||
lib/Carp.pm
|
||||
lib/Class/Struct.pm tchrist
|
||||
lib/Cwd.pm
|
||||
lib/Devel/SelfStubber.pm
|
||||
lib/DirHandle.pm
|
||||
lib/English.pm
|
||||
lib/Env.pm
|
||||
lib/Exporter.pm
|
||||
lib/ExtUtils/* mm
|
||||
lib/ExtUtils/Command.pm nik
|
||||
lib/ExtUtils/Embed.pm doug
|
||||
lib/ExtUtils/Installed.pm alan.burlison
|
||||
lib/ExtUtils/Mksymlists.pm cbail
|
||||
lib/ExtUtils/MM_OS2.pm os2
|
||||
lib/ExtUtils/MM_VMS.pm vms
|
||||
lib/ExtUtils/MM_Win32.pm win32
|
||||
lib/ExtUtils/Packlist.pm alan.burlison
|
||||
lib/Fatal.pm
|
||||
lib/File/Basename.pm
|
||||
lib/File/CheckTree.pm
|
||||
lib/File/Compare.pm nik
|
||||
lib/File/Copy.pm cbail
|
||||
lib/File/DosGlob.pm gsar
|
||||
lib/File/Find.pm
|
||||
lib/File/Path.pm timb,cbail
|
||||
lib/File/Spec* kjahds
|
||||
lib/File/Spec/Mac.pm schinder
|
||||
lib/File/Spec/OS2.pm ilya
|
||||
lib/File/Spec/VMS.pm vms
|
||||
lib/File/Spec/Win32.pm win32
|
||||
lib/File/stat.pm tchrist
|
||||
lib/FileCache.pm
|
||||
lib/FileHandle.pm
|
||||
lib/FindBin.pm
|
||||
lib/Getopt/Long.pm jvromans
|
||||
lib/I18N/Collate.pm jhi
|
||||
lib/IPC/Open2.pm
|
||||
lib/IPC/Open3.pm
|
||||
lib/Math/BigFloat.pm mbiggar
|
||||
lib/Math/BigInt.pm mbiggar
|
||||
lib/Math/Complex.pm complex
|
||||
lib/Math/Trig.pm complex
|
||||
lib/Net/Ping.pm
|
||||
lib/Net/hostent.pm tchrist
|
||||
lib/Net/netent.pm tchrist
|
||||
lib/Net/protoent.pm tchrist
|
||||
lib/Net/servent.pm tchrist
|
||||
lib/Pod/Checker.pm bradapp
|
||||
lib/Pod/Functions.pm
|
||||
lib/Pod/Html.pm tchrist
|
||||
lib/Pod/InputObjects.pm bradapp
|
||||
lib/Pod/Parser.pm bradapp
|
||||
lib/Pod/PlainText.pm bradapp
|
||||
lib/Pod/Select.pm bradapp
|
||||
lib/Pod/Text.pm tchrist
|
||||
lib/Pod/Usage.pm bradapp
|
||||
lib/Search/Dict.pm
|
||||
lib/SelectSaver.pm
|
||||
lib/SelfLoader.pm
|
||||
lib/Shell.pm
|
||||
lib/Symbol.pm
|
||||
lib/Sys/Hostname.pm sundstrom
|
||||
lib/Sys/Syslog.pm tchrist
|
||||
lib/Term/Cap.pm
|
||||
lib/Term/Complete.pm wayne.thompson
|
||||
lib/Term/ReadLine.pm
|
||||
lib/Test.pm
|
||||
lib/Test/Harness.pm k
|
||||
lib/Text/Abbrev.pm
|
||||
lib/Text/ParseWords.pm pomeranz
|
||||
lib/Text/Soundex.pm stok
|
||||
lib/Text/Tabs.pm muir
|
||||
lib/Text/Wrap.pm muir
|
||||
lib/Tie/Array.pm nik
|
||||
lib/Tie/Handle.pm
|
||||
lib/Tie/Hash.pm
|
||||
lib/Tie/RefHash.pm gsar
|
||||
lib/Tie/Scalar.pm
|
||||
lib/Tie/SubstrHash.pm
|
||||
lib/Time/Local.pm pomeranz
|
||||
lib/Time/gmtime.pm tchrist
|
||||
lib/Time/localtime.pm tchrist
|
||||
lib/Time/tm.pm tchrist
|
||||
lib/UNIVERSAL.pm
|
||||
lib/User/grent.pm tchrist
|
||||
lib/User/pwent.pm tchrist
|
||||
lib/abbrev.pl
|
||||
lib/assert.pl
|
||||
lib/autouse.pm
|
||||
lib/base.pm
|
||||
lib/bigfloat.pl
|
||||
lib/bigint.pl
|
||||
lib/bigrat.pl
|
||||
lib/blib.pm
|
||||
lib/cacheout.pl
|
||||
lib/charnames.pm ilya
|
||||
lib/chat2.pl
|
||||
lib/complete.pl
|
||||
lib/constant.pm
|
||||
lib/ctime.pl
|
||||
lib/diagnostics.pm doc
|
||||
lib/dotsh.pl
|
||||
lib/dumpvar.pl
|
||||
lib/exceptions.pl
|
||||
lib/fastcwd.pl
|
||||
lib/fields.pm
|
||||
lib/filetest.pm
|
||||
lib/find.pl
|
||||
lib/finddepth.pl
|
||||
lib/flush.pl
|
||||
lib/ftp.pl
|
||||
lib/getcwd.pl
|
||||
lib/getopt.pl
|
||||
lib/getopts.pl
|
||||
lib/hostname.pl
|
||||
lib/importenv.pl
|
||||
lib/integer.pm
|
||||
lib/less.pm
|
||||
lib/lib.pm
|
||||
lib/locale.pm locale
|
||||
lib/look.pl
|
||||
lib/newgetopt.pl
|
||||
lib/open2.pl
|
||||
lib/open3.pl
|
||||
lib/overload.pm ilya
|
||||
lib/perl5db.pl ilya
|
||||
lib/pwd.pl
|
||||
lib/shellwords.pl
|
||||
lib/sigtrap.pm
|
||||
lib/stat.pl
|
||||
lib/strict.pm
|
||||
lib/subs.pm
|
||||
lib/syslog.pl
|
||||
lib/tainted.pl
|
||||
lib/termcap.pl
|
||||
lib/timelocal.pl
|
||||
lib/unicode/*Ethiopic* dmulholl
|
||||
lib/unicode* lwall
|
||||
lib/utf8* lwall
|
||||
lib/validate.pl
|
||||
lib/vars.pm
|
||||
lib/warning.pm lexwarn
|
||||
makeaperl.SH
|
||||
makedepend.SH
|
||||
makedir.SH
|
||||
malloc.c ilya
|
||||
mg.c
|
||||
mg.h
|
||||
minimod.pl
|
||||
miniperlmain.c
|
||||
mpeix/* mpeix
|
||||
mv-if-diff
|
||||
myconfig
|
||||
nostdio.h
|
||||
op.c
|
||||
op.h
|
||||
opcode.h
|
||||
opcode.pl
|
||||
os2/* ilya
|
||||
patchlevel.h
|
||||
perl.c
|
||||
perl.h
|
||||
perl_exp.SH
|
||||
perlio.c
|
||||
perlio.h
|
||||
perlio.sym
|
||||
perlsdio.h
|
||||
perlsfio.h
|
||||
perlsh
|
||||
perlvars.h
|
||||
perly.c
|
||||
perly_c.diff
|
||||
perly.fixer
|
||||
perly.h
|
||||
perly.y
|
||||
plan9/* plan9
|
||||
pod/pod2usage.PL bradapp
|
||||
pod/podchecker.PL bradapp
|
||||
pod/podselect.PL bradapp
|
||||
pod/* doc
|
||||
pod/buildtoc
|
||||
pod/checkpods.PL
|
||||
pod/perl.pod
|
||||
pod/perlapio.pod
|
||||
pod/perlbook.pod
|
||||
pod/perlbot.pod
|
||||
pod/perlcall.pod pmarquess
|
||||
pod/perldata.pod
|
||||
pod/perldebug.pod
|
||||
pod/perldelta.pod
|
||||
pod/perl5005delta.pod
|
||||
pod/perl5004delta.pod
|
||||
pod/perldiag.pod
|
||||
pod/perldsc.pod tchrist
|
||||
pod/perlembed.pod doug,jon
|
||||
pod/perlfaq* gnat
|
||||
pod/perlform.pod
|
||||
pod/perlfunc.pod
|
||||
pod/perlguts.pod
|
||||
pod/perlhist.pod jhi
|
||||
pod/perlipc.pod tchrist
|
||||
pod/perllocale.pod locale
|
||||
pod/perllol.pod tchrist
|
||||
pod/perlmod.pod
|
||||
pod/perlmodinstall.pod jon
|
||||
pod/perlmodlib.pod
|
||||
pod/perlobj.pod
|
||||
pod/perlop.pod
|
||||
pod/perlpod.pod lwall
|
||||
pod/perlport.pod pudge
|
||||
pod/perlre.pod regex
|
||||
pod/perlref.pod
|
||||
pod/perlreftut.pod mjd
|
||||
pod/perlrun.pod
|
||||
pod/perlsec.pod
|
||||
pod/perlstyle.pod
|
||||
pod/perlsub.pod
|
||||
pod/perlsyn.pod
|
||||
pod/perltie.pod tchrist
|
||||
pod/perltoc.pod
|
||||
pod/perltoot.pod tchrist
|
||||
pod/perltrap.pod
|
||||
pod/perlvar.pod
|
||||
pod/perlxs.pod roehrich
|
||||
pod/perlxstut.pod okamoto
|
||||
pod/pod2html.PL
|
||||
pod/pod2latex.PL
|
||||
pod/pod2man.PL
|
||||
pod/pod2text.PL
|
||||
pod/roffitall
|
||||
pod/rofftoc
|
||||
pod/splitman
|
||||
pod/splitpod
|
||||
pp.c
|
||||
pp.h
|
||||
pp.sym
|
||||
pp_ctl.c
|
||||
pp_hot.c
|
||||
pp_proto.h
|
||||
pp_sys.c
|
||||
proto.h
|
||||
qnx/* qnx
|
||||
regcomp.c regex
|
||||
regcomp.h regex
|
||||
regcomp.pl regex
|
||||
regcomp.sym regex
|
||||
regexec.c regex
|
||||
regexp.h regex
|
||||
regnodes.h regex
|
||||
run.c
|
||||
scope.c
|
||||
scope.h
|
||||
sv.c
|
||||
sv.h
|
||||
t/README
|
||||
t/TEST
|
||||
t/UTEST
|
||||
t/base/cond.t
|
||||
t/base/if.t
|
||||
t/base/lex.t
|
||||
t/base/pat.t
|
||||
t/base/rs.t
|
||||
t/base/term.t
|
||||
t/cmd/elsif.t
|
||||
t/cmd/for.t
|
||||
t/cmd/mod.t
|
||||
t/cmd/subval.t
|
||||
t/cmd/switch.t
|
||||
t/cmd/while.t
|
||||
t/comp/cmdopt.t
|
||||
t/comp/colon.t
|
||||
t/comp/cpp.aux
|
||||
t/comp/cpp.t
|
||||
t/comp/decl.t
|
||||
t/comp/multiline.t
|
||||
t/comp/package.t
|
||||
t/comp/proto.t
|
||||
t/comp/redef.t
|
||||
t/comp/require.t
|
||||
t/comp/script.t
|
||||
t/comp/term.t
|
||||
t/comp/use.t
|
||||
t/harness
|
||||
t/io/argv.t
|
||||
t/io/dup.t
|
||||
t/io/fs.t
|
||||
t/io/inplace.t
|
||||
t/io/iprefix.t
|
||||
t/io/pipe.t
|
||||
t/io/print.t
|
||||
t/io/read.t
|
||||
t/io/tell.t
|
||||
t/lib/abbrev.t
|
||||
t/lib/anydbm.t
|
||||
t/lib/autoloader.t
|
||||
t/lib/basename.t
|
||||
t/lib/bigint.t
|
||||
t/lib/bigintpm.t
|
||||
t/lib/cgi-form.t
|
||||
t/lib/cgi-function.t
|
||||
t/lib/cgi-html.t
|
||||
t/lib/cgi-request.t
|
||||
t/lib/charnames.t ilya
|
||||
t/lib/checktree.t
|
||||
t/lib/complex.t complex
|
||||
t/lib/db-btree.t pmarquess
|
||||
t/lib/db-hash.t pmarquess
|
||||
t/lib/db-recno.t pmarquess
|
||||
t/lib/dirhand.t
|
||||
t/lib/dosglob.t
|
||||
t/lib/dumper-ovl.t gsar
|
||||
t/lib/dumper.t gsar
|
||||
t/lib/english.t
|
||||
t/lib/env.t
|
||||
t/lib/errno.t gbarr
|
||||
t/lib/fields.t
|
||||
t/lib/filecache.t
|
||||
t/lib/filecopy.t
|
||||
t/lib/filefind.t
|
||||
t/lib/filehand.t
|
||||
t/lib/filepath.t
|
||||
t/lib/filespec.t kjahds
|
||||
t/lib/findbin.t
|
||||
t/lib/gdbm.t
|
||||
t/lib/getopt.t jvromans
|
||||
t/lib/h2ph* kstar
|
||||
t/lib/hostname.t
|
||||
t/lib/io_* gbarr
|
||||
t/lib/ipc_sysv.t gbarr
|
||||
t/lib/ndbm.t
|
||||
t/lib/odbm.t
|
||||
t/lib/opcode.t
|
||||
t/lib/open2.t
|
||||
t/lib/open3.t
|
||||
t/lib/ops.t
|
||||
t/lib/parsewords.t
|
||||
t/lib/ph.t kstar
|
||||
t/lib/posix.t
|
||||
t/lib/safe1.t
|
||||
t/lib/safe2.t
|
||||
t/lib/sdbm.t
|
||||
t/lib/searchdict.t
|
||||
t/lib/selectsaver.t
|
||||
t/lib/socket.t
|
||||
t/lib/soundex.t
|
||||
t/lib/symbol.t
|
||||
t/lib/texttabs.t muir
|
||||
t/lib/textfill.t muir
|
||||
t/lib/textwrap.t
|
||||
t/lib/thr5005.t
|
||||
t/lib/tie-push.t
|
||||
t/lib/tie-stdarray.t
|
||||
t/lib/tie-stdpush.t
|
||||
t/lib/timelocal.t
|
||||
t/lib/trig.t
|
||||
t/op/append.t
|
||||
t/op/arith.t
|
||||
t/op/array.t
|
||||
t/op/assignwarn.t
|
||||
t/op/auto.t
|
||||
t/op/avhv.t
|
||||
t/op/bop.t
|
||||
t/op/chop.t
|
||||
t/op/closure.t
|
||||
t/op/cmp.t
|
||||
t/op/cond.t
|
||||
t/op/context.t
|
||||
t/op/defins.t
|
||||
t/op/delete.t
|
||||
t/op/die.t
|
||||
t/op/die_exit.t
|
||||
t/op/do.t
|
||||
t/op/each.t
|
||||
t/op/eval.t
|
||||
t/op/exec.t
|
||||
t/op/exp.t
|
||||
t/op/filetest.t
|
||||
t/op/flip.t
|
||||
t/op/fork.t
|
||||
t/op/glob.t
|
||||
t/op/goto.t
|
||||
t/op/goto_xs.t
|
||||
t/op/grent.t
|
||||
t/op/groups.t
|
||||
t/op/gv.t
|
||||
t/op/hashwarn.t
|
||||
t/op/inc.t
|
||||
t/op/index.t
|
||||
t/op/int.t
|
||||
t/op/join.t
|
||||
t/op/lex_assign.t
|
||||
t/op/list.t
|
||||
t/op/local.t
|
||||
t/op/magic.t
|
||||
t/op/method.t
|
||||
t/op/misc.t
|
||||
t/op/mkdir.t
|
||||
t/op/my.t
|
||||
t/op/nothr5005.t
|
||||
t/op/oct.t
|
||||
t/op/ord.t
|
||||
t/op/pack.t
|
||||
t/op/pat.t
|
||||
t/op/pos.t
|
||||
t/op/push.t
|
||||
t/op/pwent.t
|
||||
t/op/quotemeta.t
|
||||
t/op/rand.t
|
||||
t/op/range.t
|
||||
t/op/re_tests regex
|
||||
t/op/read.t
|
||||
t/op/readdir.t
|
||||
t/op/recurse.t
|
||||
t/op/ref.t
|
||||
t/op/regexp.t regex
|
||||
t/op/regexp_noamp.t regex
|
||||
t/op/repeat.t
|
||||
t/op/runlevel.t
|
||||
t/op/sleep.t
|
||||
t/op/sort.t
|
||||
t/op/splice.t
|
||||
t/op/split.t
|
||||
t/op/sprintf.t
|
||||
t/op/stat.t
|
||||
t/op/study.t
|
||||
t/op/subst.t
|
||||
t/op/substr.t
|
||||
t/op/sysio.t
|
||||
t/op/taint.t
|
||||
t/op/tie.t
|
||||
t/op/tiearray.t
|
||||
t/op/tiehandle.t
|
||||
t/op/time.t
|
||||
t/op/tr.t
|
||||
t/op/undef.t
|
||||
t/op/universal.t
|
||||
t/op/unshift.t
|
||||
t/op/vec.t
|
||||
t/op/wantarray.t
|
||||
t/op/write.t
|
||||
t/pod/* bradapp
|
||||
t/pragma/constant.t
|
||||
t/pragma/locale.t locale
|
||||
t/pragma/overload.t ilya
|
||||
t/pragma/strict-refs
|
||||
t/pragma/strict-subs
|
||||
t/pragma/strict-vars
|
||||
t/pragma/strict.t
|
||||
t/pragma/subs.t
|
||||
t/pragma/warn/* lexwarn
|
||||
t/pragma/warn/regcomp regex
|
||||
t/pragma/warn/regexec regex
|
||||
t/pragma/warning.t lexwarn
|
||||
taint.c
|
||||
thrdvar.h
|
||||
thread.h
|
||||
toke.c
|
||||
universal.c
|
||||
unixish.h
|
||||
utf* lwall
|
||||
utils/Makefile
|
||||
utils/c2ph.PL tchrist
|
||||
utils/h2ph.PL kstar
|
||||
utils/h2xs.PL
|
||||
utils/perlbug.PL
|
||||
utils/perlcc.PL
|
||||
utils/perldoc.PL
|
||||
utils/pl2pm.PL
|
||||
utils/splain.PL doc
|
||||
vmesa/* vmesa
|
||||
vms/* vms
|
||||
vos/* vos
|
||||
warning.h lexwarn
|
||||
warning.pl lexwarn
|
||||
win32/*
|
||||
writemain.SH
|
||||
x2p/EXTERN.h
|
||||
x2p/INTERN.h
|
||||
x2p/Makefile.SH
|
||||
x2p/a2p.c
|
||||
x2p/a2p.h
|
||||
x2p/a2p.pod
|
||||
x2p/a2p.y
|
||||
x2p/a2py.c
|
||||
x2p/cflags.SH
|
||||
x2p/find2perl.PL
|
||||
x2p/hash.c
|
||||
x2p/hash.h
|
||||
x2p/proto.h
|
||||
x2p/s2p.PL
|
||||
x2p/str.c
|
||||
x2p/str.h
|
||||
x2p/util.c
|
||||
x2p/util.h
|
||||
x2p/walk.c
|
||||
|
|
@ -1,131 +0,0 @@
|
|||
This is a first ported perl for the POSIX subsystem in BS2000 VERSION
|
||||
'V121', OSD V3.1, POSIX Shell V03.1A55. It may work on other
|
||||
versions, but that's the one we've tested it on.
|
||||
|
||||
You may need the following GNU programs in order to install perl:
|
||||
|
||||
gzip:
|
||||
|
||||
We used version 1.2.4, which could be installed out of the box with
|
||||
one failure during 'make check'.
|
||||
|
||||
bison:
|
||||
|
||||
The yacc coming with BS2000 POSIX didn't work for us. So we had to
|
||||
use bison. We had to make a few changes to perl in order to use the
|
||||
pure (reentrant) parser of bison. We used version 1.25, but we had to
|
||||
add a few changes due to EBCDIC.
|
||||
|
||||
|
||||
UNPACKING:
|
||||
==========
|
||||
|
||||
To extract an ASCII tar archive on BS2000 POSIX you need an ASCII
|
||||
filesystem (we used the mountpoint /usr/local/ascii for this). Now
|
||||
you extract the archive in the ASCII filesystem without I/O-conversion:
|
||||
|
||||
cd /usr/local/ascii
|
||||
export IO_CONVERSION=NO
|
||||
gunzip < /usr/local/src/perl.tar.gz | pax -r
|
||||
|
||||
You may ignore the error message for the first element of the archive
|
||||
(this doesn't look like a tar archive / skipping to next file...),
|
||||
it's only the directory which will be made anyway.
|
||||
|
||||
After extracting the archive you copy the whole directory tree to your
|
||||
EBCDIC filesystem. This time you use I/O-conversion:
|
||||
|
||||
cd /usr/local/src
|
||||
IO_CONVERSION=YES
|
||||
cp -r /usr/local/ascii/perl5.005_02 ./
|
||||
|
||||
|
||||
COMPILING:
|
||||
==========
|
||||
|
||||
There is a "hints" file for posix-bc that specifies the correct values
|
||||
for most things. The major problem is (of course) the EBCDIC character
|
||||
set.
|
||||
|
||||
Configure did everything except the perl parser.
|
||||
|
||||
Because of our problems with the native yacc we used GNU bison to
|
||||
generate a pure (=reentrant) parser for perly.y. So our yacc is
|
||||
really the following script:
|
||||
|
||||
-----8<-----/usr/local/bin/yacc-----8<-----
|
||||
#! /usr/bin/sh
|
||||
|
||||
# Bison as a reentrant yacc:
|
||||
|
||||
# save parameters:
|
||||
params=""
|
||||
while [[ $# -gt 1 ]]; do
|
||||
params="$params $1"
|
||||
shift
|
||||
done
|
||||
|
||||
# add flag %pure_parser:
|
||||
|
||||
tmpfile=/tmp/bison.$$.y
|
||||
echo %pure_parser > $tmpfile
|
||||
cat $1 >> $tmpfile
|
||||
|
||||
# call bison:
|
||||
|
||||
echo "/usr/local/bin/bison --yacc $params $1\t\t\t(Pure Parser)"
|
||||
/usr/local/bin/bison --yacc $params $tmpfile
|
||||
|
||||
# cleanup:
|
||||
|
||||
rm -f $tmpfile
|
||||
-----8<----------8<-----
|
||||
|
||||
We still use the normal yacc for a2p.y though!!! We made a softlink
|
||||
called byacc to distinguish between the two versions:
|
||||
|
||||
ln -s /usr/bin/yacc /usr/local/bin/byacc
|
||||
|
||||
We build perl using both GNU make and the native make.
|
||||
|
||||
|
||||
TESTING:
|
||||
========
|
||||
|
||||
We still got a few errors during 'make test'. Most of them are the
|
||||
result of using bison. Bison prints 'parser error' instead of 'syntax
|
||||
error', so we may ignore them. One error in the test op/regexp (and
|
||||
op/regexp_noamp) seems a bit critical, the result was an 'Out of
|
||||
memory' (core dump with op/regexp_noamp). The following list shows
|
||||
our errors, your results may differ:
|
||||
|
||||
op/misc.............FAILED tests 45-46
|
||||
op/pack.............FAILED tests 58-60
|
||||
op/regexp...........FAILED tests 405-492 (core dump)
|
||||
op/regexp_noamp.....FAILED tests 405-492 (core dump)
|
||||
pragma/overload.....FAILED tests 152-153, 170-171
|
||||
pragma/subs.........FAILED tests 1-2
|
||||
pragma/warning......FAILED tests 121, 127, 130, 142
|
||||
lib/cgi-html........dubious, FAILED tests 1-17 (ALL)
|
||||
lib/complex.........FAILED tests 264, 484
|
||||
lib/dumper..........FAILED tests MANY
|
||||
Failed 7/190 test scripts, 96.32% okay. 234/6549 subtests failed, 96.43% okay.
|
||||
|
||||
|
||||
INSTALLING:
|
||||
===========
|
||||
|
||||
We have no nroff on BS2000 POSIX (yet), so we ignored any errors while
|
||||
installing the documentation.
|
||||
|
||||
|
||||
USING PERL:
|
||||
===========
|
||||
|
||||
BS2000 POSIX doesn't support the shebang notation
|
||||
('#!/usr/local/bin/perl'), so you have to use the following lines
|
||||
instead:
|
||||
|
||||
: # use perl
|
||||
eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
|
||||
if $running_under_some_shell;
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
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
|
||||
|
||||
Compiler
|
||||
auto-produce executable
|
||||
typed lexicals should affect B::CC::load_pad
|
||||
workarounds to help Win32
|
||||
END blocks need saving in compiled output
|
||||
_AUTOLOAD prodding
|
||||
fix comppadlist (names in comppad_name can have fake SvCUR
|
||||
from where newASSIGNOP steals the field)
|
||||
|
||||
Namespace cleanup
|
||||
CPP-space: restrict what we export from headers
|
||||
stop malloc()/free() pollution unless asked
|
||||
header-space: move into CORE/perl/
|
||||
API-space: begin list of things that constitute public api
|
||||
|
||||
MULTIPLICITY support
|
||||
complete work on safe recursive interpreters, C<Perl->new()>
|
||||
revisit extra implicit arg that provides curthread/curinterp context
|
||||
|
||||
Reliable Signals
|
||||
alternate runops() for signal despatch
|
||||
figure out how to die() in delayed sighandler
|
||||
add tests for Thread::Signal
|
||||
|
||||
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
|
||||
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
|
||||
automate testing with large parts of CPAN
|
||||
|
||||
Ongoing
|
||||
keep filenames 8.3 friendly, where feasible
|
||||
upgrade to newer versions of all independently maintained modules
|
||||
comprehensive perldelta.pod
|
||||
|
||||
Documentation
|
||||
describe new age patterns
|
||||
update perl{guts,call,embed,xs} with additions, changes to API
|
||||
document Win32 choices
|
||||
spot-check all new modules for completeness
|
||||
better docs for pack()/unpack()
|
||||
reorg tutorials vs. reference sections
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
#ifndef __XSlock_h__
|
||||
#define __XSlock_h__
|
||||
|
||||
class XSLockManager
|
||||
{
|
||||
public:
|
||||
XSLockManager() { InitializeCriticalSection(&cs); };
|
||||
~XSLockManager() { DeleteCriticalSection(&cs); };
|
||||
void Enter(void) { EnterCriticalSection(&cs); };
|
||||
void Leave(void) { LeaveCriticalSection(&cs); };
|
||||
protected:
|
||||
CRITICAL_SECTION cs;
|
||||
};
|
||||
|
||||
XSLockManager g_XSLock;
|
||||
CPerlObj* pPerl;
|
||||
|
||||
class XSLock
|
||||
{
|
||||
public:
|
||||
XSLock(CPerlObj *p) {
|
||||
g_XSLock.Enter();
|
||||
::pPerl = p;
|
||||
};
|
||||
~XSLock() { g_XSLock.Leave(); };
|
||||
};
|
||||
|
||||
/* PERL_CAPI does its own locking in xs_handler() */
|
||||
#if defined(PERL_OBJECT) && !defined(PERL_CAPI)
|
||||
#undef dXSARGS
|
||||
#define dXSARGS \
|
||||
XSLock localLock(pPerl); \
|
||||
dSP; dMARK; \
|
||||
I32 ax = mark - PL_stack_base + 1; \
|
||||
I32 items = sp - mark
|
||||
#endif /* PERL_OBJECT && !PERL_CAPI */
|
||||
|
||||
#endif
|
||||
|
|
@ -1,161 +0,0 @@
|
|||
typedef char *pvcontents;
|
||||
typedef char *strconst;
|
||||
typedef U32 PV;
|
||||
typedef char *op_tr_array;
|
||||
typedef int comment_t;
|
||||
typedef SV *svindex;
|
||||
typedef OP *opindex;
|
||||
typedef IV IV64;
|
||||
|
||||
#ifdef INDIRECT_BGET_MACROS
|
||||
#define BGET_FREAD(argp, len, nelem) \
|
||||
bs.fread((char*)(argp),(len),(nelem),bs.data)
|
||||
#define BGET_FGETC() bs.fgetc(bs.data)
|
||||
#else
|
||||
#define BGET_FREAD(argp, len, nelem) PerlIO_read(fp, (argp), (len)*(nelem))
|
||||
#define BGET_FGETC() PerlIO_getc(fp)
|
||||
#endif /* INDIRECT_BGET_MACROS */
|
||||
|
||||
#define BGET_U32(arg) \
|
||||
BGET_FREAD(&arg, sizeof(U32), 1); arg = PerlSock_ntohl((U32)arg)
|
||||
#define BGET_I32(arg) \
|
||||
BGET_FREAD(&arg, sizeof(I32), 1); arg = (I32)PerlSock_ntohl((U32)arg)
|
||||
#define BGET_U16(arg) \
|
||||
BGET_FREAD(&arg, sizeof(U16), 1); arg = PerlSock_ntohs((U16)arg)
|
||||
#define BGET_U8(arg) arg = BGET_FGETC()
|
||||
|
||||
#if INDIRECT_BGET_MACROS
|
||||
#define BGET_PV(arg) STMT_START { \
|
||||
BGET_U32(arg); \
|
||||
if (arg) \
|
||||
bs.freadpv(arg, bs.data); \
|
||||
else { \
|
||||
PL_bytecode_pv.xpv_pv = 0; \
|
||||
PL_bytecode_pv.xpv_len = 0; \
|
||||
PL_bytecode_pv.xpv_cur = 0; \
|
||||
} \
|
||||
} STMT_END
|
||||
#else
|
||||
#define BGET_PV(arg) STMT_START { \
|
||||
BGET_U32(arg); \
|
||||
if (arg) { \
|
||||
New(666, PL_bytecode_pv.xpv_pv, arg, char); \
|
||||
PerlIO_read(fp, PL_bytecode_pv.xpv_pv, arg); \
|
||||
PL_bytecode_pv.xpv_len = arg; \
|
||||
PL_bytecode_pv.xpv_cur = arg - 1; \
|
||||
} else { \
|
||||
PL_bytecode_pv.xpv_pv = 0; \
|
||||
PL_bytecode_pv.xpv_len = 0; \
|
||||
PL_bytecode_pv.xpv_cur = 0; \
|
||||
} \
|
||||
} STMT_END
|
||||
#endif /* INDIRECT_BGET_MACROS */
|
||||
|
||||
#define BGET_comment_t(arg) \
|
||||
do { arg = BGET_FGETC(); } while (arg != '\n' && arg != EOF)
|
||||
|
||||
/*
|
||||
* In the following, sizeof(IV)*4 is just a way of encoding 32 on 64-bit-IV
|
||||
* machines such that 32-bit machine compilers don't whine about the shift
|
||||
* count being too high even though the code is never reached there.
|
||||
*/
|
||||
#define BGET_IV64(arg) STMT_START { \
|
||||
U32 hi, lo; \
|
||||
BGET_U32(hi); \
|
||||
BGET_U32(lo); \
|
||||
if (sizeof(IV) == 8) \
|
||||
arg = ((IV)hi << (sizeof(IV)*4) | lo); \
|
||||
else if (((I32)hi == -1 && (I32)lo < 0) \
|
||||
|| ((I32)hi == 0 && (I32)lo >= 0)) { \
|
||||
arg = (I32)lo; \
|
||||
} \
|
||||
else { \
|
||||
PL_bytecode_iv_overflows++; \
|
||||
arg = 0; \
|
||||
} \
|
||||
} STMT_END
|
||||
|
||||
#define BGET_op_tr_array(arg) do { \
|
||||
unsigned short *ary; \
|
||||
int i; \
|
||||
New(666, ary, 256, unsigned short); \
|
||||
BGET_FREAD(ary, 256, 2); \
|
||||
for (i = 0; i < 256; i++) \
|
||||
ary[i] = PerlSock_ntohs(ary[i]); \
|
||||
arg = (char *) ary; \
|
||||
} while (0)
|
||||
|
||||
#define BGET_pvcontents(arg) arg = PL_bytecode_pv.xpv_pv
|
||||
#define BGET_strconst(arg) STMT_START { \
|
||||
for (arg = PL_tokenbuf; (*arg = BGET_FGETC()); arg++) /* nothing */; \
|
||||
arg = PL_tokenbuf; \
|
||||
} STMT_END
|
||||
|
||||
#define BGET_double(arg) STMT_START { \
|
||||
char *str; \
|
||||
BGET_strconst(str); \
|
||||
arg = atof(str); \
|
||||
} STMT_END
|
||||
|
||||
#define BGET_objindex(arg, type) STMT_START { \
|
||||
U32 ix; \
|
||||
BGET_U32(ix); \
|
||||
arg = (type)PL_bytecode_obj_list[ix]; \
|
||||
} STMT_END
|
||||
#define BGET_svindex(arg) BGET_objindex(arg, svindex)
|
||||
#define BGET_opindex(arg) BGET_objindex(arg, opindex)
|
||||
|
||||
#define BSET_ldspecsv(sv, arg) sv = PL_specialsv_list[arg]
|
||||
|
||||
#define BSET_sv_refcnt_add(svrefcnt, arg) svrefcnt += arg
|
||||
#define BSET_gp_refcnt_add(gprefcnt, arg) gprefcnt += arg
|
||||
#define BSET_gp_share(sv, arg) STMT_START { \
|
||||
gp_free((GV*)sv); \
|
||||
GvGP(sv) = GvGP(arg); \
|
||||
} STMT_END
|
||||
|
||||
#define BSET_gv_fetchpv(sv, arg) sv = (SV*)gv_fetchpv(arg, TRUE, SVt_PV)
|
||||
#define BSET_gv_stashpv(sv, arg) sv = (SV*)gv_stashpv(arg, TRUE)
|
||||
#define BSET_sv_magic(sv, arg) sv_magic(sv, Nullsv, arg, 0, 0)
|
||||
#define BSET_mg_pv(mg, arg) mg->mg_ptr = arg; mg->mg_len = PL_bytecode_pv.xpv_cur
|
||||
#define BSET_sv_upgrade(sv, arg) (void)SvUPGRADE(sv, arg)
|
||||
#define BSET_xpv(sv) do { \
|
||||
SvPV_set(sv, PL_bytecode_pv.xpv_pv); \
|
||||
SvCUR_set(sv, PL_bytecode_pv.xpv_cur); \
|
||||
SvLEN_set(sv, PL_bytecode_pv.xpv_len); \
|
||||
} while (0)
|
||||
#define BSET_av_extend(sv, arg) av_extend((AV*)sv, arg)
|
||||
|
||||
#define BSET_av_push(sv, arg) av_push((AV*)sv, arg)
|
||||
#define BSET_hv_store(sv, arg) \
|
||||
hv_store((HV*)sv, PL_bytecode_pv.xpv_pv, PL_bytecode_pv.xpv_cur, arg, 0)
|
||||
#define BSET_pv_free(pv) Safefree(pv.xpv_pv)
|
||||
#define BSET_pregcomp(o, arg) \
|
||||
((PMOP*)o)->op_pmregexp = arg ? \
|
||||
CALLREGCOMP(arg, arg + PL_bytecode_pv.xpv_cur, ((PMOP*)o)) : 0
|
||||
#define BSET_newsv(sv, arg) sv = NEWSV(666,0); SvUPGRADE(sv, arg)
|
||||
#define BSET_newop(o, arg) o = (OP*)safemalloc(optype_size[arg])
|
||||
#define BSET_newopn(o, arg) STMT_START { \
|
||||
OP *oldop = o; \
|
||||
BSET_newop(o, arg); \
|
||||
oldop->op_next = o; \
|
||||
} STMT_END
|
||||
|
||||
#define BSET_ret(foo) return
|
||||
|
||||
/*
|
||||
* Kludge special-case workaround for OP_MAPSTART
|
||||
* which needs the ppaddr for OP_GREPSTART. Blech.
|
||||
*/
|
||||
#define BSET_op_type(o, arg) STMT_START { \
|
||||
o->op_type = arg; \
|
||||
if (arg == OP_MAPSTART) \
|
||||
arg = OP_GREPSTART; \
|
||||
o->op_ppaddr = ppaddr[arg]; \
|
||||
} STMT_END
|
||||
#define BSET_op_ppaddr(o, arg) croak("op_ppaddr not yet implemented")
|
||||
#define BSET_curpad(pad, arg) pad = AvARRAY(arg)
|
||||
|
||||
#define BSET_OBJ_STORE(obj, ix) \
|
||||
(I32)ix > PL_bytecode_obj_list_fill ? \
|
||||
bset_obj_store(obj, (I32)ix) : (PL_bytecode_obj_list[ix] = obj)
|
||||
|
|
@ -1,867 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 1996-1998 Malcolm Beattie
|
||||
*
|
||||
* You may distribute under the terms of either the GNU General Public
|
||||
* License or the Artistic License, as specified in the README file.
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* This file is autogenerated from bytecode.pl. Changes made here will be lost.
|
||||
*/
|
||||
|
||||
#include "EXTERN.h"
|
||||
#include "perl.h"
|
||||
|
||||
void *
|
||||
bset_obj_store(void *obj, I32 ix)
|
||||
{
|
||||
if (ix > PL_bytecode_obj_list_fill) {
|
||||
if (PL_bytecode_obj_list_fill == -1)
|
||||
New(666, PL_bytecode_obj_list, ix + 1, void*);
|
||||
else
|
||||
Renew(PL_bytecode_obj_list, ix + 1, void*);
|
||||
PL_bytecode_obj_list_fill = ix;
|
||||
}
|
||||
PL_bytecode_obj_list[ix] = obj;
|
||||
return obj;
|
||||
}
|
||||
|
||||
#ifdef INDIRECT_BGET_MACROS
|
||||
void byterun(struct bytestream bs)
|
||||
#else
|
||||
void byterun(PerlIO *fp)
|
||||
#endif /* INDIRECT_BGET_MACROS */
|
||||
{
|
||||
dTHR;
|
||||
int insn;
|
||||
while ((insn = BGET_FGETC()) != EOF) {
|
||||
switch (insn) {
|
||||
case INSN_COMMENT: /* 35 */
|
||||
{
|
||||
comment_t arg;
|
||||
BGET_comment_t(arg);
|
||||
arg = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_NOP: /* 10 */
|
||||
{
|
||||
break;
|
||||
}
|
||||
case INSN_RET: /* 0 */
|
||||
{
|
||||
BSET_ret(none);
|
||||
break;
|
||||
}
|
||||
case INSN_LDSV: /* 1 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
PL_bytecode_sv = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_LDOP: /* 2 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
PL_op = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_STSV: /* 3 */
|
||||
{
|
||||
U32 arg;
|
||||
BGET_U32(arg);
|
||||
BSET_OBJ_STORE(PL_bytecode_sv, arg);
|
||||
break;
|
||||
}
|
||||
case INSN_STOP: /* 4 */
|
||||
{
|
||||
U32 arg;
|
||||
BGET_U32(arg);
|
||||
BSET_OBJ_STORE(PL_op, arg);
|
||||
break;
|
||||
}
|
||||
case INSN_LDSPECSV: /* 5 */
|
||||
{
|
||||
U8 arg;
|
||||
BGET_U8(arg);
|
||||
BSET_ldspecsv(PL_bytecode_sv, arg);
|
||||
break;
|
||||
}
|
||||
case INSN_NEWSV: /* 6 */
|
||||
{
|
||||
U8 arg;
|
||||
BGET_U8(arg);
|
||||
BSET_newsv(PL_bytecode_sv, arg);
|
||||
break;
|
||||
}
|
||||
case INSN_NEWOP: /* 7 */
|
||||
{
|
||||
U8 arg;
|
||||
BGET_U8(arg);
|
||||
BSET_newop(PL_op, arg);
|
||||
break;
|
||||
}
|
||||
case INSN_NEWOPN: /* 8 */
|
||||
{
|
||||
U8 arg;
|
||||
BGET_U8(arg);
|
||||
BSET_newopn(PL_op, arg);
|
||||
break;
|
||||
}
|
||||
case INSN_NEWPV: /* 9 */
|
||||
{
|
||||
PV arg;
|
||||
BGET_PV(arg);
|
||||
break;
|
||||
}
|
||||
case INSN_PV_CUR: /* 11 */
|
||||
{
|
||||
STRLEN arg;
|
||||
BGET_U32(arg);
|
||||
PL_bytecode_pv.xpv_cur = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_PV_FREE: /* 12 */
|
||||
{
|
||||
BSET_pv_free(PL_bytecode_pv);
|
||||
break;
|
||||
}
|
||||
case INSN_SV_UPGRADE: /* 13 */
|
||||
{
|
||||
char arg;
|
||||
BGET_U8(arg);
|
||||
BSET_sv_upgrade(PL_bytecode_sv, arg);
|
||||
break;
|
||||
}
|
||||
case INSN_SV_REFCNT: /* 14 */
|
||||
{
|
||||
U32 arg;
|
||||
BGET_U32(arg);
|
||||
SvREFCNT(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_SV_REFCNT_ADD: /* 15 */
|
||||
{
|
||||
I32 arg;
|
||||
BGET_I32(arg);
|
||||
BSET_sv_refcnt_add(SvREFCNT(PL_bytecode_sv), arg);
|
||||
break;
|
||||
}
|
||||
case INSN_SV_FLAGS: /* 16 */
|
||||
{
|
||||
U32 arg;
|
||||
BGET_U32(arg);
|
||||
SvFLAGS(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XRV: /* 17 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
SvRV(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XPV: /* 18 */
|
||||
{
|
||||
BSET_xpv(PL_bytecode_sv);
|
||||
break;
|
||||
}
|
||||
case INSN_XIV32: /* 19 */
|
||||
{
|
||||
I32 arg;
|
||||
BGET_I32(arg);
|
||||
SvIVX(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XIV64: /* 20 */
|
||||
{
|
||||
IV64 arg;
|
||||
BGET_IV64(arg);
|
||||
SvIVX(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XNV: /* 21 */
|
||||
{
|
||||
double arg;
|
||||
BGET_double(arg);
|
||||
SvNVX(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XLV_TARGOFF: /* 22 */
|
||||
{
|
||||
STRLEN arg;
|
||||
BGET_U32(arg);
|
||||
LvTARGOFF(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XLV_TARGLEN: /* 23 */
|
||||
{
|
||||
STRLEN arg;
|
||||
BGET_U32(arg);
|
||||
LvTARGLEN(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XLV_TARG: /* 24 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
LvTARG(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XLV_TYPE: /* 25 */
|
||||
{
|
||||
char arg;
|
||||
BGET_U8(arg);
|
||||
LvTYPE(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XBM_USEFUL: /* 26 */
|
||||
{
|
||||
I32 arg;
|
||||
BGET_I32(arg);
|
||||
BmUSEFUL(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XBM_PREVIOUS: /* 27 */
|
||||
{
|
||||
U16 arg;
|
||||
BGET_U16(arg);
|
||||
BmPREVIOUS(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XBM_RARE: /* 28 */
|
||||
{
|
||||
U8 arg;
|
||||
BGET_U8(arg);
|
||||
BmRARE(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XFM_LINES: /* 29 */
|
||||
{
|
||||
I32 arg;
|
||||
BGET_I32(arg);
|
||||
FmLINES(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XIO_LINES: /* 30 */
|
||||
{
|
||||
long arg;
|
||||
BGET_I32(arg);
|
||||
IoLINES(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XIO_PAGE: /* 31 */
|
||||
{
|
||||
long arg;
|
||||
BGET_I32(arg);
|
||||
IoPAGE(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XIO_PAGE_LEN: /* 32 */
|
||||
{
|
||||
long arg;
|
||||
BGET_I32(arg);
|
||||
IoPAGE_LEN(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XIO_LINES_LEFT: /* 33 */
|
||||
{
|
||||
long arg;
|
||||
BGET_I32(arg);
|
||||
IoLINES_LEFT(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XIO_TOP_NAME: /* 34 */
|
||||
{
|
||||
pvcontents arg;
|
||||
BGET_pvcontents(arg);
|
||||
IoTOP_NAME(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XIO_TOP_GV: /* 36 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&IoTOP_GV(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XIO_FMT_NAME: /* 37 */
|
||||
{
|
||||
pvcontents arg;
|
||||
BGET_pvcontents(arg);
|
||||
IoFMT_NAME(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XIO_FMT_GV: /* 38 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&IoFMT_GV(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XIO_BOTTOM_NAME: /* 39 */
|
||||
{
|
||||
pvcontents arg;
|
||||
BGET_pvcontents(arg);
|
||||
IoBOTTOM_NAME(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XIO_BOTTOM_GV: /* 40 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&IoBOTTOM_GV(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XIO_SUBPROCESS: /* 41 */
|
||||
{
|
||||
short arg;
|
||||
BGET_U16(arg);
|
||||
IoSUBPROCESS(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XIO_TYPE: /* 42 */
|
||||
{
|
||||
char arg;
|
||||
BGET_U8(arg);
|
||||
IoTYPE(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XIO_FLAGS: /* 43 */
|
||||
{
|
||||
char arg;
|
||||
BGET_U8(arg);
|
||||
IoFLAGS(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XCV_STASH: /* 44 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&CvSTASH(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XCV_START: /* 45 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
CvSTART(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XCV_ROOT: /* 46 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
CvROOT(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XCV_GV: /* 47 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&CvGV(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XCV_FILEGV: /* 48 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&CvFILEGV(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XCV_DEPTH: /* 49 */
|
||||
{
|
||||
long arg;
|
||||
BGET_I32(arg);
|
||||
CvDEPTH(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XCV_PADLIST: /* 50 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&CvPADLIST(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XCV_OUTSIDE: /* 51 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&CvOUTSIDE(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XCV_FLAGS: /* 52 */
|
||||
{
|
||||
U8 arg;
|
||||
BGET_U8(arg);
|
||||
CvFLAGS(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_AV_EXTEND: /* 53 */
|
||||
{
|
||||
SSize_t arg;
|
||||
BGET_I32(arg);
|
||||
BSET_av_extend(PL_bytecode_sv, arg);
|
||||
break;
|
||||
}
|
||||
case INSN_AV_PUSH: /* 54 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
BSET_av_push(PL_bytecode_sv, arg);
|
||||
break;
|
||||
}
|
||||
case INSN_XAV_FILL: /* 55 */
|
||||
{
|
||||
SSize_t arg;
|
||||
BGET_I32(arg);
|
||||
AvFILLp(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XAV_MAX: /* 56 */
|
||||
{
|
||||
SSize_t arg;
|
||||
BGET_I32(arg);
|
||||
AvMAX(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XAV_FLAGS: /* 57 */
|
||||
{
|
||||
U8 arg;
|
||||
BGET_U8(arg);
|
||||
AvFLAGS(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XHV_RITER: /* 58 */
|
||||
{
|
||||
I32 arg;
|
||||
BGET_I32(arg);
|
||||
HvRITER(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_XHV_NAME: /* 59 */
|
||||
{
|
||||
pvcontents arg;
|
||||
BGET_pvcontents(arg);
|
||||
HvNAME(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_HV_STORE: /* 60 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
BSET_hv_store(PL_bytecode_sv, arg);
|
||||
break;
|
||||
}
|
||||
case INSN_SV_MAGIC: /* 61 */
|
||||
{
|
||||
char arg;
|
||||
BGET_U8(arg);
|
||||
BSET_sv_magic(PL_bytecode_sv, arg);
|
||||
break;
|
||||
}
|
||||
case INSN_MG_OBJ: /* 62 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
SvMAGIC(PL_bytecode_sv)->mg_obj = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_MG_PRIVATE: /* 63 */
|
||||
{
|
||||
U16 arg;
|
||||
BGET_U16(arg);
|
||||
SvMAGIC(PL_bytecode_sv)->mg_private = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_MG_FLAGS: /* 64 */
|
||||
{
|
||||
U8 arg;
|
||||
BGET_U8(arg);
|
||||
SvMAGIC(PL_bytecode_sv)->mg_flags = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_MG_PV: /* 65 */
|
||||
{
|
||||
pvcontents arg;
|
||||
BGET_pvcontents(arg);
|
||||
BSET_mg_pv(SvMAGIC(PL_bytecode_sv), arg);
|
||||
break;
|
||||
}
|
||||
case INSN_XMG_STASH: /* 66 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&SvSTASH(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_GV_FETCHPV: /* 67 */
|
||||
{
|
||||
strconst arg;
|
||||
BGET_strconst(arg);
|
||||
BSET_gv_fetchpv(PL_bytecode_sv, arg);
|
||||
break;
|
||||
}
|
||||
case INSN_GV_STASHPV: /* 68 */
|
||||
{
|
||||
strconst arg;
|
||||
BGET_strconst(arg);
|
||||
BSET_gv_stashpv(PL_bytecode_sv, arg);
|
||||
break;
|
||||
}
|
||||
case INSN_GP_SV: /* 69 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
GvSV(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_GP_REFCNT: /* 70 */
|
||||
{
|
||||
U32 arg;
|
||||
BGET_U32(arg);
|
||||
GvREFCNT(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_GP_REFCNT_ADD: /* 71 */
|
||||
{
|
||||
I32 arg;
|
||||
BGET_I32(arg);
|
||||
BSET_gp_refcnt_add(GvREFCNT(PL_bytecode_sv), arg);
|
||||
break;
|
||||
}
|
||||
case INSN_GP_AV: /* 72 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&GvAV(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_GP_HV: /* 73 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&GvHV(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_GP_CV: /* 74 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&GvCV(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_GP_FILEGV: /* 75 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&GvFILEGV(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_GP_IO: /* 76 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&GvIOp(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_GP_FORM: /* 77 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&GvFORM(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_GP_CVGEN: /* 78 */
|
||||
{
|
||||
U32 arg;
|
||||
BGET_U32(arg);
|
||||
GvCVGEN(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_GP_LINE: /* 79 */
|
||||
{
|
||||
line_t arg;
|
||||
BGET_U16(arg);
|
||||
GvLINE(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_GP_SHARE: /* 80 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
BSET_gp_share(PL_bytecode_sv, arg);
|
||||
break;
|
||||
}
|
||||
case INSN_XGV_FLAGS: /* 81 */
|
||||
{
|
||||
U8 arg;
|
||||
BGET_U8(arg);
|
||||
GvFLAGS(PL_bytecode_sv) = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_NEXT: /* 82 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
PL_op->op_next = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_SIBLING: /* 83 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
PL_op->op_sibling = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_PPADDR: /* 84 */
|
||||
{
|
||||
strconst arg;
|
||||
BGET_strconst(arg);
|
||||
BSET_op_ppaddr(PL_op->op_ppaddr, arg);
|
||||
break;
|
||||
}
|
||||
case INSN_OP_TARG: /* 85 */
|
||||
{
|
||||
PADOFFSET arg;
|
||||
BGET_U32(arg);
|
||||
PL_op->op_targ = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_TYPE: /* 86 */
|
||||
{
|
||||
OPCODE arg;
|
||||
BGET_U16(arg);
|
||||
BSET_op_type(PL_op, arg);
|
||||
break;
|
||||
}
|
||||
case INSN_OP_SEQ: /* 87 */
|
||||
{
|
||||
U16 arg;
|
||||
BGET_U16(arg);
|
||||
PL_op->op_seq = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_FLAGS: /* 88 */
|
||||
{
|
||||
U8 arg;
|
||||
BGET_U8(arg);
|
||||
PL_op->op_flags = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_PRIVATE: /* 89 */
|
||||
{
|
||||
U8 arg;
|
||||
BGET_U8(arg);
|
||||
PL_op->op_private = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_FIRST: /* 90 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
cUNOP->op_first = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_LAST: /* 91 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
cBINOP->op_last = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_OTHER: /* 92 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
cLOGOP->op_other = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_TRUE: /* 93 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
cCONDOP->op_true = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_FALSE: /* 94 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
cCONDOP->op_false = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_CHILDREN: /* 95 */
|
||||
{
|
||||
U32 arg;
|
||||
BGET_U32(arg);
|
||||
cLISTOP->op_children = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_PMREPLROOT: /* 96 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
cPMOP->op_pmreplroot = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_PMREPLROOTGV: /* 97 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&cPMOP->op_pmreplroot = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_PMREPLSTART: /* 98 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
cPMOP->op_pmreplstart = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_PMNEXT: /* 99 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
*(OP**)&cPMOP->op_pmnext = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_PREGCOMP: /* 100 */
|
||||
{
|
||||
pvcontents arg;
|
||||
BGET_pvcontents(arg);
|
||||
BSET_pregcomp(PL_op, arg);
|
||||
break;
|
||||
}
|
||||
case INSN_OP_PMFLAGS: /* 101 */
|
||||
{
|
||||
U16 arg;
|
||||
BGET_U16(arg);
|
||||
cPMOP->op_pmflags = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_PMPERMFLAGS: /* 102 */
|
||||
{
|
||||
U16 arg;
|
||||
BGET_U16(arg);
|
||||
cPMOP->op_pmpermflags = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_SV: /* 103 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
cSVOP->op_sv = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_GV: /* 104 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&cGVOP->op_gv = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_PV: /* 105 */
|
||||
{
|
||||
pvcontents arg;
|
||||
BGET_pvcontents(arg);
|
||||
cPVOP->op_pv = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_PV_TR: /* 106 */
|
||||
{
|
||||
op_tr_array arg;
|
||||
BGET_op_tr_array(arg);
|
||||
cPVOP->op_pv = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_REDOOP: /* 107 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
cLOOP->op_redoop = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_NEXTOP: /* 108 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
cLOOP->op_nextop = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_OP_LASTOP: /* 109 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
cLOOP->op_lastop = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_COP_LABEL: /* 110 */
|
||||
{
|
||||
pvcontents arg;
|
||||
BGET_pvcontents(arg);
|
||||
cCOP->cop_label = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_COP_STASH: /* 111 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&cCOP->cop_stash = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_COP_FILEGV: /* 112 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
*(SV**)&cCOP->cop_filegv = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_COP_SEQ: /* 113 */
|
||||
{
|
||||
U32 arg;
|
||||
BGET_U32(arg);
|
||||
cCOP->cop_seq = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_COP_ARYBASE: /* 114 */
|
||||
{
|
||||
I32 arg;
|
||||
BGET_I32(arg);
|
||||
cCOP->cop_arybase = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_COP_LINE: /* 115 */
|
||||
{
|
||||
line_t arg;
|
||||
BGET_U16(arg);
|
||||
cCOP->cop_line = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_MAIN_START: /* 116 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
PL_main_start = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_MAIN_ROOT: /* 117 */
|
||||
{
|
||||
opindex arg;
|
||||
BGET_opindex(arg);
|
||||
PL_main_root = arg;
|
||||
break;
|
||||
}
|
||||
case INSN_CURPAD: /* 118 */
|
||||
{
|
||||
svindex arg;
|
||||
BGET_svindex(arg);
|
||||
BSET_curpad(PL_curpad, arg);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
croak("Illegal bytecode instruction %d\n", insn);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,184 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 1996-1998 Malcolm Beattie
|
||||
*
|
||||
* You may distribute under the terms of either the GNU General Public
|
||||
* License or the Artistic License, as specified in the README file.
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* This file is autogenerated from bytecode.pl. Changes made here will be lost.
|
||||
*/
|
||||
#ifdef INDIRECT_BGET_MACROS
|
||||
struct bytestream {
|
||||
void *data;
|
||||
int (*fgetc)(void *);
|
||||
int (*fread)(char *, size_t, size_t, void*);
|
||||
void (*freadpv)(U32, void*);
|
||||
};
|
||||
#endif /* INDIRECT_BGET_MACROS */
|
||||
|
||||
void *bset_obj_store _((void *, I32));
|
||||
|
||||
enum {
|
||||
INSN_RET, /* 0 */
|
||||
INSN_LDSV, /* 1 */
|
||||
INSN_LDOP, /* 2 */
|
||||
INSN_STSV, /* 3 */
|
||||
INSN_STOP, /* 4 */
|
||||
INSN_LDSPECSV, /* 5 */
|
||||
INSN_NEWSV, /* 6 */
|
||||
INSN_NEWOP, /* 7 */
|
||||
INSN_NEWOPN, /* 8 */
|
||||
INSN_NEWPV, /* 9 */
|
||||
INSN_NOP, /* 10 */
|
||||
INSN_PV_CUR, /* 11 */
|
||||
INSN_PV_FREE, /* 12 */
|
||||
INSN_SV_UPGRADE, /* 13 */
|
||||
INSN_SV_REFCNT, /* 14 */
|
||||
INSN_SV_REFCNT_ADD, /* 15 */
|
||||
INSN_SV_FLAGS, /* 16 */
|
||||
INSN_XRV, /* 17 */
|
||||
INSN_XPV, /* 18 */
|
||||
INSN_XIV32, /* 19 */
|
||||
INSN_XIV64, /* 20 */
|
||||
INSN_XNV, /* 21 */
|
||||
INSN_XLV_TARGOFF, /* 22 */
|
||||
INSN_XLV_TARGLEN, /* 23 */
|
||||
INSN_XLV_TARG, /* 24 */
|
||||
INSN_XLV_TYPE, /* 25 */
|
||||
INSN_XBM_USEFUL, /* 26 */
|
||||
INSN_XBM_PREVIOUS, /* 27 */
|
||||
INSN_XBM_RARE, /* 28 */
|
||||
INSN_XFM_LINES, /* 29 */
|
||||
INSN_XIO_LINES, /* 30 */
|
||||
INSN_XIO_PAGE, /* 31 */
|
||||
INSN_XIO_PAGE_LEN, /* 32 */
|
||||
INSN_XIO_LINES_LEFT, /* 33 */
|
||||
INSN_XIO_TOP_NAME, /* 34 */
|
||||
INSN_COMMENT, /* 35 */
|
||||
INSN_XIO_TOP_GV, /* 36 */
|
||||
INSN_XIO_FMT_NAME, /* 37 */
|
||||
INSN_XIO_FMT_GV, /* 38 */
|
||||
INSN_XIO_BOTTOM_NAME, /* 39 */
|
||||
INSN_XIO_BOTTOM_GV, /* 40 */
|
||||
INSN_XIO_SUBPROCESS, /* 41 */
|
||||
INSN_XIO_TYPE, /* 42 */
|
||||
INSN_XIO_FLAGS, /* 43 */
|
||||
INSN_XCV_STASH, /* 44 */
|
||||
INSN_XCV_START, /* 45 */
|
||||
INSN_XCV_ROOT, /* 46 */
|
||||
INSN_XCV_GV, /* 47 */
|
||||
INSN_XCV_FILEGV, /* 48 */
|
||||
INSN_XCV_DEPTH, /* 49 */
|
||||
INSN_XCV_PADLIST, /* 50 */
|
||||
INSN_XCV_OUTSIDE, /* 51 */
|
||||
INSN_XCV_FLAGS, /* 52 */
|
||||
INSN_AV_EXTEND, /* 53 */
|
||||
INSN_AV_PUSH, /* 54 */
|
||||
INSN_XAV_FILL, /* 55 */
|
||||
INSN_XAV_MAX, /* 56 */
|
||||
INSN_XAV_FLAGS, /* 57 */
|
||||
INSN_XHV_RITER, /* 58 */
|
||||
INSN_XHV_NAME, /* 59 */
|
||||
INSN_HV_STORE, /* 60 */
|
||||
INSN_SV_MAGIC, /* 61 */
|
||||
INSN_MG_OBJ, /* 62 */
|
||||
INSN_MG_PRIVATE, /* 63 */
|
||||
INSN_MG_FLAGS, /* 64 */
|
||||
INSN_MG_PV, /* 65 */
|
||||
INSN_XMG_STASH, /* 66 */
|
||||
INSN_GV_FETCHPV, /* 67 */
|
||||
INSN_GV_STASHPV, /* 68 */
|
||||
INSN_GP_SV, /* 69 */
|
||||
INSN_GP_REFCNT, /* 70 */
|
||||
INSN_GP_REFCNT_ADD, /* 71 */
|
||||
INSN_GP_AV, /* 72 */
|
||||
INSN_GP_HV, /* 73 */
|
||||
INSN_GP_CV, /* 74 */
|
||||
INSN_GP_FILEGV, /* 75 */
|
||||
INSN_GP_IO, /* 76 */
|
||||
INSN_GP_FORM, /* 77 */
|
||||
INSN_GP_CVGEN, /* 78 */
|
||||
INSN_GP_LINE, /* 79 */
|
||||
INSN_GP_SHARE, /* 80 */
|
||||
INSN_XGV_FLAGS, /* 81 */
|
||||
INSN_OP_NEXT, /* 82 */
|
||||
INSN_OP_SIBLING, /* 83 */
|
||||
INSN_OP_PPADDR, /* 84 */
|
||||
INSN_OP_TARG, /* 85 */
|
||||
INSN_OP_TYPE, /* 86 */
|
||||
INSN_OP_SEQ, /* 87 */
|
||||
INSN_OP_FLAGS, /* 88 */
|
||||
INSN_OP_PRIVATE, /* 89 */
|
||||
INSN_OP_FIRST, /* 90 */
|
||||
INSN_OP_LAST, /* 91 */
|
||||
INSN_OP_OTHER, /* 92 */
|
||||
INSN_OP_TRUE, /* 93 */
|
||||
INSN_OP_FALSE, /* 94 */
|
||||
INSN_OP_CHILDREN, /* 95 */
|
||||
INSN_OP_PMREPLROOT, /* 96 */
|
||||
INSN_OP_PMREPLROOTGV, /* 97 */
|
||||
INSN_OP_PMREPLSTART, /* 98 */
|
||||
INSN_OP_PMNEXT, /* 99 */
|
||||
INSN_PREGCOMP, /* 100 */
|
||||
INSN_OP_PMFLAGS, /* 101 */
|
||||
INSN_OP_PMPERMFLAGS, /* 102 */
|
||||
INSN_OP_SV, /* 103 */
|
||||
INSN_OP_GV, /* 104 */
|
||||
INSN_OP_PV, /* 105 */
|
||||
INSN_OP_PV_TR, /* 106 */
|
||||
INSN_OP_REDOOP, /* 107 */
|
||||
INSN_OP_NEXTOP, /* 108 */
|
||||
INSN_OP_LASTOP, /* 109 */
|
||||
INSN_COP_LABEL, /* 110 */
|
||||
INSN_COP_STASH, /* 111 */
|
||||
INSN_COP_FILEGV, /* 112 */
|
||||
INSN_COP_SEQ, /* 113 */
|
||||
INSN_COP_ARYBASE, /* 114 */
|
||||
INSN_COP_LINE, /* 115 */
|
||||
INSN_MAIN_START, /* 116 */
|
||||
INSN_MAIN_ROOT, /* 117 */
|
||||
INSN_CURPAD, /* 118 */
|
||||
MAX_INSN = 118
|
||||
};
|
||||
|
||||
enum {
|
||||
OPt_OP, /* 0 */
|
||||
OPt_UNOP, /* 1 */
|
||||
OPt_BINOP, /* 2 */
|
||||
OPt_LOGOP, /* 3 */
|
||||
OPt_CONDOP, /* 4 */
|
||||
OPt_LISTOP, /* 5 */
|
||||
OPt_PMOP, /* 6 */
|
||||
OPt_SVOP, /* 7 */
|
||||
OPt_GVOP, /* 8 */
|
||||
OPt_PVOP, /* 9 */
|
||||
OPt_LOOP, /* 10 */
|
||||
OPt_COP /* 11 */
|
||||
};
|
||||
|
||||
EXT int optype_size[]
|
||||
#ifdef DOINIT
|
||||
= {
|
||||
sizeof(OP),
|
||||
sizeof(UNOP),
|
||||
sizeof(BINOP),
|
||||
sizeof(LOGOP),
|
||||
sizeof(CONDOP),
|
||||
sizeof(LISTOP),
|
||||
sizeof(PMOP),
|
||||
sizeof(SVOP),
|
||||
sizeof(GVOP),
|
||||
sizeof(PVOP),
|
||||
sizeof(LOOP),
|
||||
sizeof(COP)
|
||||
}
|
||||
#endif /* DOINIT */
|
||||
;
|
||||
|
||||
#define INIT_SPECIALSV_LIST STMT_START { \
|
||||
PL_specialsv_list[0] = Nullsv; \
|
||||
PL_specialsv_list[1] = &PL_sv_undef; \
|
||||
PL_specialsv_list[2] = &PL_sv_yes; \
|
||||
PL_specialsv_list[3] = &PL_sv_no; \
|
||||
} STMT_END
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
#include "EXTERN.h"
|
||||
#define PERL_IN_EBCDIC_C
|
||||
#include "perl.h"
|
||||
|
||||
/* in ASCII order, not that it matters */
|
||||
static const char controllablechars[] = "?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_";
|
||||
|
||||
int
|
||||
ebcdic_control(int ch)
|
||||
{
|
||||
if (ch > 'a') {
|
||||
char *ctlp;
|
||||
|
||||
if (islower(ch))
|
||||
ch = toupper(ch);
|
||||
|
||||
if ((ctlp = strchr(controllablechars, ch)) == 0) {
|
||||
Perl_die(aTHX_ "unrecognised control character '%c'\n", ch);
|
||||
}
|
||||
|
||||
if (ctlp == controllablechars)
|
||||
return('\177'); /* DEL */
|
||||
else
|
||||
return((unsigned char)(ctlp - controllablechars - 1));
|
||||
} else { /* Want uncontrol */
|
||||
if (ch == '\177' || ch == -1)
|
||||
return('?');
|
||||
else if (ch == '\157')
|
||||
return('\177');
|
||||
else if (ch == '\174')
|
||||
return('\000');
|
||||
else if (ch == '^') /* '\137' in 1047, '\260' in 819 */
|
||||
return('\036');
|
||||
else if (ch == '\155')
|
||||
return('\037');
|
||||
else if (0 < ch && ch < (sizeof(controllablechars) - 1))
|
||||
return(controllablechars[ch+1]);
|
||||
else
|
||||
Perl_die(aTHX_ "invalid control request: '\\%03o'\n", ch & 0xFF);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
begin 444 dna.small.gif
|
||||
M1TE&.#=A)0`J`.<``+9%&Y<R0M<F'ID\,!<07%<G1:P<0Q`A2Q`P;"L9/L$:
|
||||
M,"480N5"&RL7:4LD0T,G144[7BHL2B4?3\0I+"</)BQ.9KD0/S878\96$Z\@
|
||||
M(:\1*RL:3L0W&QL?2#4?9>@_&A$_5<I"&C`A3*,3-A`//9X<)\@Q(L`@.#\E
|
||||
M7K,R*R\T6)H++1L72T8=4207:T`G=JX..MD^&!$_;^)2$#T=7S`79AL7.A$3
|
||||
M1-=%#^,Q&QT_:C8=1!L86]\R#4M":4H76R,515HZ4"477G@T,J\;(X(@/$\7
|
||||
M."4A2N9;$"DZ6RL34-8I$34A73P86I84/\87%1`0/V,B2"0<0N!(%QPH91<6
|
||||
M2=!5$3(=73(E23`/,!L4.=$Z'-MH%>`Y#3$=2"=#59M((H88,GP\/]X^&+$R
|
||||
M$"(79"DF33(93"$86=%;&"T4/=Y"&\\A$Q4Z4!`62*T4-Q4B9+X1*BH96SP?
|
||||
M1<0D/3(F<-TM$!`=5:H.(!<64C$W?#8J3*`S(S<@3=8V%K$](QT.6Q`43AL4
|
||||
M1:$D,;<0,\X9&,8])\@=$A(U244S5U,D6Q<V;]\I&&<K/8!*.R044>=/#YH>
|
||||
M08$I1B,09S$35R(:4C0?<19$7<D^#Q`>5!()-;4702M`=;56)A`25,0K%"X<
|
||||
M83`N>K`H'HDS*1`40,M&%!<@7M,_$A<N2L)%%18E4^<M$A@=5=0Q$Q`E311*
|
||||
M2L8E&2D<7Q\A7P\80B48,%E/8[1-'J4/-"H<3"PA1$,T?Q<15R44,R,A4AL/
|
||||
M,^M4%2,07!L+,[\[&!P4520I:C(9.=54$[,2/M-)&RP?7M=(%1$J8<-,%2H@
|
||||
M4B,=51436^]2"!X<1A<44RD</>E+#%0>0S0/:4PJ9I,F-6DG420Y<"@09R,0
|
||||
M-V$R/R4M<:\H0!(H410Z:AT27&4Q9"L@;=1%(MA-$M5+#RL4+M8Z&AT<7[<:
|
||||
M(-QA&2,36R$++B(84!0:5ALO:K$A.]X?&!$84V@;/SX<6Q`;2$(B2QD21W4J
|
||||
M1=TW&@```````````````"P`````)0`J```(_@!]:(N'18\W%15T$1N'C)V?
|
||||
M0_HH,<$G9YBX!C6<3;+T@AZ-)K@\O*"!KP^$>"KVA`L3*8P3)^5ZA)@B:AH+
|
||||
M9];F7.$Q+!`!0=*<E3'5K(:EHS2N%"AP*Y(\&##H6(!A:!XU99B*H?%4IDF?
|
||||
M!8'<"-F%9I*TH8A83:*TXYD!J83D$0ICI-NE(:O8I6&FJ$64$M5$M%!3PU,F
|
||||
M2UJD"9I41E824WT2G?BV-!$(!`=,+<IF!P>.%",&P7J"9XB82L5,48F5K,:"
|
||||
M'94FU='6;!*R3T->E"%&95DR"`/6P,I0PDF)0SG8($$RJN0R`FI(H7$A2]VD
|
||||
M*^^L_6(T3U*V%XH"_AB:HDS8H$AO5@R:P,8.I%^.:*AC(>Z!'":6RC`1L@W-
|
||||
M%1Q/,%(.'5+1`<D^74R@P2#?T*'/$"%@\(L5Y?RAB!SO3#*,-6CL44\4]C1#
|
||||
MR0Q3C&&"!AH08@(#:Y2C@`&1---,.#)\T84=R##`0",H++8#)34,@X80R:"`
|
||||
M0A<]?'#.!";`TDH.8QBB0354A!,*)WI0\<D\YJRQ3PE[V",(.D#48$T9GO22
|
||||
MA0.BC,)'*]3TP,`^\_#QA0P@>`/"*]=<HX\3"C!BAQV%5",$+Z0,0X,UL3SB
|
||||
M#B[NN$'/,A&,$L,Y[-BASR(@<**("E^,0(<&;[QA0@^,3%",#2S8H,01_LX0
|
||||
M`(0:W%`@13#TN+'#&LK@0$T0VER##50*Q/%-%%&H$`0#K7"`!B^X/`),()F0
|
||||
M0PNT[K#BRBS1-!("`^=,$8`D="B`QRW?1**+-I?(X$@(L(R2AQ8+Y,*#-*YX
|
||||
MH(00'1Q!CSI,U'!%)^_%4(X&FUB@01$.@*!#$I?4D48I&1BA!2*HD%))(.+T
|
||||
MYTEOT3B#PB/U4(,$%QD0(<\QX^CRBC=)@%`!&+:<<TH&M*C1"RJX'-'.'`YX
|
||||
M<H0@<)#"0CX+I%`*-%:4L@XFS`#[11M?U-))"&RP84LWZL!A1A^YH.*)!)3<
|
||||
MHXX6L]P3"!I`H/!`*>90`PD.F'3SR@-AG)`&_A=3'"**#[J(P<<I@YCA2@32
|
||||
M!,*+Q9H`(XT2'O2RS"CGS.U9!K>0^C0&S/#1""(ZI)'&*6,,$842N%Q!@3NK
|
||||
M"R'%%4KP0D(Q?"`S!3)<I#!!".68$T(IMHP#>BVE(/$+)#-80<PTLBRP^@$>
|
||||
M<+,`-[QH$LP+0_P!1C>=S("!,N>8XP<8H6131!B;3`#&#)"DTH(L5#P0S#W+
|
||||
MQ)*`$K1HHD4^;E!2QP%:B``&4H$,/Y2C$Y*(1%0(00A)@```77B"*$0@#3>P
|
||||
MP&PU4`,^H!","P!!$')0P^H6((I5L"$'.;``';[Q!@-\PP"<B$<]EG"(#*C"
|
||||
M%-(@0":\L0U?D&`#_L50@33.(`4M4``=&4@'+-9!!P9JP`#9T$4H=*$+!#1B
|
||||
M'3A(`SYH`81'B.,(XJ@"":0(CDRPH@/<"$88V+"%$N#A&)MPX0N2H`L]C&,<
|
||||
MEW"$%6:0BCV@XPIH>$0?)M$`<92!%OG8Q3#@(`U2C*)%9-!`&`K`!!EP0@80
|
||||
M2,0M;I$.:"C#"D.@P#UJ``]GT"*,K%B&*0+!@TFH8VV*0$(:_/`)?7@#'.'0
|
||||
M@R[H8``\:&`,=NC"*"B@!2TTHP5]N((TEH&`<)B"!PU`0RQ(P8MNS``9K6@%
|
||||
M'W31AG%$(BZ2&((PA-&#'I"A&`F8!DD\\`H6-,.,X'B'%,+R#FX4`PS&_L!$
|
||||
M.4R0#7W<0@%O2,07$($#9@C3"%C8P!5H88\]J$,"-E!;(.X@C5T<`!65V,40
|
||||
M,'&(0C!"`1JP@"3TH`T9=&,5JRC$-]+1`U%TP@@[^,$>Z$&*0%1A%XFK`BFD
|
||||
MX0L6Y"(#A_A$#[JPC@%\@1@02`(SJ#&&.`A@'\&$!AALX(4Y="`/TA"",UA!
|
||||
M@%W<8!*\$`$@C%""+G1A"9AP!"<>9@ME*)$0F\C!$I8`B3\TP@%'@$(QH$`"
|
||||
M)8@#'(B0ACB`P`,@%&,'9"##)S`1!&)\`0)^&,,^+$`("QC"#D\X!":HX0!<
|
||||
ML(`&-O!%,&H@BS#F0AI'`!LO^"`,/OS!%KJ0_H0HEA`E27Q#%T%X0"%"@`1E
|
||||
M2,`!:F!%+Q#A!G)40A!HP`4OFK`#-13#`?I(QCW38(Q/9&``%0#!);01BE>$
|
||||
M@!TZNL81$G`!-]2!&&5@A1N&T0Q<,$$$%*!``BR1A5$PPPH<74$%]*`#$.RA
|
||||
M`(VP@#`X$(`7``(%T=@`.5Q`C@:0`P[)D$4'$H`."MB#"908Q=X@,01B9$(7
|
||||
MG'A%`#8!"QSL@PUAL,0==M"")CQCP4)0QQUDP806H&,!T]A!`EH@AC2P`P,^
|
||||
MT`,*NN%-&&T!&L@X!!Y^<(4.D(,%E>A`,T20C#IXL`6-:,`5F+"#!W"@'%OH
|
||||
MA`IJ$5(#;`(;AV/'FA103(EV+(,>GHB&&ZJ`!D'<X0[-N$(N@)$+4$C@`<(`
|
||||
M$(&/<8Q;7$,1UT"``+>P!57`X1F9D`4<W$`"4MP@$ZYX\B-"004Y2$`.HT@%
|
||||
M)@IAB#><0!]FB(<I.(&`(7P"%GPPQ3)F`0YB0"$0@8"")L!Q!RH`8A&AL,8L
|
||||
BR!$$,@@#&5OX!1V.\85XA.,.,A##!T2!AP@LXP#;"`@`.P``
|
||||
end
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
begin 444 wilogo.gif
|
||||
M1TE&.#=A7@!$`(```'X2F?___RP`````7@!$```"_D2.J<#MKF)ZU,A3,[OO
|
||||
M(IUY']A%9"6AW$F)+#2]Y:BNLF6_\;WMH<?#I72^VP+D"@*)F&"O25KRDM&B
|
||||
M[%C-7;4_J)*6'4ZE&O`W8"1OQ5UGPWRBIKDPM!MW9J]-[;LUKL;$5W.'YQ3(
|
||||
M(O<&-^>F*(A55\BX%UEI^;<VB0BH1RFX2=<IELE4^*0'N?-I>OJ8N%(*Z^4G
|
||||
M.OJJ>8HZ.(>;JRMD><E[!KQHB^3;:APL6Z8\RKPK/)O:*-WLW&7]*\UYR]J)
|
||||
M?<P=1MR-_6VN76,WGAV^32W^3CZ_SCY3;W__C-R^CU^\%M#T!9PVL(ZZ&>X"
|
||||
M%A1XSM]!A?T8/C0T$1XMJG\B&G+,"-&C/(VS0(842;`)M'S>_OE8F#"=2S#*
|
||||
M8LHLAS'D1Y,42UGY9O,F-T:X@@JEE@D1RW>/D@8R.DZ-+*E0CQ:9JJ5JU!SQ
|
||||
MR&BU2D.;E*4'ER0TNY%G2A/Y.G[=VG%81+5K_UG$21<A6;=YP9'5B++O7:@7
|
||||
M\]J5]]?DX7:)%<]5%=B/55>-GQW55;$8L\RW6J8-9>QM7<^A/SMZK!ESY$,+
|
||||
(KPA.EJ```#L`
|
||||
end
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
#include "EXTERN.h"
|
||||
#include "perl.h"
|
||||
#ifndef PATCHLEVEL
|
||||
#include "patchlevel.h"
|
||||
#endif
|
||||
|
||||
static void xs_init _((void));
|
||||
static PerlInterpreter *my_perl;
|
||||
|
||||
int
|
||||
#ifndef CAN_PROTOTYPE
|
||||
main(argc, argv, env)
|
||||
int argc;
|
||||
char **argv;
|
||||
char **env;
|
||||
#else /* def(CAN_PROTOTYPE) */
|
||||
main(int argc, char **argv, char **env)
|
||||
#endif /* def(CAN_PROTOTYPE) */
|
||||
{
|
||||
int exitstatus;
|
||||
int i;
|
||||
char **fakeargv;
|
||||
FILE *fp;
|
||||
#ifdef INDIRECT_BGET_MACROS
|
||||
struct bytestream bs;
|
||||
#endif /* INDIRECT_BGET_MACROS */
|
||||
|
||||
INIT_SPECIALSV_LIST;
|
||||
PERL_SYS_INIT(&argc,&argv);
|
||||
|
||||
#if PATCHLEVEL > 3 || (PATCHLEVEL == 3 && SUBVERSION >= 1)
|
||||
perl_init_i18nl10n(1);
|
||||
#else
|
||||
perl_init_i18nl14n(1);
|
||||
#endif
|
||||
|
||||
if (!PL_do_undump) {
|
||||
my_perl = perl_alloc();
|
||||
if (!my_perl)
|
||||
#ifdef VMS
|
||||
exit(vaxc$errno);
|
||||
#else
|
||||
exit(1);
|
||||
#endif
|
||||
perl_construct( my_perl );
|
||||
}
|
||||
|
||||
#ifdef CSH
|
||||
if (!PL_cshlen)
|
||||
PL_cshlen = strlen(PL_cshname);
|
||||
#endif
|
||||
|
||||
if (argc < 2)
|
||||
fp = stdin;
|
||||
else {
|
||||
#ifdef WIN32
|
||||
fp = fopen(argv[1], "rb");
|
||||
#else
|
||||
fp = fopen(argv[1], "r");
|
||||
#endif
|
||||
if (!fp) {
|
||||
perror(argv[1]);
|
||||
#ifdef VMS
|
||||
exit(vaxc$errno);
|
||||
#else
|
||||
exit(1);
|
||||
#endif
|
||||
}
|
||||
argv++;
|
||||
argc--;
|
||||
}
|
||||
New(666, fakeargv, argc + 4, char *);
|
||||
fakeargv[0] = argv[0];
|
||||
fakeargv[1] = "-e";
|
||||
fakeargv[2] = "";
|
||||
fakeargv[3] = "--";
|
||||
for (i = 1; i < argc; i++)
|
||||
fakeargv[i + 3] = argv[i];
|
||||
fakeargv[argc + 3] = 0;
|
||||
|
||||
exitstatus = perl_parse(my_perl, xs_init, argc + 3, fakeargv, NULL);
|
||||
if (exitstatus)
|
||||
exit( exitstatus );
|
||||
|
||||
sv_setpv(GvSV(gv_fetchpv("0", TRUE, SVt_PV)), argv[0]);
|
||||
PL_main_cv = PL_compcv;
|
||||
PL_compcv = 0;
|
||||
|
||||
#ifdef INDIRECT_BGET_MACROS
|
||||
bs.data = fp;
|
||||
bs.fgetc = (int(*) _((void*)))fgetc;
|
||||
bs.fread = (int(*) _((char*,size_t,size_t,void*)))fread;
|
||||
bs.freadpv = freadpv;
|
||||
byterun(bs);
|
||||
#else
|
||||
byterun(fp);
|
||||
#endif /* INDIRECT_BGET_MACROS */
|
||||
|
||||
exitstatus = perl_run( my_perl );
|
||||
|
||||
perl_destruct( my_perl );
|
||||
perl_free( my_perl );
|
||||
|
||||
exit( exitstatus );
|
||||
}
|
||||
|
||||
static void
|
||||
xs_init()
|
||||
{
|
||||
}
|
||||
|
|
@ -1,153 +0,0 @@
|
|||
/* dl_cygwin32.xs
|
||||
*
|
||||
* Platform: Win32 (Windows NT/Windows 95)
|
||||
* Author: Wei-Yuen Tan (wyt@hip.com)
|
||||
* Created: A warm day in June, 1995
|
||||
*
|
||||
* Modified:
|
||||
* August 23rd 1995 - rewritten after losing everything when I
|
||||
* wiped off my NT partition (eek!)
|
||||
*/
|
||||
/* Modified from the original dl_win32.xs to work with cygwin32
|
||||
-John Cerney 3/26/97
|
||||
*/
|
||||
/* Porting notes:
|
||||
|
||||
I merely took Paul's dl_dlopen.xs, took out extraneous stuff and
|
||||
replaced the appropriate SunOS calls with the corresponding Win32
|
||||
calls.
|
||||
|
||||
*/
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
// Defines from windows needed for this function only. Can't include full
|
||||
// Cygwin32 windows headers because of problems with CONTEXT redefinition
|
||||
// Removed logic to tell not dynamically load static modules. It is assumed that all
|
||||
// modules are dynamically built. This should be similar to the behavoir on sunOS.
|
||||
// Leaving in the logic would have required changes to the standard perlmain.c code
|
||||
//
|
||||
// // Includes call a dll function to initialize it's impure_ptr.
|
||||
#include <stdio.h>
|
||||
void (*impure_setupptr)(struct _reent *); // pointer to the impure_setup routine
|
||||
|
||||
//#include <windows.h>
|
||||
#define LOAD_WITH_ALTERED_SEARCH_PATH (8)
|
||||
typedef void *HANDLE;
|
||||
typedef HANDLE HINSTANCE;
|
||||
#define STDCALL __attribute__ ((stdcall))
|
||||
typedef int STDCALL (*FARPROC)();
|
||||
|
||||
HINSTANCE
|
||||
STDCALL
|
||||
LoadLibraryExA(
|
||||
char* lpLibFileName,
|
||||
HANDLE hFile,
|
||||
unsigned int dwFlags
|
||||
);
|
||||
unsigned int
|
||||
STDCALL
|
||||
GetLastError(
|
||||
void
|
||||
);
|
||||
FARPROC
|
||||
STDCALL
|
||||
GetProcAddress(
|
||||
HINSTANCE hModule,
|
||||
char* lpProcName
|
||||
);
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "EXTERN.h"
|
||||
#include "perl.h"
|
||||
#include "XSUB.h"
|
||||
|
||||
#include "dlutils.c" /* SaveError() etc */
|
||||
|
||||
static void
|
||||
dl_private_init()
|
||||
{
|
||||
(void)dl_generic_private_init();
|
||||
}
|
||||
|
||||
|
||||
MODULE = DynaLoader PACKAGE = DynaLoader
|
||||
|
||||
BOOT:
|
||||
(void)dl_private_init();
|
||||
|
||||
void *
|
||||
dl_load_file(filename,flags=0)
|
||||
char * filename
|
||||
int flags
|
||||
PREINIT:
|
||||
CODE:
|
||||
DLDEBUG(1,PerlIO_printf(PerlIO_stderr(),"dl_load_file(%s):\n", filename));
|
||||
|
||||
RETVAL = (void*) LoadLibraryExA(filename, NULL, LOAD_WITH_ALTERED_SEARCH_PATH ) ;
|
||||
|
||||
DLDEBUG(2,PerlIO_printf(PerlIO_stderr()," libref=%x\n", RETVAL));
|
||||
ST(0) = sv_newmortal() ;
|
||||
if (RETVAL == NULL){
|
||||
SaveError("%d",GetLastError()) ;
|
||||
}
|
||||
else{
|
||||
// setup the dll's impure_ptr:
|
||||
impure_setupptr = GetProcAddress(RETVAL, "impure_setup");
|
||||
if( impure_setupptr == NULL){
|
||||
printf(
|
||||
"Cygwin32 dynaloader error: could not load impure_setup symbol\n");
|
||||
RETVAL = NULL;
|
||||
}
|
||||
else{
|
||||
// setup the DLLs impure_ptr:
|
||||
(*impure_setupptr)(_impure_ptr);
|
||||
sv_setiv( ST(0), (IV)RETVAL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void *
|
||||
dl_find_symbol(libhandle, symbolname)
|
||||
void * libhandle
|
||||
char * symbolname
|
||||
CODE:
|
||||
DLDEBUG(2,PerlIO_printf(PerlIO_stderr(),"dl_find_symbol(handle=%x, symbol=%s)\n",
|
||||
libhandle, symbolname));
|
||||
RETVAL = (void*) GetProcAddress((HINSTANCE) libhandle, symbolname);
|
||||
DLDEBUG(2,PerlIO_printf(PerlIO_stderr()," symbolref = %x\n", RETVAL));
|
||||
ST(0) = sv_newmortal() ;
|
||||
if (RETVAL == NULL)
|
||||
SaveError("%d",GetLastError()) ;
|
||||
else
|
||||
sv_setiv( ST(0), (IV)RETVAL);
|
||||
|
||||
|
||||
void
|
||||
dl_undef_symbols()
|
||||
PPCODE:
|
||||
|
||||
|
||||
|
||||
# These functions should not need changing on any platform:
|
||||
|
||||
void
|
||||
dl_install_xsub(perl_name, symref, filename="$Package")
|
||||
char * perl_name
|
||||
void * symref
|
||||
char * filename
|
||||
CODE:
|
||||
DLDEBUG(2,PerlIO_printf(PerlIO_stderr(),"dl_install_xsub(name=%s, symref=%x)\n",
|
||||
perl_name, symref));
|
||||
ST(0)=sv_2mortal(newRV((SV*)newXS(perl_name, (void(*)())symref, filename)));
|
||||
|
||||
|
||||
char *
|
||||
dl_error()
|
||||
CODE:
|
||||
RETVAL = LastError ;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
# end.
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
#! /bin/sh
|
||||
# cygwin32.sh - hintsfile for building perl on Windows NT using the
|
||||
# Cygnus Win32 Development Kit.
|
||||
# See "http://www.cygnus.com/misc/gnu-win32/" to learn about the kit.
|
||||
#
|
||||
path_sep=\;
|
||||
exe_ext='.exe'
|
||||
firstmakefile='GNUmakefile'
|
||||
if test -f $sh.exe; then sh=$sh.exe; fi
|
||||
startsh="#!$sh"
|
||||
cc='gcc2'
|
||||
ld='ld2'
|
||||
usrinc='/gnuwin32/H-i386-cygwin32/i386-cygwin32/include'
|
||||
libpth='/gnuwin32/H-i386-cygwin32/i386-cygwin32/lib /gnuwin32/H-i386-cygwin32/lib'
|
||||
libs='-lcygwin -lm -lc -lkernel32'
|
||||
# dynamic lib stuff
|
||||
so='dll'
|
||||
#i_dlfcn='define'
|
||||
dlsrc='dl_cygwin32.xs'
|
||||
usedl='y'
|
||||
# flag to include the perl.exe export variable translation file cw32imp.h
|
||||
# when building extension libs
|
||||
cccdlflags='-DCYGWIN32 -DDLLIMPORT '
|
||||
# flag that signals gcc2 to build exportable perl
|
||||
ccdlflags='-buildperl '
|
||||
lddlflags='-L../.. -L/gnuwin32/H-i386-cygwin32/i386-cygwin32/lib -lperlexp -lcygwin'
|
||||
d_voidsig='undef'
|
||||
extensions='Fcntl IO Opcode SDBM_File'
|
||||
lns='cp'
|
||||
signal_t='int'
|
||||
useposix='false'
|
||||
rd_nodata='0'
|
||||
eagain='EAGAIN'
|
||||
archname='cygwin32'
|
||||
#
|
||||
|
||||
installbin='/usr/local/bin'
|
||||
installman1dir=''
|
||||
installman3dir=''
|
||||
installprivlib='/usr/local/lib/perl5'
|
||||
installscript='/usr/local/bin'
|
||||
|
||||
installsitelib='/usr/local/lib/perl5/site_perl'
|
||||
libc='/gnuwin32/H-i386-cygwin32/i386-cygwin32/lib/libc.a'
|
||||
|
||||
perlpath='/usr/local/bin/perl'
|
||||
|
||||
sitelib='/usr/local/lib/perl5/site_perl'
|
||||
sitelibexp='/usr/local/lib/perl5/site_perl'
|
||||
usrinc='/gnuwin32/H-i386-cygwin32/i386-cygwin32/include'
|
||||
|
|
@ -1,211 +0,0 @@
|
|||
Argv
|
||||
Cmd
|
||||
DBcv
|
||||
DBgv
|
||||
DBline
|
||||
DBsignal
|
||||
DBsingle
|
||||
DBsub
|
||||
DBtrace
|
||||
ampergv
|
||||
archpat_auto
|
||||
argvgv
|
||||
argvoutgv
|
||||
basetime
|
||||
beginav
|
||||
bodytarget
|
||||
bostr
|
||||
cddir
|
||||
chopset
|
||||
colors
|
||||
colorset
|
||||
compcv
|
||||
compiling
|
||||
comppad
|
||||
comppad_name
|
||||
comppad_name_fill
|
||||
comppad_name_floor
|
||||
copline
|
||||
curcop
|
||||
curcopdb
|
||||
curpm
|
||||
curstack
|
||||
curstash
|
||||
curstname
|
||||
dbargs
|
||||
debdelim
|
||||
debname
|
||||
debstash
|
||||
defgv
|
||||
defoutgv
|
||||
defstash
|
||||
delaymagic
|
||||
diehook
|
||||
dirty
|
||||
dlevel
|
||||
dlmax
|
||||
doextract
|
||||
doswitches
|
||||
dowarn
|
||||
dumplvl
|
||||
e_script
|
||||
endav
|
||||
envgv
|
||||
errgv
|
||||
eval_root
|
||||
eval_start
|
||||
exitlist
|
||||
exitlistlen
|
||||
extralen
|
||||
fdpid
|
||||
filemode
|
||||
firstgv
|
||||
forkprocess
|
||||
formfeed
|
||||
formtarget
|
||||
generation
|
||||
gensym
|
||||
globalstash
|
||||
hintgv
|
||||
in_clean_all
|
||||
in_clean_objs
|
||||
in_eval
|
||||
incgv
|
||||
initav
|
||||
inplace
|
||||
bytecode_iv_overflows
|
||||
sys_intern
|
||||
last_in_gv
|
||||
last_proto
|
||||
lastfd
|
||||
lastgotoprobe
|
||||
lastscream
|
||||
lastsize
|
||||
lastspbase
|
||||
laststatval
|
||||
laststype
|
||||
leftgv
|
||||
lineary
|
||||
linestart
|
||||
localizing
|
||||
localpatches
|
||||
main_cv
|
||||
main_root
|
||||
main_start
|
||||
mainstack
|
||||
maxscream
|
||||
maxsysfd
|
||||
mess_sv
|
||||
minus_F
|
||||
minus_a
|
||||
minus_c
|
||||
minus_l
|
||||
minus_n
|
||||
minus_p
|
||||
modglobal
|
||||
modcount
|
||||
multiline
|
||||
mystrk
|
||||
nrs
|
||||
bytecode_obj_list
|
||||
bytecode_obj_list_fill
|
||||
ofmt
|
||||
ofs
|
||||
ofslen
|
||||
oldlastpm
|
||||
oldname
|
||||
op_mask
|
||||
origargc
|
||||
origargv
|
||||
origfilename
|
||||
ors
|
||||
orslen
|
||||
parsehook
|
||||
patchlevel
|
||||
pending_ident
|
||||
perldb
|
||||
perl_destruct_level
|
||||
preambled
|
||||
preambleav
|
||||
preprocess
|
||||
profiledata
|
||||
bytecode_pv
|
||||
reg_eval_set
|
||||
reg_flags
|
||||
reg_start_tmp
|
||||
reg_start_tmpl
|
||||
regbol
|
||||
regcc
|
||||
regcode
|
||||
regcompp
|
||||
regexecp
|
||||
regdata
|
||||
regdummy
|
||||
regendp
|
||||
regeol
|
||||
regflags
|
||||
regindent
|
||||
reginput
|
||||
reginterp_cnt
|
||||
reglastparen
|
||||
regnarrate
|
||||
regnaughty
|
||||
regnpar
|
||||
regcomp_parse
|
||||
regprecomp
|
||||
regprev
|
||||
regprogram
|
||||
regsawback
|
||||
regseen
|
||||
regsize
|
||||
regstartp
|
||||
regtill
|
||||
regxend
|
||||
replgv
|
||||
restartop
|
||||
rightgv
|
||||
rs
|
||||
rsfp
|
||||
rsfp_filters
|
||||
regcomp_rx
|
||||
sawampersand
|
||||
sawstudy
|
||||
sawvec
|
||||
screamfirst
|
||||
screamnext
|
||||
secondgv
|
||||
seen_zerolen
|
||||
seen_evals
|
||||
siggv
|
||||
sortcop
|
||||
sortcxix
|
||||
sortstash
|
||||
splitstr
|
||||
start_env
|
||||
statcache
|
||||
statgv
|
||||
statname
|
||||
statusvalue
|
||||
statusvalue_vms
|
||||
stdingv
|
||||
strchop
|
||||
strtab
|
||||
sub_generation
|
||||
sublex_info
|
||||
bytecode_sv
|
||||
sv_count
|
||||
sv_objcount
|
||||
sv_root
|
||||
sv_arenaroot
|
||||
tainted
|
||||
tainting
|
||||
threadnum
|
||||
thrsv
|
||||
tmps_floor
|
||||
tmps_ix
|
||||
tmps_max
|
||||
tmps_stack
|
||||
top_env
|
||||
toptarget
|
||||
unsafe
|
||||
warnhook
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,23 +0,0 @@
|
|||
use CGI;
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
CGI::Apache - Backward compatibility module for CGI.pm
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
Do not use this module. It is deprecated.
|
||||
|
||||
=head1 ABSTRACT
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
=head1 AUTHOR INFORMATION
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
=cut
|
||||
|
|
@ -1,373 +0,0 @@
|
|||
package CGI::Carp;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
B<CGI::Carp> - CGI routines for writing to the HTTPD (or other) error log
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use CGI::Carp;
|
||||
|
||||
croak "We're outta here!";
|
||||
confess "It was my fault: $!";
|
||||
carp "It was your fault!";
|
||||
warn "I'm confused";
|
||||
die "I'm dying.\n";
|
||||
|
||||
use CGI::Carp qw(cluck);
|
||||
cluck "I wouldn't do that if I were you";
|
||||
|
||||
use CGI::Carp qw(fatalsToBrowser);
|
||||
die "Fatal error messages are now sent to browser";
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
CGI scripts have a nasty habit of leaving warning messages in the error
|
||||
logs that are neither time stamped nor fully identified. Tracking down
|
||||
the script that caused the error is a pain. This fixes that. Replace
|
||||
the usual
|
||||
|
||||
use Carp;
|
||||
|
||||
with
|
||||
|
||||
use CGI::Carp
|
||||
|
||||
And the standard warn(), die (), croak(), confess() and carp() calls
|
||||
will automagically be replaced with functions that write out nicely
|
||||
time-stamped messages to the HTTP server error log.
|
||||
|
||||
For example:
|
||||
|
||||
[Fri Nov 17 21:40:43 1995] test.pl: I'm confused at test.pl line 3.
|
||||
[Fri Nov 17 21:40:43 1995] test.pl: Got an error message: Permission denied.
|
||||
[Fri Nov 17 21:40:43 1995] test.pl: I'm dying.
|
||||
|
||||
=head1 REDIRECTING ERROR MESSAGES
|
||||
|
||||
By default, error messages are sent to STDERR. Most HTTPD servers
|
||||
direct STDERR to the server's error log. Some applications may wish
|
||||
to keep private error logs, distinct from the server's error log, or
|
||||
they may wish to direct error messages to STDOUT so that the browser
|
||||
will receive them.
|
||||
|
||||
The C<carpout()> function is provided for this purpose. Since
|
||||
carpout() is not exported by default, you must import it explicitly by
|
||||
saying
|
||||
|
||||
use CGI::Carp qw(carpout);
|
||||
|
||||
The carpout() function requires one argument, which should be a
|
||||
reference to an open filehandle for writing errors. It should be
|
||||
called in a C<BEGIN> block at the top of the CGI application so that
|
||||
compiler errors will be caught. Example:
|
||||
|
||||
BEGIN {
|
||||
use CGI::Carp qw(carpout);
|
||||
open(LOG, ">>/usr/local/cgi-logs/mycgi-log") or
|
||||
die("Unable to open mycgi-log: $!\n");
|
||||
carpout(LOG);
|
||||
}
|
||||
|
||||
carpout() does not handle file locking on the log for you at this point.
|
||||
|
||||
The real STDERR is not closed -- it is moved to SAVEERR. Some
|
||||
servers, when dealing with CGI scripts, close their connection to the
|
||||
browser when the script closes STDOUT and STDERR. SAVEERR is used to
|
||||
prevent this from happening prematurely.
|
||||
|
||||
You can pass filehandles to carpout() in a variety of ways. The "correct"
|
||||
way according to Tom Christiansen is to pass a reference to a filehandle
|
||||
GLOB:
|
||||
|
||||
carpout(\*LOG);
|
||||
|
||||
This looks weird to mere mortals however, so the following syntaxes are
|
||||
accepted as well:
|
||||
|
||||
carpout(LOG);
|
||||
carpout(main::LOG);
|
||||
carpout(main'LOG);
|
||||
carpout(\LOG);
|
||||
carpout(\'main::LOG');
|
||||
|
||||
... and so on
|
||||
|
||||
FileHandle and other objects work as well.
|
||||
|
||||
Use of carpout() is not great for performance, so it is recommended
|
||||
for debugging purposes or for moderate-use applications. A future
|
||||
version of this module may delay redirecting STDERR until one of the
|
||||
CGI::Carp methods is called to prevent the performance hit.
|
||||
|
||||
=head1 MAKING PERL ERRORS APPEAR IN THE BROWSER WINDOW
|
||||
|
||||
If you want to send fatal (die, confess) errors to the browser, ask to
|
||||
import the special "fatalsToBrowser" subroutine:
|
||||
|
||||
use CGI::Carp qw(fatalsToBrowser);
|
||||
die "Bad error here";
|
||||
|
||||
Fatal errors will now be echoed to the browser as well as to the log. CGI::Carp
|
||||
arranges to send a minimal HTTP header to the browser so that even errors that
|
||||
occur in the early compile phase will be seen.
|
||||
Nonfatal errors will still be directed to the log file only (unless redirected
|
||||
with carpout).
|
||||
|
||||
=head2 Changing the default message
|
||||
|
||||
By default, the software error message is followed by a note to
|
||||
contact the Webmaster by e-mail with the time and date of the error.
|
||||
If this message is not to your liking, you can change it using the
|
||||
set_message() routine. This is not imported by default; you should
|
||||
import it on the use() line:
|
||||
|
||||
use CGI::Carp qw(fatalsToBrowser set_message);
|
||||
set_message("It's not a bug, it's a feature!");
|
||||
|
||||
You may also pass in a code reference in order to create a custom
|
||||
error message. At run time, your code will be called with the text
|
||||
of the error message that caused the script to die. Example:
|
||||
|
||||
use CGI::Carp qw(fatalsToBrowser set_message);
|
||||
BEGIN {
|
||||
sub handle_errors {
|
||||
my $msg = shift;
|
||||
print "<h1>Oh gosh</h1>";
|
||||
print "Got an error: $msg";
|
||||
}
|
||||
set_message(\&handle_errors);
|
||||
}
|
||||
|
||||
In order to correctly intercept compile-time errors, you should call
|
||||
set_message() from within a BEGIN{} block.
|
||||
|
||||
=head1 CHANGE LOG
|
||||
|
||||
1.05 carpout() added and minor corrections by Marc Hedlund
|
||||
<hedlund@best.com> on 11/26/95.
|
||||
|
||||
1.06 fatalsToBrowser() no longer aborts for fatal errors within
|
||||
eval() statements.
|
||||
|
||||
1.08 set_message() added and carpout() expanded to allow for FileHandle
|
||||
objects.
|
||||
|
||||
1.09 set_message() now allows users to pass a code REFERENCE for
|
||||
really custom error messages. croak and carp are now
|
||||
exported by default. Thanks to Gunther Birznieks for the
|
||||
patches.
|
||||
|
||||
1.10 Patch from Chris Dean (ctdean@cogit.com) to allow
|
||||
module to run correctly under mod_perl.
|
||||
|
||||
1.11 Changed order of > and < escapes.
|
||||
|
||||
1.12 Changed die() on line 217 to CORE::die to avoid B<-w> warning.
|
||||
|
||||
1.13 Added cluck() to make the module orthogonal with Carp.
|
||||
More mod_perl related fixes.
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
Copyright 1995-1998, Lincoln D. Stein. All rights reserved.
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
Address bug reports and comments to: lstein@cshl.org
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Carp, CGI::Base, CGI::BasePlus, CGI::Request, CGI::MiniSvr, CGI::Form,
|
||||
CGI::Response
|
||||
|
||||
=cut
|
||||
|
||||
require 5.000;
|
||||
use Exporter;
|
||||
use Carp;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(confess croak carp);
|
||||
@EXPORT_OK = qw(carpout fatalsToBrowser wrap set_message cluck);
|
||||
|
||||
BEGIN {
|
||||
$] >= 5.005
|
||||
? eval q#sub ineval { $^S }#
|
||||
: eval q#sub ineval { _longmess() =~ /eval [\{\']/m }#;
|
||||
$@ and die;
|
||||
}
|
||||
|
||||
$main::SIG{__WARN__}=\&CGI::Carp::warn;
|
||||
$main::SIG{__DIE__}=\&CGI::Carp::die;
|
||||
$CGI::Carp::VERSION = '1.14';
|
||||
$CGI::Carp::CUSTOM_MSG = undef;
|
||||
|
||||
# fancy import routine detects and handles 'errorWrap' specially.
|
||||
sub import {
|
||||
my $pkg = shift;
|
||||
my(%routines);
|
||||
grep($routines{$_}++,@_,@EXPORT);
|
||||
$WRAP++ if $routines{'fatalsToBrowser'} || $routines{'wrap'};
|
||||
my($oldlevel) = $Exporter::ExportLevel;
|
||||
$Exporter::ExportLevel = 1;
|
||||
Exporter::import($pkg,keys %routines);
|
||||
$Exporter::ExportLevel = $oldlevel;
|
||||
}
|
||||
|
||||
# These are the originals
|
||||
sub realwarn { CORE::warn(@_); }
|
||||
sub realdie { CORE::die(@_); }
|
||||
|
||||
sub id {
|
||||
my $level = shift;
|
||||
my($pack,$file,$line,$sub) = caller($level);
|
||||
my($id) = $file=~m|([^/]+)\z|;
|
||||
return ($file,$line,$id);
|
||||
}
|
||||
|
||||
sub stamp {
|
||||
my $time = scalar(localtime);
|
||||
my $frame = 0;
|
||||
my ($id,$pack,$file);
|
||||
do {
|
||||
$id = $file;
|
||||
($pack,$file) = caller($frame++);
|
||||
} until !$file;
|
||||
($id) = $id=~m|([^/]+)\z|;
|
||||
return "[$time] $id: ";
|
||||
}
|
||||
|
||||
sub warn {
|
||||
my $message = shift;
|
||||
my($file,$line,$id) = id(1);
|
||||
$message .= " at $file line $line.\n" unless $message=~/\n$/;
|
||||
my $stamp = stamp;
|
||||
$message=~s/^/$stamp/gm;
|
||||
realwarn $message;
|
||||
}
|
||||
|
||||
# The mod_perl package Apache::Registry loads CGI programs by calling
|
||||
# eval. These evals don't count when looking at the stack backtrace.
|
||||
sub _longmess {
|
||||
my $message = Carp::longmess();
|
||||
my $mod_perl = exists $ENV{MOD_PERL};
|
||||
$message =~ s,eval[^\n]+Apache/Registry\.pm.*,,s if $mod_perl;
|
||||
return( $message );
|
||||
}
|
||||
|
||||
sub die {
|
||||
realdie @_ if ineval;
|
||||
my $message = shift;
|
||||
my $time = scalar(localtime);
|
||||
my($file,$line,$id) = id(1);
|
||||
$message .= " at $file line $line." unless $message=~/\n$/;
|
||||
&fatalsToBrowser($message) if $WRAP;
|
||||
my $stamp = stamp;
|
||||
$message=~s/^/$stamp/gm;
|
||||
realdie $message;
|
||||
}
|
||||
|
||||
sub set_message {
|
||||
$CGI::Carp::CUSTOM_MSG = shift;
|
||||
return $CGI::Carp::CUSTOM_MSG;
|
||||
}
|
||||
|
||||
# Avoid generating "subroutine redefined" warnings with the following
|
||||
# hack:
|
||||
{
|
||||
local $^W=0;
|
||||
eval <<EOF;
|
||||
sub confess { CGI::Carp::die Carp::longmess \@_; }
|
||||
sub croak { CGI::Carp::die Carp::shortmess \@_; }
|
||||
sub carp { CGI::Carp::warn Carp::shortmess \@_; }
|
||||
sub cluck { CGI::Carp::warn Carp::longmess \@_; }
|
||||
EOF
|
||||
;
|
||||
}
|
||||
|
||||
# We have to be ready to accept a filehandle as a reference
|
||||
# or a string.
|
||||
sub carpout {
|
||||
my($in) = @_;
|
||||
my($no) = fileno(to_filehandle($in));
|
||||
realdie("Invalid filehandle $in\n") unless defined $no;
|
||||
|
||||
open(SAVEERR, ">&STDERR");
|
||||
open(STDERR, ">&$no") or
|
||||
( print SAVEERR "Unable to redirect STDERR: $!\n" and exit(1) );
|
||||
}
|
||||
|
||||
# headers
|
||||
sub fatalsToBrowser {
|
||||
my($msg) = @_;
|
||||
$msg=~s/&/&/g;
|
||||
$msg=~s/>/>/g;
|
||||
$msg=~s/</</g;
|
||||
$msg=~s/\"/"/g;
|
||||
my($wm) = $ENV{SERVER_ADMIN} ?
|
||||
qq[the webmaster (<a href="mailto:$ENV{SERVER_ADMIN}">$ENV{SERVER_ADMIN}</a>)] :
|
||||
"this site's webmaster";
|
||||
my ($outer_message) = <<END;
|
||||
For help, please send mail to $wm, giving this error message
|
||||
and the time and date of the error.
|
||||
END
|
||||
;
|
||||
my $mod_perl = exists $ENV{MOD_PERL};
|
||||
print STDOUT "Content-type: text/html\n\n"
|
||||
unless $mod_perl;
|
||||
|
||||
if ($CUSTOM_MSG) {
|
||||
if (ref($CUSTOM_MSG) eq 'CODE') {
|
||||
&$CUSTOM_MSG($msg); # nicer to perl 5.003 users
|
||||
return;
|
||||
} else {
|
||||
$outer_message = $CUSTOM_MSG;
|
||||
}
|
||||
}
|
||||
|
||||
my $mess = <<END;
|
||||
<H1>Software error:</H1>
|
||||
<CODE>$msg</CODE>
|
||||
<P>
|
||||
$outer_message
|
||||
END
|
||||
;
|
||||
|
||||
if ($mod_perl) {
|
||||
my $r = Apache->request;
|
||||
# If bytes have already been sent, then
|
||||
# we print the message out directly.
|
||||
# Otherwise we make a custom error
|
||||
# handler to produce the doc for us.
|
||||
if ($r->bytes_sent) {
|
||||
$r->print($mess);
|
||||
$r->exit;
|
||||
} else {
|
||||
$r->status(500);
|
||||
$r->custom_response(500,$mess);
|
||||
}
|
||||
} else {
|
||||
print STDOUT $mess;
|
||||
}
|
||||
}
|
||||
|
||||
# Cut and paste from CGI.pm so that we don't have the overhead of
|
||||
# always loading the entire CGI module.
|
||||
sub to_filehandle {
|
||||
my $thingy = shift;
|
||||
return undef unless $thingy;
|
||||
return $thingy if UNIVERSAL::isa($thingy,'GLOB');
|
||||
return $thingy if UNIVERSAL::isa($thingy,'FileHandle');
|
||||
if (!ref($thingy)) {
|
||||
my $caller = 1;
|
||||
while (my $package = caller($caller++)) {
|
||||
my($tmp) = $thingy=~/[\':]/ ? $thingy : "$package\:\:$thingy";
|
||||
return $tmp if defined(fileno($tmp));
|
||||
}
|
||||
}
|
||||
return undef;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
@ -1,418 +0,0 @@
|
|||
package CGI::Cookie;
|
||||
|
||||
# See the bottom of this file for the POD documentation. Search for the
|
||||
# string '=head'.
|
||||
|
||||
# You can run this file through either pod2man or pod2html to produce pretty
|
||||
# documentation in manual or html file format (these utilities are part of the
|
||||
# Perl 5 distribution).
|
||||
|
||||
# Copyright 1995-1999, Lincoln D. Stein. All rights reserved.
|
||||
# It may be used and modified freely, but I do request that this copyright
|
||||
# notice remain attached to the file. You may modify this module as you
|
||||
# wish, but if you redistribute a modified version, please attach a note
|
||||
# listing the modifications you have made.
|
||||
|
||||
$CGI::Cookie::VERSION='1.12';
|
||||
|
||||
use CGI qw(-no_debug);
|
||||
use overload '""' => \&as_string,
|
||||
'cmp' => \&compare,
|
||||
'fallback'=>1;
|
||||
|
||||
# fetch a list of cookies from the environment and
|
||||
# return as a hash. the cookies are parsed as normal
|
||||
# escaped URL data.
|
||||
sub fetch {
|
||||
my $class = shift;
|
||||
my $raw_cookie = $ENV{HTTP_COOKIE} || $ENV{COOKIE};
|
||||
return () unless $raw_cookie;
|
||||
return $class->parse($raw_cookie);
|
||||
}
|
||||
|
||||
# fetch a list of cookies from the environment and
|
||||
# return as a hash. the cookie values are not unescaped
|
||||
# or altered in any way.
|
||||
sub raw_fetch {
|
||||
my $class = shift;
|
||||
my $raw_cookie = $ENV{HTTP_COOKIE} || $ENV{COOKIE};
|
||||
return () unless $raw_cookie;
|
||||
my %results;
|
||||
my($key,$value);
|
||||
|
||||
my(@pairs) = split("; ",$raw_cookie);
|
||||
foreach (@pairs) {
|
||||
if (/^([^=]+)=(.*)/) {
|
||||
$key = $1;
|
||||
$value = $2;
|
||||
}
|
||||
else {
|
||||
$key = $_;
|
||||
$value = '';
|
||||
}
|
||||
$results{$key} = $value;
|
||||
}
|
||||
return \%results unless wantarray;
|
||||
return %results;
|
||||
}
|
||||
|
||||
sub parse {
|
||||
my ($self,$raw_cookie) = @_;
|
||||
my %results;
|
||||
|
||||
my(@pairs) = split("; ",$raw_cookie);
|
||||
foreach (@pairs) {
|
||||
my($key,$value) = split("=");
|
||||
my(@values) = map CGI::unescape($_),split('&',$value);
|
||||
$key = CGI::unescape($key);
|
||||
# A bug in Netscape can cause several cookies with same name to
|
||||
# appear. The FIRST one in HTTP_COOKIE is the most recent version.
|
||||
$results{$key} ||= $self->new(-name=>$key,-value=>\@values);
|
||||
}
|
||||
return \%results unless wantarray;
|
||||
return %results;
|
||||
}
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
$class = ref($class) if ref($class);
|
||||
my($name,$value,$path,$domain,$secure,$expires) =
|
||||
CGI->rearrange([NAME,[VALUE,VALUES],PATH,DOMAIN,SECURE,EXPIRES],@_);
|
||||
|
||||
# Pull out our parameters.
|
||||
my @values;
|
||||
if (ref($value)) {
|
||||
if (ref($value) eq 'ARRAY') {
|
||||
@values = @$value;
|
||||
} elsif (ref($value) eq 'HASH') {
|
||||
@values = %$value;
|
||||
}
|
||||
} else {
|
||||
@values = ($value);
|
||||
}
|
||||
|
||||
bless my $self = {
|
||||
'name'=>$name,
|
||||
'value'=>[@values],
|
||||
},$class;
|
||||
|
||||
# IE requires the path and domain to be present for some reason.
|
||||
$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->domain($domain) if defined $domain;
|
||||
$self->secure($secure) if defined $secure;
|
||||
$self->expires($expires) if defined $expires;
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub as_string {
|
||||
my $self = shift;
|
||||
return "" unless $self->name;
|
||||
|
||||
my(@constant_values,$domain,$path,$expires,$secure);
|
||||
|
||||
push(@constant_values,"domain=$domain") if $domain = $self->domain;
|
||||
push(@constant_values,"path=$path") if $path = $self->path;
|
||||
push(@constant_values,"expires=$expires") if $expires = $self->expires;
|
||||
push(@constant_values,'secure') if $secure = $self->secure;
|
||||
|
||||
my($key) = CGI::escape($self->name);
|
||||
my($cookie) = join("=",$key,join("&",map CGI::escape($_),$self->value));
|
||||
return join("; ",$cookie,@constant_values);
|
||||
}
|
||||
|
||||
sub compare {
|
||||
my $self = shift;
|
||||
my $value = shift;
|
||||
return "$self" cmp $value;
|
||||
}
|
||||
|
||||
# accessors
|
||||
sub name {
|
||||
my $self = shift;
|
||||
my $name = shift;
|
||||
$self->{'name'} = $name if defined $name;
|
||||
return $self->{'name'};
|
||||
}
|
||||
|
||||
sub value {
|
||||
my $self = shift;
|
||||
my $value = shift;
|
||||
$self->{'value'} = $value if defined $value;
|
||||
return wantarray ? @{$self->{'value'}} : $self->{'value'}->[0]
|
||||
}
|
||||
|
||||
sub domain {
|
||||
my $self = shift;
|
||||
my $domain = shift;
|
||||
$self->{'domain'} = $domain if defined $domain;
|
||||
return $self->{'domain'};
|
||||
}
|
||||
|
||||
sub secure {
|
||||
my $self = shift;
|
||||
my $secure = shift;
|
||||
$self->{'secure'} = $secure if defined $secure;
|
||||
return $self->{'secure'};
|
||||
}
|
||||
|
||||
sub expires {
|
||||
my $self = shift;
|
||||
my $expires = shift;
|
||||
$self->{'expires'} = CGI::expires($expires,'cookie') if defined $expires;
|
||||
return $self->{'expires'};
|
||||
}
|
||||
|
||||
sub path {
|
||||
my $self = shift;
|
||||
my $path = shift;
|
||||
$self->{'path'} = $path if defined $path;
|
||||
return $self->{'path'};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
CGI::Cookie - Interface to Netscape Cookies
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use CGI qw/:standard/;
|
||||
use CGI::Cookie;
|
||||
|
||||
# Create new cookies and send them
|
||||
$cookie1 = new CGI::Cookie(-name=>'ID',-value=>123456);
|
||||
$cookie2 = new CGI::Cookie(-name=>'preferences',
|
||||
-value=>{ font => Helvetica,
|
||||
size => 12 }
|
||||
);
|
||||
print header(-cookie=>[$cookie1,$cookie2]);
|
||||
|
||||
# fetch existing cookies
|
||||
%cookies = fetch CGI::Cookie;
|
||||
$id = $cookies{'ID'}->value;
|
||||
|
||||
# create cookies returned from an external source
|
||||
%cookies = parse CGI::Cookie($ENV{COOKIE});
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
CGI::Cookie is an interface to Netscape (HTTP/1.1) cookies, an
|
||||
innovation that allows Web servers to store persistent information on
|
||||
the browser's side of the connection. Although CGI::Cookie is
|
||||
intended to be used in conjunction with CGI.pm (and is in fact used by
|
||||
it internally), you can use this module independently.
|
||||
|
||||
For full information on cookies see
|
||||
|
||||
http://www.ics.uci.edu/pub/ietf/http/rfc2109.txt
|
||||
|
||||
=head1 USING CGI::Cookie
|
||||
|
||||
CGI::Cookie is object oriented. Each cookie object has a name and a
|
||||
value. The name is any scalar value. The value is any scalar or
|
||||
array value (associative arrays are also allowed). Cookies also have
|
||||
several optional attributes, including:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<1. expiration date>
|
||||
|
||||
The expiration date tells the browser how long to hang on to the
|
||||
cookie. If the cookie specifies an expiration date in the future, the
|
||||
browser will store the cookie information in a disk file and return it
|
||||
to the server every time the user reconnects (until the expiration
|
||||
date is reached). If the cookie species an expiration date in the
|
||||
past, the browser will remove the cookie from the disk file. If the
|
||||
expiration date is not specified, the cookie will persist only until
|
||||
the user quits the browser.
|
||||
|
||||
=item B<2. domain>
|
||||
|
||||
This is a partial or complete domain name for which the cookie is
|
||||
valid. The browser will return the cookie to any host that matches
|
||||
the partial domain name. For example, if you specify a domain name
|
||||
of ".capricorn.com", then Netscape will return the cookie to
|
||||
Web servers running on any of the machines "www.capricorn.com",
|
||||
"ftp.capricorn.com", "feckless.capricorn.com", etc. Domain names
|
||||
must contain at least two periods to prevent attempts to match
|
||||
on top level domains like ".edu". If no domain is specified, then
|
||||
the browser will only return the cookie to servers on the host the
|
||||
cookie originated from.
|
||||
|
||||
=item B<3. path>
|
||||
|
||||
If you provide a cookie path attribute, the browser will check it
|
||||
against your script's URL before returning the cookie. For example,
|
||||
if you specify the path "/cgi-bin", then the cookie will be returned
|
||||
to each of the scripts "/cgi-bin/tally.pl", "/cgi-bin/order.pl", and
|
||||
"/cgi-bin/customer_service/complain.pl", but not to the script
|
||||
"/cgi-private/site_admin.pl". By default, the path is set to your
|
||||
script, so that only it will receive the cookie.
|
||||
|
||||
=item B<4. secure flag>
|
||||
|
||||
If the "secure" attribute is set, the cookie will only be sent to your
|
||||
script if the CGI request is occurring on a secure channel, such as SSL.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Creating New Cookies
|
||||
|
||||
$c = new CGI::Cookie(-name => 'foo',
|
||||
-value => 'bar',
|
||||
-expires => '+3M',
|
||||
-domain => '.capricorn.com',
|
||||
-path => '/cgi-bin/database'
|
||||
-secure => 1
|
||||
);
|
||||
|
||||
Create cookies from scratch with the B<new> method. The B<-name> and
|
||||
B<-value> parameters are required. The name must be a scalar value.
|
||||
The value can be a scalar, an array reference, or a hash reference.
|
||||
(At some point in the future cookies will support one of the Perl
|
||||
object serialization protocols for full generality).
|
||||
|
||||
B<-expires> accepts any of the relative or absolute date formats
|
||||
recognized by CGI.pm, for example "+3M" for three months in the
|
||||
future. See CGI.pm's documentation for details.
|
||||
|
||||
B<-domain> points to a domain name or to a fully qualified host name.
|
||||
If not specified, the cookie will be returned only to the Web server
|
||||
that created it.
|
||||
|
||||
B<-path> points to a partial URL on the current server. The cookie
|
||||
will be returned to all URLs beginning with the specified path. If
|
||||
not specified, it defaults to '/', which returns the cookie to all
|
||||
pages at your site.
|
||||
|
||||
B<-secure> if set to a true value instructs the browser to return the
|
||||
cookie only when a cryptographic protocol is in use.
|
||||
|
||||
=head2 Sending the Cookie to the Browser
|
||||
|
||||
Within a CGI script you can send a cookie to the browser by creating
|
||||
one or more Set-Cookie: fields in the HTTP header. Here is a typical
|
||||
sequence:
|
||||
|
||||
my $c = new CGI::Cookie(-name => 'foo',
|
||||
-value => ['bar','baz'],
|
||||
-expires => '+3M');
|
||||
|
||||
print "Set-Cookie: $c\n";
|
||||
print "Content-Type: text/html\n\n";
|
||||
|
||||
To send more than one cookie, create several Set-Cookie: fields.
|
||||
Alternatively, you may concatenate the cookies together with "; " and
|
||||
send them in one field.
|
||||
|
||||
If you are using CGI.pm, you send cookies by providing a -cookie
|
||||
argument to the header() method:
|
||||
|
||||
print header(-cookie=>$c);
|
||||
|
||||
Mod_perl users can set cookies using the request object's header_out()
|
||||
method:
|
||||
|
||||
$r->header_out('Set-Cookie',$c);
|
||||
|
||||
Internally, Cookie overloads the "" operator to call its as_string()
|
||||
method when incorporated into the HTTP header. as_string() turns the
|
||||
Cookie's internal representation into an RFC-compliant text
|
||||
representation. You may call as_string() yourself if you prefer:
|
||||
|
||||
print "Set-Cookie: ",$c->as_string,"\n";
|
||||
|
||||
=head2 Recovering Previous Cookies
|
||||
|
||||
%cookies = fetch CGI::Cookie;
|
||||
|
||||
B<fetch> returns an associative array consisting of all cookies
|
||||
returned by the browser. The keys of the array are the cookie names. You
|
||||
can iterate through the cookies this way:
|
||||
|
||||
%cookies = fetch CGI::Cookie;
|
||||
foreach (keys %cookies) {
|
||||
do_something($cookies{$_});
|
||||
}
|
||||
|
||||
In a scalar context, fetch() returns a hash reference, which may be more
|
||||
efficient if you are manipulating multiple cookies.
|
||||
|
||||
CGI.pm uses the URL escaping methods to save and restore reserved characters
|
||||
in its cookies. If you are trying to retrieve a cookie set by a foreign server,
|
||||
this escaping method may trip you up. Use raw_fetch() instead, which has the
|
||||
same semantics as fetch(), but performs no unescaping.
|
||||
|
||||
You may also retrieve cookies that were stored in some external
|
||||
form using the parse() class method:
|
||||
|
||||
$COOKIES = `cat /usr/tmp/Cookie_stash`;
|
||||
%cookies = parse CGI::Cookie($COOKIES);
|
||||
|
||||
=head2 Manipulating Cookies
|
||||
|
||||
Cookie objects have a series of accessor methods to get and set cookie
|
||||
attributes. Each accessor has a similar syntax. Called without
|
||||
arguments, the accessor returns the current value of the attribute.
|
||||
Called with an argument, the accessor changes the attribute and
|
||||
returns its new value.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<name()>
|
||||
|
||||
Get or set the cookie's name. Example:
|
||||
|
||||
$name = $c->name;
|
||||
$new_name = $c->name('fred');
|
||||
|
||||
=item B<value()>
|
||||
|
||||
Get or set the cookie's value. Example:
|
||||
|
||||
$value = $c->value;
|
||||
@new_value = $c->value(['a','b','c','d']);
|
||||
|
||||
B<value()> is context sensitive. In an array context it will return
|
||||
the current value of the cookie as an array. In a scalar context it
|
||||
will return the B<first> value of a multivalued cookie.
|
||||
|
||||
=item B<domain()>
|
||||
|
||||
Get or set the cookie's domain.
|
||||
|
||||
=item B<path()>
|
||||
|
||||
Get or set the cookie's path.
|
||||
|
||||
=item B<expires()>
|
||||
|
||||
Get or set the cookie's expiration time.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 AUTHOR INFORMATION
|
||||
|
||||
Copyright 1997-1998, Lincoln D. Stein. All rights reserved.
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
Address bug reports and comments to: lstein@cshl.org
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
This section intentionally left blank.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<CGI::Carp>, L<CGI>
|
||||
|
||||
=cut
|
||||
|
|
@ -1,174 +0,0 @@
|
|||
package CGI::Fast;
|
||||
|
||||
# See the bottom of this file for the POD documentation. Search for the
|
||||
# string '=head'.
|
||||
|
||||
# You can run this file through either pod2man or pod2html to produce pretty
|
||||
# documentation in manual or html file format (these utilities are part of the
|
||||
# Perl 5 distribution).
|
||||
|
||||
# Copyright 1995,1996, Lincoln D. Stein. All rights reserved.
|
||||
# It may be used and modified freely, but I do request that this copyright
|
||||
# notice remain attached to the file. You may modify this module as you
|
||||
# wish, but if you redistribute a modified version, please attach a note
|
||||
# listing the modifications you have made.
|
||||
|
||||
# The most recent version and complete docs are available at:
|
||||
# http://www.genome.wi.mit.edu/ftp/pub/software/WWW/cgi_docs.html
|
||||
# ftp://ftp-genome.wi.mit.edu/pub/software/WWW/
|
||||
$CGI::Fast::VERSION='1.02';
|
||||
|
||||
use CGI;
|
||||
use FCGI;
|
||||
@ISA = ('CGI');
|
||||
|
||||
# workaround for known bug in libfcgi
|
||||
while (($ignore) = each %ENV) { }
|
||||
|
||||
# override the initialization behavior so that
|
||||
# state is NOT maintained between invocations
|
||||
sub save_request {
|
||||
# no-op
|
||||
}
|
||||
|
||||
# New is slightly different in that it calls FCGI's
|
||||
# accept() method.
|
||||
sub new {
|
||||
my ($self, $initializer, @param) = @_;
|
||||
unless (defined $initializer) {
|
||||
return undef unless FCGI::accept() >= 0;
|
||||
}
|
||||
return $CGI::Q = $self->SUPER::new($initializer, @param);
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
CGI::Fast - CGI Interface for Fast CGI
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use CGI::Fast qw(:standard);
|
||||
$COUNTER = 0;
|
||||
while (new CGI::Fast) {
|
||||
print header;
|
||||
print start_html("Fast CGI Rocks");
|
||||
print
|
||||
h1("Fast CGI Rocks"),
|
||||
"Invocation number ",b($COUNTER++),
|
||||
" PID ",b($$),".",
|
||||
hr;
|
||||
print end_html;
|
||||
}
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
CGI::Fast is a subclass of the CGI object created by
|
||||
CGI.pm. It is specialized to work well with the Open Market
|
||||
FastCGI standard, which greatly speeds up CGI scripts by
|
||||
turning them into persistently running server processes. Scripts
|
||||
that perform time-consuming initialization processes, such as
|
||||
loading large modules or opening persistent database connections,
|
||||
will see large performance improvements.
|
||||
|
||||
=head1 OTHER PIECES OF THE PUZZLE
|
||||
|
||||
In order to use CGI::Fast you'll need a FastCGI-enabled Web
|
||||
server. Open Market's server is FastCGI-savvy. There are also
|
||||
freely redistributable FastCGI modules for NCSA httpd 1.5 and Apache.
|
||||
FastCGI-enabling modules for Microsoft Internet Information Server and
|
||||
Netscape Communications Server have been announced.
|
||||
|
||||
In addition, you'll need a version of the Perl interpreter that has
|
||||
been linked with the FastCGI I/O library. Precompiled binaries are
|
||||
available for several platforms, including DEC Alpha, HP-UX and
|
||||
SPARC/Solaris, or you can rebuild Perl from source with patches
|
||||
provided in the FastCGI developer's kit. The FastCGI Perl interpreter
|
||||
can be used in place of your normal Perl without ill consequences.
|
||||
|
||||
You can find FastCGI modules for Apache and NCSA httpd, precompiled
|
||||
Perl interpreters, and the FastCGI developer's kit all at URL:
|
||||
|
||||
http://www.fastcgi.com/
|
||||
|
||||
=head1 WRITING FASTCGI PERL SCRIPTS
|
||||
|
||||
FastCGI scripts are persistent: one or more copies of the script
|
||||
are started up when the server initializes, and stay around until
|
||||
the server exits or they die a natural death. After performing
|
||||
whatever one-time initialization it needs, the script enters a
|
||||
loop waiting for incoming connections, processing the request, and
|
||||
waiting some more.
|
||||
|
||||
A typical FastCGI script will look like this:
|
||||
|
||||
#!/usr/local/bin/perl # must be a FastCGI version of perl!
|
||||
use CGI::Fast;
|
||||
&do_some_initialization();
|
||||
while ($q = new CGI::Fast) {
|
||||
&process_request($q);
|
||||
}
|
||||
|
||||
Each time there's a new request, CGI::Fast returns a
|
||||
CGI object to your loop. The rest of the time your script
|
||||
waits in the call to new(). When the server requests that
|
||||
your script be terminated, new() will return undef. You can
|
||||
of course exit earlier if you choose. A new version of the
|
||||
script will be respawned to take its place (this may be
|
||||
necessary in order to avoid Perl memory leaks in long-running
|
||||
scripts).
|
||||
|
||||
CGI.pm's default CGI object mode also works. Just modify the loop
|
||||
this way:
|
||||
|
||||
while (new CGI::Fast) {
|
||||
&process_request;
|
||||
}
|
||||
|
||||
Calls to header(), start_form(), etc. will all operate on the
|
||||
current request.
|
||||
|
||||
=head1 INSTALLING FASTCGI SCRIPTS
|
||||
|
||||
See the FastCGI developer's kit documentation for full details. On
|
||||
the Apache server, the following line must be added to srm.conf:
|
||||
|
||||
AddType application/x-httpd-fcgi .fcgi
|
||||
|
||||
FastCGI scripts must end in the extension .fcgi. For each script you
|
||||
install, you must add something like the following to srm.conf:
|
||||
|
||||
AppClass /usr/etc/httpd/fcgi-bin/file_upload.fcgi -processes 2
|
||||
|
||||
This instructs Apache to launch two copies of file_upload.fcgi at
|
||||
startup time.
|
||||
|
||||
=head1 USING FASTCGI SCRIPTS AS CGI SCRIPTS
|
||||
|
||||
Any script that works correctly as a FastCGI script will also work
|
||||
correctly when installed as a vanilla CGI script. However it will
|
||||
not see any performance benefit.
|
||||
|
||||
=head1 CAVEATS
|
||||
|
||||
I haven't tested this very much.
|
||||
|
||||
=head1 AUTHOR INFORMATION
|
||||
|
||||
Copyright 1996-1998, Lincoln D. Stein. All rights reserved.
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
Address bug reports and comments to: lstein@cshl.org
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
This section intentionally left blank.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<CGI::Carp>, L<CGI>
|
||||
|
||||
=cut
|
||||
|
|
@ -1,236 +0,0 @@
|
|||
package CGI::Pretty;
|
||||
|
||||
# See the bottom of this file for the POD documentation. Search for the
|
||||
# string '=head'.
|
||||
|
||||
# You can run this file through either pod2man or pod2html to produce pretty
|
||||
# documentation in manual or html file format (these utilities are part of the
|
||||
# Perl 5 distribution).
|
||||
|
||||
use strict;
|
||||
use CGI ();
|
||||
|
||||
$CGI::Pretty::VERSION = '1.03';
|
||||
$CGI::DefaultClass = __PACKAGE__;
|
||||
$CGI::Pretty::AutoloadClass = 'CGI';
|
||||
@CGI::Pretty::ISA = qw( CGI );
|
||||
|
||||
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</$i>$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]) &&
|
||||
(substr(ref(\$_[0]),0,3) eq 'CGI' ||
|
||||
UNIVERSAL::isa(\$_[0],'CGI')));
|
||||
|
||||
my(\$attr) = '';
|
||||
if (ref(\$_[0]) && ref(\$_[0]) eq 'HASH') {
|
||||
my(\@attr) = make_attributes('',shift);
|
||||
\$attr = " \@attr" if \@attr;
|
||||
}
|
||||
|
||||
my(\$tag,\$untag) = ("\U<$tagname\E\$attr>","\U</$tagname>\E");
|
||||
return \$tag unless \@_;
|
||||
|
||||
my \@result;
|
||||
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/\$CGI::Pretty::LINEBREAK/\$CGI::Pretty::LINEBREAK\$CGI::Pretty::INDENT/g;
|
||||
}
|
||||
else {
|
||||
my \$tmp = \$_;
|
||||
CGI::Pretty::_prettyPrint( \\\$tmp );
|
||||
\$_ = \$tmp;
|
||||
}
|
||||
"\$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
|
||||
|
||||
CGI::Pretty - module to produce nicely formatted HTML code
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use CGI::Pretty qw( :html3 );
|
||||
|
||||
# Print a table with a single data element
|
||||
print table( TR( td( "foo" ) ) );
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
CGI::Pretty is a module that derives from CGI. It's sole function is to
|
||||
allow users of CGI to output nicely formatted HTML code.
|
||||
|
||||
When using the CGI module, the following code:
|
||||
print table( TR( td( "foo" ) ) );
|
||||
|
||||
produces the following output:
|
||||
<TABLE><TR><TD>foo</TD></TR></TABLE>
|
||||
|
||||
If a user were to create a table consisting of many rows and many columns,
|
||||
the resultant HTML code would be quite difficult to read since it has no
|
||||
carriage returns or indentation.
|
||||
|
||||
CGI::Pretty fixes this problem. What it does is add a carriage
|
||||
return and indentation to the HTML code so that one can easily read
|
||||
it.
|
||||
|
||||
print table( TR( td( "foo" ) ) );
|
||||
|
||||
now produces the following output:
|
||||
<TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
foo
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
=head2 Tags that won't be formatted
|
||||
|
||||
The <A> and <PRE> tags are not formatted. If these tags were formatted, the
|
||||
user would see the extra indentation on the web browser causing the page to
|
||||
look different than what would be expected. If you wish to add more tags to
|
||||
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 <Brian@ThePaulsens.com>, with minor modifications by
|
||||
Lincoln Stein <lstein@cshl.org> for incorporation into the CGI.pm
|
||||
distribution.
|
||||
|
||||
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 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!
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<CGI>
|
||||
|
||||
=cut
|
||||
|
|
@ -1,307 +0,0 @@
|
|||
package CGI::Push;
|
||||
|
||||
# See the bottom of this file for the POD documentation. Search for the
|
||||
# string '=head'.
|
||||
|
||||
# You can run this file through either pod2man or pod2html to produce pretty
|
||||
# documentation in manual or html file format (these utilities are part of the
|
||||
# Perl 5 distribution).
|
||||
|
||||
# Copyright 1995,1996, Lincoln D. Stein. All rights reserved.
|
||||
# It may be used and modified freely, but I do request that this copyright
|
||||
# notice remain attached to the file. You may modify this module as you
|
||||
# wish, but if you redistribute a modified version, please attach a note
|
||||
# listing the modifications you have made.
|
||||
|
||||
# The most recent version and complete docs are available at:
|
||||
# http://stein.cshl.org/WWW/software/CGI/
|
||||
|
||||
$CGI::Push::VERSION='1.01';
|
||||
use CGI;
|
||||
@ISA = ('CGI');
|
||||
|
||||
$CGI::DefaultClass = 'CGI::Push';
|
||||
$CGI::Push::AutoloadClass = 'CGI';
|
||||
|
||||
# add do_push() and push_delay() to exported tags
|
||||
push(@{$CGI::EXPORT_TAGS{':standard'}},'do_push','push_delay');
|
||||
|
||||
sub do_push {
|
||||
my ($self,@p) = CGI::self_or_default(@_);
|
||||
|
||||
# unbuffer output
|
||||
$| = 1;
|
||||
srand;
|
||||
my ($random) = sprintf("%16.0f",rand()*1E16);
|
||||
my ($boundary) = "----------------------------------$random";
|
||||
|
||||
my (@header);
|
||||
my ($type,$callback,$delay,$last_page,$cookie,$target,$expires,@other) =
|
||||
$self->rearrange([TYPE,NEXT_PAGE,DELAY,LAST_PAGE,[COOKIE,COOKIES],TARGET,EXPIRES],@p);
|
||||
$type = 'text/html' unless $type;
|
||||
$callback = \&simple_counter unless $callback && ref($callback) eq 'CODE';
|
||||
$delay = 1 unless defined($delay);
|
||||
$self->push_delay($delay);
|
||||
|
||||
my(@o);
|
||||
foreach (@other) { push(@o,split("=")); }
|
||||
push(@o,'-Target'=>$target) if defined($target);
|
||||
push(@o,'-Cookie'=>$cookie) if defined($cookie);
|
||||
push(@o,'-Type'=>"multipart/x-mixed-replace; boundary=$boundary");
|
||||
push(@o,'-Server'=>"CGI.pm Push Module");
|
||||
push(@o,'-Status'=>'200 OK');
|
||||
push(@o,'-nph'=>1);
|
||||
print $self->header(@o);
|
||||
print "${boundary}$CGI::CRLF";
|
||||
|
||||
# now we enter a little loop
|
||||
my @contents;
|
||||
while (1) {
|
||||
last unless (@contents = &$callback($self,++$COUNTER)) && defined($contents[0]);
|
||||
print "Content-type: ${type}$CGI::CRLF$CGI::CRLF"
|
||||
unless $type eq 'dynamic';
|
||||
print @contents,"$CGI::CRLF";
|
||||
print "${boundary}$CGI::CRLF";
|
||||
do_sleep($self->push_delay()) if $self->push_delay();
|
||||
}
|
||||
|
||||
# Optional last page
|
||||
if ($last_page && ref($last_page) eq 'CODE') {
|
||||
print "Content-type: ${type}$CGI::CRLF$CGI::CRLF" unless $type =~ /^dynamic|heterogeneous$/i;
|
||||
print &$last_page($self,$COUNTER),"$CGI::CRLF${boundary}$CGI::CRLF";
|
||||
}
|
||||
}
|
||||
|
||||
sub simple_counter {
|
||||
my ($self,$count) = @_;
|
||||
return (
|
||||
CGI->start_html("CGI::Push Default Counter"),
|
||||
CGI->h1("CGI::Push Default Counter"),
|
||||
"This page has been updated ",CGI->strong($count)," times.",
|
||||
CGI->hr(),
|
||||
CGI->a({'-href'=>'http://www.genome.wi.mit.edu/ftp/pub/software/WWW/cgi_docs.html'},'CGI.pm home page'),
|
||||
CGI->end_html
|
||||
);
|
||||
}
|
||||
|
||||
sub do_sleep {
|
||||
my $delay = shift;
|
||||
if ( ($delay >= 1) && ($delay!~/\./) ){
|
||||
sleep($delay);
|
||||
} else {
|
||||
select(undef,undef,undef,$delay);
|
||||
}
|
||||
}
|
||||
|
||||
sub push_delay {
|
||||
my ($self,$delay) = CGI::self_or_default(@_);
|
||||
return defined($delay) ? $self->{'.delay'} =
|
||||
$delay : $self->{'.delay'};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
CGI::Push - Simple Interface to Server Push
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use CGI::Push qw(:standard);
|
||||
|
||||
do_push(-next_page=>\&next_page,
|
||||
-last_page=>\&last_page,
|
||||
-delay=>0.5);
|
||||
|
||||
sub next_page {
|
||||
my($q,$counter) = @_;
|
||||
return undef if $counter >= 10;
|
||||
return start_html('Test'),
|
||||
h1('Visible'),"\n",
|
||||
"This page has been called ", strong($counter)," times",
|
||||
end_html();
|
||||
}
|
||||
|
||||
sub last_page {
|
||||
my($q,$counter) = @_;
|
||||
return start_html('Done'),
|
||||
h1('Finished'),
|
||||
strong($counter),' iterations.',
|
||||
end_html;
|
||||
}
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
CGI::Push is a subclass of the CGI object created by CGI.pm. It is
|
||||
specialized for server push operations, which allow you to create
|
||||
animated pages whose content changes at regular intervals.
|
||||
|
||||
You provide CGI::Push with a pointer to a subroutine that will draw
|
||||
one page. Every time your subroutine is called, it generates a new
|
||||
page. The contents of the page will be transmitted to the browser
|
||||
in such a way that it will replace what was there beforehand. The
|
||||
technique will work with HTML pages as well as with graphics files,
|
||||
allowing you to create animated GIFs.
|
||||
|
||||
=head1 USING CGI::Push
|
||||
|
||||
CGI::Push adds one new method to the standard CGI suite, do_push().
|
||||
When you call this method, you pass it a reference to a subroutine
|
||||
that is responsible for drawing each new page, an interval delay, and
|
||||
an optional subroutine for drawing the last page. Other optional
|
||||
parameters include most of those recognized by the CGI header()
|
||||
method.
|
||||
|
||||
You may call do_push() in the object oriented manner or not, as you
|
||||
prefer:
|
||||
|
||||
use CGI::Push;
|
||||
$q = new CGI::Push;
|
||||
$q->do_push(-next_page=>\&draw_a_page);
|
||||
|
||||
-or-
|
||||
|
||||
use CGI::Push qw(:standard);
|
||||
do_push(-next_page=>\&draw_a_page);
|
||||
|
||||
Parameters are as follows:
|
||||
|
||||
=over 4
|
||||
|
||||
=item -next_page
|
||||
|
||||
do_push(-next_page=>\&my_draw_routine);
|
||||
|
||||
This required parameter points to a reference to a subroutine responsible for
|
||||
drawing each new page. The subroutine should expect two parameters
|
||||
consisting of the CGI object and a counter indicating the number
|
||||
of times the subroutine has been called. It should return the
|
||||
contents of the page as an B<array> of one or more items to print.
|
||||
It can return a false value (or an empty array) in order to abort the
|
||||
redrawing loop and print out the final page (if any)
|
||||
|
||||
sub my_draw_routine {
|
||||
my($q,$counter) = @_;
|
||||
return undef if $counter > 100;
|
||||
return start_html('testing'),
|
||||
h1('testing'),
|
||||
"This page called $counter times";
|
||||
}
|
||||
|
||||
You are of course free to refer to create and use global variables
|
||||
within your draw routine in order to achieve special effects.
|
||||
|
||||
=item -last_page
|
||||
|
||||
This optional parameter points to a reference to the subroutine
|
||||
responsible for drawing the last page of the series. It is called
|
||||
after the -next_page routine returns a false value. The subroutine
|
||||
itself should have exactly the same calling conventions as the
|
||||
-next_page routine.
|
||||
|
||||
=item -type
|
||||
|
||||
This optional parameter indicates the content type of each page. It
|
||||
defaults to "text/html". Normally the module assumes that each page
|
||||
is of a homogenous MIME type. However if you provide either of the
|
||||
magic values "heterogeneous" or "dynamic" (the latter provided for the
|
||||
convenience of those who hate long parameter names), you can specify
|
||||
the MIME type -- and other header fields -- on a per-page basis. See
|
||||
"heterogeneous pages" for more details.
|
||||
|
||||
=item -delay
|
||||
|
||||
This indicates the delay, in seconds, between frames. Smaller delays
|
||||
refresh the page faster. Fractional values are allowed.
|
||||
|
||||
B<If not specified, -delay will default to 1 second>
|
||||
|
||||
=item -cookie, -target, -expires
|
||||
|
||||
These have the same meaning as the like-named parameters in
|
||||
CGI::header().
|
||||
|
||||
=back
|
||||
|
||||
=head2 Heterogeneous Pages
|
||||
|
||||
Ordinarily all pages displayed by CGI::Push share a common MIME type.
|
||||
However by providing a value of "heterogeneous" or "dynamic" in the
|
||||
do_push() -type parameter, you can specify the MIME type of each page
|
||||
on a case-by-case basis.
|
||||
|
||||
If you use this option, you will be responsible for producing the
|
||||
HTTP header for each page. Simply modify your draw routine to
|
||||
look like this:
|
||||
|
||||
sub my_draw_routine {
|
||||
my($q,$counter) = @_;
|
||||
return header('text/html'), # note we're producing the header here
|
||||
start_html('testing'),
|
||||
h1('testing'),
|
||||
"This page called $counter times";
|
||||
}
|
||||
|
||||
You can add any header fields that you like, but some (cookies and
|
||||
status fields included) may not be interpreted by the browser. One
|
||||
interesting effect is to display a series of pages, then, after the
|
||||
last page, to redirect the browser to a new URL. Because redirect()
|
||||
does b<not> work, the easiest way is with a -refresh header field,
|
||||
as shown below:
|
||||
|
||||
sub my_draw_routine {
|
||||
my($q,$counter) = @_;
|
||||
return undef if $counter > 10;
|
||||
return header('text/html'), # note we're producing the header here
|
||||
start_html('testing'),
|
||||
h1('testing'),
|
||||
"This page called $counter times";
|
||||
}
|
||||
|
||||
sub my_last_page {
|
||||
header(-refresh=>'5; URL=http://somewhere.else/finished.html',
|
||||
-type=>'text/html'),
|
||||
start_html('Moved'),
|
||||
h1('This is the last page'),
|
||||
'Goodbye!'
|
||||
hr,
|
||||
end_html;
|
||||
}
|
||||
|
||||
=head2 Changing the Page Delay on the Fly
|
||||
|
||||
If you would like to control the delay between pages on a page-by-page
|
||||
basis, call push_delay() from within your draw routine. push_delay()
|
||||
takes a single numeric argument representing the number of seconds you
|
||||
wish to delay after the current page is displayed and before
|
||||
displaying the next one. The delay may be fractional. Without
|
||||
parameters, push_delay() just returns the current delay.
|
||||
|
||||
=head1 INSTALLING CGI::Push SCRIPTS
|
||||
|
||||
Server push scripts B<must> be installed as no-parsed-header (NPH)
|
||||
scripts in order to work correctly. On Unix systems, this is most
|
||||
often accomplished by prefixing the script's name with "nph-".
|
||||
Recognition of NPH scripts happens automatically with WebSTAR and
|
||||
Microsoft IIS. Users of other servers should see their documentation
|
||||
for help.
|
||||
|
||||
=head1 AUTHOR INFORMATION
|
||||
|
||||
Copyright 1995-1998, Lincoln D. Stein. All rights reserved.
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
Address bug reports and comments to: lstein@cshl.org
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
This section intentionally left blank.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<CGI::Carp>, L<CGI>
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
use CGI;
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
CGI::Switch - Backward compatibility module for defunct CGI::Switch
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
Do not use this module. It is deprecated.
|
||||
|
||||
=head1 ABSTRACT
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
=head1 AUTHOR INFORMATION
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
=cut
|
||||
|
|
@ -1,127 +0,0 @@
|
|||
package Sys::Hostname;
|
||||
|
||||
use Carp;
|
||||
require Exporter;
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(hostname);
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Sys::Hostname - Try every conceivable way to get hostname
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use Sys::Hostname;
|
||||
$host = hostname;
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Attempts several methods of getting the system hostname and
|
||||
then caches the result. It tries C<syscall(SYS_gethostname)>,
|
||||
C<`hostname`>, C<`uname -n`>, and the file F</com/host>.
|
||||
If all that fails it C<croak>s.
|
||||
|
||||
All nulls, returns, and newlines are removed from the result.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
David Sundstrom E<lt>F<sunds@asictest.sc.ti.com>E<gt>
|
||||
|
||||
Texas Instruments
|
||||
|
||||
=cut
|
||||
|
||||
sub hostname {
|
||||
|
||||
# method 1 - we already know it
|
||||
return $host if defined $host;
|
||||
|
||||
if ($^O eq 'VMS') {
|
||||
|
||||
# method 2 - no sockets ==> return DECnet node name
|
||||
eval { local $SIG{__DIE__}; $host = (gethostbyname('me'))[0] };
|
||||
if ($@) { return $host = $ENV{'SYS$NODE'}; }
|
||||
|
||||
# method 3 - has someone else done the job already? It's common for the
|
||||
# TCP/IP stack to advertise the hostname via a logical name. (Are
|
||||
# there any other logicals which TCP/IP stacks use for the host name?)
|
||||
$host = $ENV{'ARPANET_HOST_NAME'} || $ENV{'INTERNET_HOST_NAME'} ||
|
||||
$ENV{'MULTINET_HOST_NAME'} || $ENV{'UCX$INET_HOST'} ||
|
||||
$ENV{'TCPWARE_DOMAINNAME'} || $ENV{'NEWS_ADDRESS'};
|
||||
return $host if $host;
|
||||
|
||||
# method 4 - does hostname happen to work?
|
||||
my($rslt) = `hostname`;
|
||||
if ($rslt !~ /IVVERB/) { ($host) = $rslt =~ /^(\S+)/; }
|
||||
return $host if $host;
|
||||
|
||||
# rats!
|
||||
$host = '';
|
||||
Carp::croak "Cannot get host name of local machine";
|
||||
|
||||
}
|
||||
elsif ($^O eq 'MSWin32') {
|
||||
($host) = gethostbyname('localhost');
|
||||
chomp($host = `hostname 2> NUL`) unless defined $host;
|
||||
return $host;
|
||||
}
|
||||
else { # Unix
|
||||
|
||||
# method 2 - syscall is preferred since it avoids tainting problems
|
||||
eval {
|
||||
local $SIG{__DIE__};
|
||||
{
|
||||
package main;
|
||||
require "syscall.ph";
|
||||
}
|
||||
$host = "\0" x 65; ## preload scalar
|
||||
syscall(&main::SYS_gethostname, $host, 65) == 0;
|
||||
}
|
||||
|
||||
# method 2a - syscall using systeminfo instead of gethostname
|
||||
# -- needed on systems like Solaris
|
||||
|| eval {
|
||||
local $SIG{__DIE__};
|
||||
{
|
||||
package main;
|
||||
require "sys/syscall.ph";
|
||||
require "sys/systeminfo.ph";
|
||||
}
|
||||
$host = "\0" x 65; ## preload scalar
|
||||
syscall(&main::SYS_systeminfo, &main::SI_HOSTNAME, $host, 65) != -1;
|
||||
}
|
||||
|
||||
# method 3 - trusty old hostname command
|
||||
|| eval {
|
||||
$pathstack = $ENV{'PATH'};
|
||||
$ENV{'PATH'} = "/bin:/usr/bin";
|
||||
local $SIG{__DIE__};
|
||||
$host = `(hostname) 2>/dev/null`; # bsdish
|
||||
$ENV{'PATH'} = $pathstack;
|
||||
}
|
||||
|
||||
# method 4 - sysV uname command (may truncate)
|
||||
|| eval {
|
||||
$pathstack = $ENV{'PATH'};
|
||||
$ENV{'PATH'} = "/bin:/usr/bin";
|
||||
local $SIG{__DIE__};
|
||||
$host = `uname -n 2>/dev/null`; ## sysVish
|
||||
$ENV{'PATH'} = $pathstack;
|
||||
}
|
||||
|
||||
# method 5 - Apollo pre-SR10
|
||||
|| eval {
|
||||
local $SIG{__DIE__};
|
||||
($host,$a,$b,$c,$d)=split(/[:\. ]/,`/com/host`,6);
|
||||
}
|
||||
|
||||
# bummer
|
||||
|| Carp::croak "Cannot get host name of local machine";
|
||||
|
||||
# remove garbage
|
||||
$host =~ tr/\0\r\n//d;
|
||||
$host;
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
@ -1,276 +0,0 @@
|
|||
package Sys::Syslog;
|
||||
require 5.000;
|
||||
require Exporter;
|
||||
use Carp;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(openlog closelog setlogmask syslog);
|
||||
@EXPORT_OK = qw(setlogsock);
|
||||
|
||||
use Socket;
|
||||
use Sys::Hostname;
|
||||
|
||||
# adapted from syslog.pl
|
||||
#
|
||||
# Tom Christiansen <tchrist@convex.com>
|
||||
# modified to use sockets by Larry Wall <lwall@jpl-devvax.jpl.nasa.gov>
|
||||
# NOTE: openlog now takes three arguments, just like openlog(3)
|
||||
# Modified to add UNIX domain sockets by Sean Robinson <robinson_s@sc.maricopa.edu>
|
||||
# with support from Tim Bunce <Tim.Bunce@ig.co.uk> and the perl5-porters mailing list
|
||||
|
||||
# Todo: enable connect to try all three types before failing (auto setlogsock)?
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Sys::Syslog, openlog, closelog, setlogmask, syslog - Perl interface to the UNIX syslog(3) calls
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use Sys::Syslog; # all except setlogsock, or:
|
||||
use Sys::Syslog qw(:DEFAULT setlogsock); # default set, plus setlogsock
|
||||
|
||||
setlogsock $sock_type;
|
||||
openlog $ident, $logopt, $facility;
|
||||
syslog $priority, $format, @args;
|
||||
$oldmask = setlogmask $mask_priority;
|
||||
closelog;
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Sys::Syslog is an interface to the UNIX C<syslog(3)> program.
|
||||
Call C<syslog()> with a string priority and a list of C<printf()> args
|
||||
just like C<syslog(3)>.
|
||||
|
||||
Syslog provides the functions:
|
||||
|
||||
=over
|
||||
|
||||
=item openlog $ident, $logopt, $facility
|
||||
|
||||
I<$ident> is prepended to every message.
|
||||
I<$logopt> contains zero or more of the words I<pid>, I<ndelay>, I<cons>, I<nowait>.
|
||||
I<$facility> specifies the part of the system
|
||||
|
||||
=item syslog $priority, $format, @args
|
||||
|
||||
If I<$priority> permits, logs I<($format, @args)>
|
||||
printed as by C<printf(3V)>, with the addition that I<%m>
|
||||
is replaced with C<"$!"> (the latest error message).
|
||||
|
||||
=item setlogmask $mask_priority
|
||||
|
||||
Sets log mask I<$mask_priority> and returns the old mask.
|
||||
|
||||
=item setlogsock $sock_type (added in 5.004_02)
|
||||
|
||||
Sets the socket type to be used for the next call to
|
||||
C<openlog()> or C<syslog()> and returns TRUE on success,
|
||||
undef on failure.
|
||||
|
||||
A value of 'unix' will connect to the UNIX domain socket returned by
|
||||
C<_PATH_LOG> in F<syslog.ph>. A value of 'inet' will connect to an
|
||||
INET socket returned by getservbyname(). Any other value croaks.
|
||||
|
||||
The default is for the INET socket to be used.
|
||||
|
||||
=item closelog
|
||||
|
||||
Closes the log file.
|
||||
|
||||
=back
|
||||
|
||||
Note that C<openlog> now takes three arguments, just like C<openlog(3)>.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
openlog($program, 'cons,pid', 'user');
|
||||
syslog('info', 'this is another test');
|
||||
syslog('mail|warning', 'this is a better test: %d', time);
|
||||
closelog();
|
||||
|
||||
syslog('debug', 'this is the last test');
|
||||
|
||||
setlogsock('unix');
|
||||
openlog("$program $$", 'ndelay', 'user');
|
||||
syslog('notice', 'fooprogram: this is really done');
|
||||
|
||||
setlogsock('inet');
|
||||
$! = 55;
|
||||
syslog('info', 'problem was %m'); # %m == $! in syslog(3)
|
||||
|
||||
=head1 DEPENDENCIES
|
||||
|
||||
B<Sys::Syslog> needs F<syslog.ph>, which can be created with C<h2ph>.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<syslog(3)>
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Tom Christiansen E<lt>F<tchrist@perl.com>E<gt> and Larry Wall E<lt>F<larry@wall.org>E<gt>.
|
||||
UNIX domain sockets added by Sean Robinson E<lt>F<robinson_s@sc.maricopa.edu>E<gt>
|
||||
with support from Tim Bunce <Tim.Bunce@ig.co.uk> and the perl5-porters mailing list.
|
||||
|
||||
=cut
|
||||
|
||||
require 'syslog.ph';
|
||||
|
||||
$maskpri = &LOG_UPTO(&LOG_DEBUG);
|
||||
|
||||
sub openlog {
|
||||
($ident, $logopt, $facility) = @_; # package vars
|
||||
$lo_pid = $logopt =~ /\bpid\b/;
|
||||
$lo_ndelay = $logopt =~ /\bndelay\b/;
|
||||
$lo_cons = $logopt =~ /\bcons\b/;
|
||||
$lo_nowait = $logopt =~ /\bnowait\b/;
|
||||
&connect if $lo_ndelay;
|
||||
}
|
||||
|
||||
sub closelog {
|
||||
$facility = $ident = '';
|
||||
&disconnect;
|
||||
}
|
||||
|
||||
sub setlogmask {
|
||||
local($oldmask) = $maskpri;
|
||||
$maskpri = shift;
|
||||
$oldmask;
|
||||
}
|
||||
|
||||
sub setlogsock {
|
||||
local($setsock) = shift;
|
||||
&disconnect if $connected;
|
||||
if (lc($setsock) eq 'unix') {
|
||||
if (defined &_PATH_LOG) {
|
||||
$sock_type = 1;
|
||||
} else {
|
||||
return undef;
|
||||
}
|
||||
} elsif (lc($setsock) eq 'inet') {
|
||||
if (getservbyname('syslog','udp')) {
|
||||
undef($sock_type);
|
||||
} else {
|
||||
return undef;
|
||||
}
|
||||
} else {
|
||||
croak "Invalid argument passed to setlogsock; must be 'unix' or 'inet'";
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub syslog {
|
||||
local($priority) = shift;
|
||||
local($mask) = shift;
|
||||
local($message, $whoami);
|
||||
local(@words, $num, $numpri, $numfac, $sum);
|
||||
local($facility) = $facility; # may need to change temporarily.
|
||||
|
||||
croak "syslog: expected both priority and mask" unless $mask && $priority;
|
||||
|
||||
@words = split(/\W+/, $priority, 2);# Allow "level" or "level|facility".
|
||||
undef $numpri;
|
||||
undef $numfac;
|
||||
foreach (@words) {
|
||||
$num = &xlate($_); # Translate word to number.
|
||||
if (/^kern$/ || $num < 0) {
|
||||
croak "syslog: invalid level/facility: $_";
|
||||
}
|
||||
elsif ($num <= &LOG_PRIMASK) {
|
||||
croak "syslog: too many levels given: $_" if defined($numpri);
|
||||
$numpri = $num;
|
||||
return 0 unless &LOG_MASK($numpri) & $maskpri;
|
||||
}
|
||||
else {
|
||||
croak "syslog: too many facilities given: $_" if defined($numfac);
|
||||
$facility = $_;
|
||||
$numfac = $num;
|
||||
}
|
||||
}
|
||||
|
||||
croak "syslog: level must be given" unless defined($numpri);
|
||||
|
||||
if (!defined($numfac)) { # Facility not specified in this call.
|
||||
$facility = 'user' unless $facility;
|
||||
$numfac = &xlate($facility);
|
||||
}
|
||||
|
||||
&connect unless $connected;
|
||||
|
||||
$whoami = $ident;
|
||||
|
||||
if (!$whoami && $mask =~ /^(\S.*?):\s?(.*)/) {
|
||||
$whoami = $1;
|
||||
$mask = $2;
|
||||
}
|
||||
|
||||
unless ($whoami) {
|
||||
($whoami = getlogin) ||
|
||||
($whoami = getpwuid($<)) ||
|
||||
($whoami = 'syslog');
|
||||
}
|
||||
|
||||
$whoami .= "[$$]" if $lo_pid;
|
||||
|
||||
$mask =~ s/%m/$!/g;
|
||||
$mask .= "\n" unless $mask =~ /\n$/;
|
||||
$message = sprintf ($mask, @_);
|
||||
|
||||
$sum = $numpri + $numfac;
|
||||
unless (send(SYSLOG,"<$sum>$whoami: $message\0",0)) {
|
||||
if ($lo_cons) {
|
||||
if ($pid = fork) {
|
||||
unless ($lo_nowait) {
|
||||
$died = waitpid($pid, 0);
|
||||
}
|
||||
}
|
||||
else {
|
||||
open(CONS,">/dev/console");
|
||||
print CONS "<$facility.$priority>$whoami: $message\r";
|
||||
exit if defined $pid; # if fork failed, we're parent
|
||||
close CONS;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub xlate {
|
||||
local($name) = @_;
|
||||
$name = uc $name;
|
||||
$name = "LOG_$name" unless $name =~ /^LOG_/;
|
||||
$name = "Sys::Syslog::$name";
|
||||
defined &$name ? &$name : -1;
|
||||
}
|
||||
|
||||
sub connect {
|
||||
unless ($host) {
|
||||
require Sys::Hostname;
|
||||
my($host_uniq) = Sys::Hostname::hostname();
|
||||
($host) = $host_uniq =~ /([A-Za-z0-9_.-]+)/; # allow FQDN (inc _)
|
||||
}
|
||||
unless ( $sock_type ) {
|
||||
my $udp = getprotobyname('udp');
|
||||
my $syslog = getservbyname('syslog','udp');
|
||||
my $this = sockaddr_in($syslog, INADDR_ANY);
|
||||
my $that = sockaddr_in($syslog, inet_aton($host) || croak "Can't lookup $host");
|
||||
socket(SYSLOG,AF_INET,SOCK_DGRAM,$udp) || croak "socket: $!";
|
||||
connect(SYSLOG,$that) || croak "connect: $!";
|
||||
} else {
|
||||
my $syslog = &_PATH_LOG || croak "_PATH_LOG not found in syslog.ph";
|
||||
my $that = sockaddr_un($syslog) || croak "Can't locate $syslog";
|
||||
socket(SYSLOG,AF_UNIX,SOCK_STREAM,0) || croak "socket: $!";
|
||||
if (!connect(SYSLOG,$that)) {
|
||||
socket(SYSLOG,AF_UNIX,SOCK_DGRAM,0) || croak "socket: $!";
|
||||
connect(SYSLOG,$that) || croak "connect: $! (SOCK_DGRAM after trying SOCK_STREAM)";
|
||||
}
|
||||
}
|
||||
local($old) = select(SYSLOG); $| = 1; select($old);
|
||||
$connected = 1;
|
||||
}
|
||||
|
||||
sub disconnect {
|
||||
close SYSLOG;
|
||||
$connected = 0;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
|
||||
# This file is built by mktables.PL from e.g. Unicode.300.
|
||||
# Any changes made here will be lost!
|
||||
return <<'END';
|
||||
fb55
|
||||
fb59
|
||||
fb5d
|
||||
fb61
|
||||
fb65
|
||||
fb69
|
||||
fb6d
|
||||
fb71
|
||||
fb75
|
||||
fb79
|
||||
fb7d
|
||||
fb81
|
||||
fb91
|
||||
fb95
|
||||
fb99
|
||||
fb9d
|
||||
fba3
|
||||
fba9
|
||||
fbad
|
||||
fbd6
|
||||
fbe7
|
||||
fbe9
|
||||
fbff
|
||||
fcdf fcf4
|
||||
fd34 fd3b
|
||||
fe71
|
||||
fe77
|
||||
fe79
|
||||
fe7b
|
||||
fe7d
|
||||
fe7f
|
||||
fe8c
|
||||
fe92
|
||||
fe98
|
||||
fe9c
|
||||
fea0
|
||||
fea4
|
||||
fea8
|
||||
feb4
|
||||
feb8
|
||||
febc
|
||||
fec0
|
||||
fec4
|
||||
fec8
|
||||
fecc
|
||||
fed0
|
||||
fed4
|
||||
fed8
|
||||
fedc
|
||||
fee0
|
||||
fee4
|
||||
fee8
|
||||
feec
|
||||
fef4
|
||||
END
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,345 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
||||
|
||||
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
|
||||
<html>
|
||||
|
||||
|
||||
|
||||
<head>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
|
||||
|
||||
<meta name="ProgId" content="FrontPage.Editor.Document">
|
||||
|
||||
<link rel="stylesheet" href="http://www.unicode.org/unicode.css" type="text/css">
|
||||
|
||||
<title>Unicode Character Database</title>
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<h1>UNICODE CHARACTER DATABASE<br>
|
||||
Version 3.0.0</h1>
|
||||
|
||||
<table border="1" cellspacing="2" cellpadding="0" height="87" width="100%">
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="TOP" width="144">Revision</td>
|
||||
|
||||
<td valign="TOP">3.0.0</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="TOP" width="144">Authors</td>
|
||||
|
||||
<td valign="TOP">Mark Davis and Ken Whistler</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="TOP" width="144">Date</td>
|
||||
|
||||
<td valign="TOP">1999-09-11</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="TOP" width="144">This Version</td>
|
||||
|
||||
<td valign="TOP"><a href="ftp://ftp.unicode.org/Public/3.0-Update/UnicodeCharacterDatabase-3.0.0.html">ftp://ftp.unicode.org/Public/3.0-Update/UnicodeCharacterDatabase-3.0.0.html</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="TOP" width="144">Previous Version</td>
|
||||
|
||||
<td valign="TOP">n/a</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="TOP" width="144">Latest Version</td>
|
||||
|
||||
<td valign="TOP"><a href="ftp://ftp.unicode.org/Public/3.0-Update/UnicodeCharacterDatabase-3.0.0.html">ftp://ftp.unicode.org/Public/3.0-Update/UnicodeCharacterDatabase-3.0.0.html</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p align="center">Copyright © 1995-1999 Unicode, Inc. All Rights reserved.</p>
|
||||
|
||||
<h2>Disclaimer</h2>
|
||||
|
||||
<p>The Unicode Character Database is provided as is by Unicode, Inc. No claims
|
||||
|
||||
are made as to fitness for any particular purpose. No warranties of any kind are
|
||||
|
||||
expressed or implied. The recipient agrees to determine applicability of
|
||||
|
||||
information provided. If this file has been purchased on magnetic or optical
|
||||
|
||||
media from Unicode, Inc., the sole remedy for any claim will be exchange of
|
||||
|
||||
defective media within 90 days of receipt.</p>
|
||||
|
||||
<p>This disclaimer is applicable for all other data files accompanying the
|
||||
|
||||
Unicode Character Database, some of which have been compiled by the Unicode
|
||||
|
||||
Consortium, and some of which have been supplied by other sources.</p>
|
||||
|
||||
<h2>Limitations on Rights to Redistribute This Data</h2>
|
||||
|
||||
<p>Recipient is granted the right to make copies in any form for internal
|
||||
|
||||
distribution and to freely use the information supplied in the creation of
|
||||
|
||||
products supporting the Unicode<sup>TM</sup> Standard. The files in the Unicode
|
||||
|
||||
Character Database can be redistributed to third parties or other organizations
|
||||
|
||||
(whether for profit or not) as long as this notice and the disclaimer notice are
|
||||
|
||||
retained. Information can be extracted from these files and used in
|
||||
|
||||
documentation or programs, as long as there is an accompanying notice indicating
|
||||
|
||||
the source.</p>
|
||||
|
||||
<h2>Introduction</h2>
|
||||
|
||||
<p>The Unicode Character Database is a set of files that define the Unicode
|
||||
|
||||
character properties and internal mappings. For more information about character
|
||||
|
||||
properties and mappings, see <i><a href="http://www.unicode.org/unicode/uni2book/u2.html">The
|
||||
|
||||
Unicode Standard</a></i>.</p>
|
||||
|
||||
<p>The Unicode Character Database has been updated to reflect Version 3.0 of the
|
||||
|
||||
Unicode Standard, with many characters added to those published in Version 2.0.
|
||||
|
||||
A number of corrections have also been made to case mappings or other errors in
|
||||
|
||||
the database noted since the publication of Version 2.0. Normative bidirectional
|
||||
|
||||
properties have also been modified to reflect decisions of the Unicode Technical
|
||||
|
||||
Committee.</p>
|
||||
|
||||
<p>For more information on versions of the Unicode Standard and how to reference
|
||||
|
||||
them, see <a href="http://www.unicode.org/unicode/standard/versions/">http://www.unicode.org/unicode/standard/versions/</a>.</p>
|
||||
|
||||
<h2>Conformance</h2>
|
||||
|
||||
<p>Character properties may be either normative or informative. <i>Normative</i>
|
||||
|
||||
means that implementations that claim conformance to the Unicode Standard (at a
|
||||
|
||||
particular version) and which make use of a particular property or field must
|
||||
|
||||
follow the specifications of the standard for that property or field in order to
|
||||
|
||||
be conformant. The term <i>normative</i> when applied to a property or field of
|
||||
|
||||
the Unicode Character Database, does <i>not</i> mean that the value of that
|
||||
|
||||
field will never change. Corrections and extensions to the standard in the
|
||||
|
||||
future may require minor changes to normative values, even though the Unicode
|
||||
|
||||
Technical Committee strives to minimize such changes. An<i> informative </i>property
|
||||
|
||||
or field is strongly recommended, but a conformant implementation is free to use
|
||||
|
||||
or change such values as it may require while still being conformant to the
|
||||
|
||||
standard. Particular implementations may choose to override the properties and
|
||||
|
||||
mappings that are not normative. In that case, it is up to the implementer to
|
||||
|
||||
establish a protocol to convey that information.</p>
|
||||
|
||||
<h2>Files</h2>
|
||||
|
||||
<p>The following summarizes the files in the Unicode Character Database. For
|
||||
|
||||
more information about these files, see the referenced technical report or
|
||||
|
||||
section of Unicode Standard, Version 3.0.</p>
|
||||
|
||||
<p><b>UnicodeData.txt (Chapter 4)</b>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>The main file in the Unicode Character Database.</li>
|
||||
|
||||
<li>For detailed information on the format, see <a href="UnicodeData.html">UnicodeData.html</a>.
|
||||
|
||||
This file also characterizes which properties are normative and which are
|
||||
|
||||
informative.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p><b>PropList.txt (Chapter 4)</b>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Additional informative properties list: <i>Alphabetic, Ideographic,</i>
|
||||
|
||||
and <i>Mathematical</i>, among others.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p><b>SpecialCasing.txt (Chapter 4)</b>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>List of informative special casing properties, including one-to-many
|
||||
|
||||
mappings such as SHARP S => "SS", and locale-specific mappings,
|
||||
|
||||
such as for Turkish <i>dotless i</i>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p><b>Blocks.txt (Chapter 14)</b>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>List of normative block names.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p><b>Jamo.txt (Chapter 4)</b>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>List of normative Jamo short names, used in deriving HANGUL SYLLABLE names
|
||||
|
||||
algorithmically.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p><b>ArabicShaping.txt (Section 8.2)</b>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Basic Arabic and Syriac character shaping properties, such as initial,
|
||||
|
||||
medial and final shapes. These properties are normative for minimal shaping
|
||||
|
||||
of Arabic and Syriac. </li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p><b>NamesList.txt (Chapter 14)</b>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>This file duplicates some of the material in the UnicodeData file, and
|
||||
|
||||
adds informative annotations uses in the character charts, as printed in the
|
||||
|
||||
Unicode Standard. </li>
|
||||
|
||||
<li><b>Note: </b>The information in NamesList.txt and Index.txt files matches
|
||||
|
||||
the appropriate version of the book. Changes in the Unicode Character
|
||||
|
||||
Database since then may not be reflected in these files, since they are
|
||||
|
||||
primarily of archival interest.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p><b>Index.txt (Chapter 14)</b>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Informative index to Unicode characters, as printed in the Unicode
|
||||
|
||||
Standard</li>
|
||||
|
||||
<li><b>Note: </b>The information in NamesList.txt and Index.txt files matches
|
||||
|
||||
the appropriate version of the book. Changes in the Unicode Character
|
||||
|
||||
Database since then may not be reflected in these files, since they are
|
||||
|
||||
primarily of archival interest.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p><b>CompositionExclusions.txt (<a href="http://www.unicode.org/unicode/reports/tr15/">UTR#15
|
||||
|
||||
Unicode Normalization Forms</a>)</b>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Normative properties for normalization.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p><b>LineBreak.txt (<a href="http://www.unicode.org/unicode/reports/tr14/">UTR
|
||||
|
||||
#14: Line Breaking Properties</a>)</b>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Normative and informative properties for line breaking. To see which
|
||||
|
||||
properties are informative and which are normative, consult UTR#14.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p><b>EastAsianWidth.txt (<a href="http://www.unicode.org/unicode/reports/tr11/">UTR
|
||||
|
||||
#11: East Asian Character Width</a>)</b>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Informative properties for determining the choice of wide vs. narrow
|
||||
|
||||
glyphs in East Asian contexts.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p><b>diffXvY.txt</b>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Mechanically-generated informative files containing accumulated
|
||||
|
||||
differences between successive versions of UnicodeData.txt</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,43 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This script is designed to provide a handy summary of the configuration
|
||||
# information being used to build perl. This is especially useful if you
|
||||
# are requesting help from comp.lang.perl.misc on usenet or via mail.
|
||||
|
||||
if test -f config.sh; then TOP=.;
|
||||
elif test -f ../config.sh; then TOP=..;
|
||||
elif test -f ../../config.sh; then TOP=../..;
|
||||
elif test -f ../../../config.sh; then TOP=../../..;
|
||||
elif test -f ../../../../config.sh; then TOP=../../../..;
|
||||
else
|
||||
echo "Can't find the perl config.sh file produced by Configure"; exit 1
|
||||
fi
|
||||
. $TOP/config.sh
|
||||
|
||||
# Note that the text lines /^Summary of/ .. /^\s*$/ are copied into Config.pm.
|
||||
|
||||
$spitshell <<!GROK!THIS!
|
||||
Summary of my $package ($baserev patchlevel $PATCHLEVEL subversion $SUBVERSION) configuration:
|
||||
Platform:
|
||||
osname=$osname, osvers=$osvers, archname=$archname
|
||||
uname='$myuname'
|
||||
hint=$hint, useposix=$useposix, d_sigaction=$d_sigaction
|
||||
usethreads=$usethreads useperlio=$useperlio d_sfio=$d_sfio
|
||||
Compiler:
|
||||
cc='$cc', optimize='$optimize', gccversion=$gccversion
|
||||
cppflags='$cppflags'
|
||||
ccflags ='$ccflags'
|
||||
stdchar='$stdchar', d_stdstdio=$d_stdstdio, usevfork=$usevfork
|
||||
intsize=$intsize, longsize=$longsize, ptrsize=$ptrsize, doublesize=$doublesize
|
||||
d_longlong=$d_longlong, longlongsize=$longlongsize, d_longdbl=$d_longdbl, longdblsize=$longdblsize
|
||||
alignbytes=$alignbytes, usemymalloc=$usemymalloc, prototype=$prototype
|
||||
Linker and Libraries:
|
||||
ld='$ld', ldflags ='$ldflags'
|
||||
libpth=$libpth
|
||||
libs=$libs
|
||||
libc=$libc, so=$so, useshrplib=$useshrplib, libperl=$libperl
|
||||
Dynamic Linking:
|
||||
dlsrc=$dlsrc, dlext=$dlext, d_dlsymun=$d_dlsymun, ccdlflags='$ccdlflags'
|
||||
cccdlflags='$cccdlflags', lddlflags='$lddlflags'
|
||||
|
||||
!GROK!THIS!
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,132 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Written: Nov 1994 Wayne Scott <wscott@ichips.intel.com>
|
||||
#
|
||||
# Updated: 1997-8 Jarkko Hietaniemi <jhi@iki.fi>
|
||||
#
|
||||
# Create the export list for perl.
|
||||
# Needed by AIX to do dynamic linking.
|
||||
#
|
||||
# This simple program relies on 'global.sym' and few other *.sym files
|
||||
# and the *var*.h files being up to date with all of the global
|
||||
# symbols that a dynamic link library might want to access.
|
||||
#
|
||||
# Most symbols have a Perl_ or PL_prefix because that's what embed.h
|
||||
# sticks in front of them.
|
||||
#
|
||||
# AIX requires the list of external symbols (variables or functions)
|
||||
# that are made available for another executable object file the import.
|
||||
# The list is called the export file and it is a simple text file.
|
||||
# The first line must be
|
||||
#!
|
||||
# That is, hash-bang, pound-shout, however you want to call it.
|
||||
# The remainder of the file are the names of the symbols, one per line.
|
||||
# The file is then given to the system loader (cc/xlc command line)
|
||||
# as -bE:export.file.
|
||||
|
||||
case $CONFIG in
|
||||
'')
|
||||
if test -f config.sh; then TOP=.;
|
||||
elif test -f ../config.sh; then TOP=..;
|
||||
elif test -f ../../config.sh; then TOP=../..;
|
||||
elif test -f ../../../config.sh; then TOP=../../..;
|
||||
elif test -f ../../../../config.sh; then TOP=../../../..;
|
||||
else
|
||||
echo "Can't find config.sh."; exit 1
|
||||
fi
|
||||
. $TOP/config.sh
|
||||
;;
|
||||
esac
|
||||
: This forces SH files to create target in same directory as SH file.
|
||||
: This is so that make depend always knows where to find SH derivatives.
|
||||
case "$0" in
|
||||
*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
|
||||
esac
|
||||
|
||||
echo "Extracting perl.exp"
|
||||
|
||||
rm -f perl.exp
|
||||
echo "#!" > perl.exp
|
||||
|
||||
# No compat3 since 5.004_50.
|
||||
# No interp.sym since 5.005_03.
|
||||
# perlio.sym will added later if needed.
|
||||
|
||||
syms="global.sym thread.sym"
|
||||
|
||||
sed -n '/^[A-Za-z]/ s/^/Perl_/p' $syms >> perl.exp
|
||||
|
||||
sed -n 's/^PERLVAR.*(G\([^[,]*\).*/PL_\1/p' perlvars.h >> perl.exp
|
||||
sed -n 's/^PERLVAR.*(I\([^[,]*\).*/PL_\1/p' intrpvar.h >> perl.exp
|
||||
sed -n 's/^PERLVAR.*(T\([^[,]*\).*/PL_\1/p' thrdvar.h >> perl.exp
|
||||
|
||||
#
|
||||
# If we use the PerlIO abstraction layer, add its symbols.
|
||||
#
|
||||
|
||||
if [ $useperlio = "define" ]
|
||||
then
|
||||
grep '^[A-Za-z]' perlio.sym >> perl.exp
|
||||
fi
|
||||
|
||||
#
|
||||
# Extra globals not included above (including a few that might
|
||||
# not actually be defined, but there's no harm in that).
|
||||
#
|
||||
|
||||
cat >> perl.exp <<END
|
||||
perl_init_i18nl10n
|
||||
perl_init_i18nl14n
|
||||
perl_new_collate
|
||||
perl_new_ctype
|
||||
perl_new_numeric
|
||||
perl_set_numeric_local
|
||||
perl_set_numeric_standard
|
||||
perl_alloc
|
||||
perl_construct
|
||||
perl_destruct
|
||||
perl_free
|
||||
perl_parse
|
||||
perl_run
|
||||
perl_get_sv
|
||||
perl_get_av
|
||||
perl_get_hv
|
||||
perl_get_cv
|
||||
perl_call_argv
|
||||
perl_call_pv
|
||||
perl_call_method
|
||||
perl_call_sv
|
||||
perl_eval_pv
|
||||
perl_eval_sv
|
||||
perl_require_pv
|
||||
cast_i32
|
||||
cast_iv
|
||||
cast_uv
|
||||
END
|
||||
|
||||
case "$ccflags" in
|
||||
*-DHIDEMYMALLOC*)
|
||||
cat >>perl.exp <<END
|
||||
Mymalloc
|
||||
Mycalloc
|
||||
Myremalloc
|
||||
Myfree
|
||||
END
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$ccflags" in
|
||||
*-DEMBEDMYMALLOC*)
|
||||
cat >>perl.exp <<END
|
||||
Perl_malloc
|
||||
Perl_calloc
|
||||
Perl_realloc
|
||||
Perl_free
|
||||
END
|
||||
;;
|
||||
esac
|
||||
|
||||
# The shebang line nicely sorts as the first one.
|
||||
sort -o perl.exp -u perl.exp
|
||||
|
||||
# eof
|
||||
|
|
@ -1,364 +0,0 @@
|
|||
CONVERTERS = pod2html pod2latex pod2man pod2text checkpods \
|
||||
pod2usage podchecker podselect
|
||||
|
||||
HTMLROOT = / # Change this to fix cross-references in HTML
|
||||
POD2HTML = pod2html \
|
||||
--htmlroot=$(HTMLROOT) \
|
||||
--podroot=.. --podpath=pod:lib:ext:vms \
|
||||
--libpods=perlfunc:perlguts:perlvar:perlrun:perlop
|
||||
|
||||
all: $(CONVERTERS) man
|
||||
|
||||
converters: $(CONVERTERS)
|
||||
|
||||
PERL = ../miniperl
|
||||
REALPERL = ../perl
|
||||
|
||||
POD = \
|
||||
perl.pod \
|
||||
perldelta.pod \
|
||||
perl5004delta.pod \
|
||||
perl5005delta.pod \
|
||||
perldata.pod \
|
||||
perlsyn.pod \
|
||||
perlop.pod \
|
||||
perlre.pod \
|
||||
perlrun.pod \
|
||||
perlfunc.pod \
|
||||
perlopentut.pod \
|
||||
perlvar.pod \
|
||||
perlsub.pod \
|
||||
perlmod.pod \
|
||||
perlmodlib.pod \
|
||||
perlmodinstall.pod \
|
||||
perlfork.pod \
|
||||
perlform.pod \
|
||||
perllocale.pod \
|
||||
perlref.pod \
|
||||
perlreftut.pod \
|
||||
perldsc.pod \
|
||||
perllol.pod \
|
||||
perlboot.pod \
|
||||
perltoot.pod \
|
||||
perltootc.pod \
|
||||
perlobj.pod \
|
||||
perltie.pod \
|
||||
perlbot.pod \
|
||||
perlipc.pod \
|
||||
perlthrtut.pod \
|
||||
perldbmfilter.pod \
|
||||
perldebguts.pod \
|
||||
perldebug.pod \
|
||||
perlnumber.pod \
|
||||
perldiag.pod \
|
||||
perlsec.pod \
|
||||
perltrap.pod \
|
||||
perlport.pod \
|
||||
perlstyle.pod \
|
||||
perlpod.pod \
|
||||
perlbook.pod \
|
||||
perlembed.pod \
|
||||
perlapio.pod \
|
||||
perlxs.pod \
|
||||
perlxstut.pod \
|
||||
perlguts.pod \
|
||||
perlcall.pod \
|
||||
perlcompile.pod \
|
||||
perltodo.pod \
|
||||
perlapi.pod \
|
||||
perlintern.pod \
|
||||
perlhack.pod \
|
||||
perlhist.pod \
|
||||
perlfaq.pod \
|
||||
perlfaq1.pod \
|
||||
perlfaq2.pod \
|
||||
perlfaq3.pod \
|
||||
perlfaq4.pod \
|
||||
perlfaq5.pod \
|
||||
perlfaq6.pod \
|
||||
perlfaq7.pod \
|
||||
perlfaq8.pod \
|
||||
perlfaq9.pod \
|
||||
perltoc.pod
|
||||
|
||||
MAN = \
|
||||
perl.man \
|
||||
perldelta.man \
|
||||
perl5004delta.man \
|
||||
perl5005delta.man \
|
||||
perldata.man \
|
||||
perlsyn.man \
|
||||
perlop.man \
|
||||
perlre.man \
|
||||
perlrun.man \
|
||||
perlfunc.man \
|
||||
perlopentut.man \
|
||||
perlvar.man \
|
||||
perlsub.man \
|
||||
perlmod.man \
|
||||
perlmodlib.man \
|
||||
perlmodinstall.man \
|
||||
perlfork.man \
|
||||
perlform.man \
|
||||
perllocale.man \
|
||||
perlref.man \
|
||||
perlreftut.man \
|
||||
perldsc.man \
|
||||
perllol.man \
|
||||
perlboot.man \
|
||||
perltoot.man \
|
||||
perltootc.man \
|
||||
perlobj.man \
|
||||
perltie.man \
|
||||
perlbot.man \
|
||||
perlipc.man \
|
||||
perlthrtut.man \
|
||||
perldbmfilter.man \
|
||||
perldebguts.man \
|
||||
perldebug.man \
|
||||
perlnumber.man \
|
||||
perldiag.man \
|
||||
perlsec.man \
|
||||
perltrap.man \
|
||||
perlport.man \
|
||||
perlstyle.man \
|
||||
perlpod.man \
|
||||
perlbook.man \
|
||||
perlembed.man \
|
||||
perlapio.man \
|
||||
perlxs.man \
|
||||
perlxstut.man \
|
||||
perlguts.man \
|
||||
perlcall.man \
|
||||
perlcompile.man \
|
||||
perltodo.man \
|
||||
perlapi.man \
|
||||
perlintern.man \
|
||||
perlhack.man \
|
||||
perlhist.man \
|
||||
perlfaq.man \
|
||||
perlfaq1.man \
|
||||
perlfaq2.man \
|
||||
perlfaq3.man \
|
||||
perlfaq4.man \
|
||||
perlfaq5.man \
|
||||
perlfaq6.man \
|
||||
perlfaq7.man \
|
||||
perlfaq8.man \
|
||||
perlfaq9.man \
|
||||
perltoc.man
|
||||
|
||||
HTML = \
|
||||
perl.html \
|
||||
perldelta.html \
|
||||
perl5004delta.html \
|
||||
perl5005delta.html \
|
||||
perldata.html \
|
||||
perlsyn.html \
|
||||
perlop.html \
|
||||
perlre.html \
|
||||
perlrun.html \
|
||||
perlfunc.html \
|
||||
perlopentut.html \
|
||||
perlvar.html \
|
||||
perlsub.html \
|
||||
perlmod.html \
|
||||
perlmodlib.html \
|
||||
perlmodinstall.html \
|
||||
perlfork.html \
|
||||
perlform.html \
|
||||
perllocale.html \
|
||||
perlref.html \
|
||||
perlreftut.html \
|
||||
perldsc.html \
|
||||
perllol.html \
|
||||
perlboot.html \
|
||||
perltoot.html \
|
||||
perltootc.html \
|
||||
perlobj.html \
|
||||
perltie.html \
|
||||
perlbot.html \
|
||||
perlipc.html \
|
||||
perlthrtut.html \
|
||||
perldbmfilter.html \
|
||||
perldebguts.html \
|
||||
perldebug.html \
|
||||
perlnumber.html \
|
||||
perldiag.html \
|
||||
perlsec.html \
|
||||
perltrap.html \
|
||||
perlport.html \
|
||||
perlstyle.html \
|
||||
perlpod.html \
|
||||
perlbook.html \
|
||||
perlembed.html \
|
||||
perlapio.html \
|
||||
perlxs.html \
|
||||
perlxstut.html \
|
||||
perlguts.html \
|
||||
perlcall.html \
|
||||
perlcompile.html \
|
||||
perltodo.html \
|
||||
perlapi.html \
|
||||
perlintern.html \
|
||||
perlhack.html \
|
||||
perlhist.html \
|
||||
perlfaq.html \
|
||||
perlfaq1.html \
|
||||
perlfaq2.html \
|
||||
perlfaq3.html \
|
||||
perlfaq4.html \
|
||||
perlfaq5.html \
|
||||
perlfaq6.html \
|
||||
perlfaq7.html \
|
||||
perlfaq8.html \
|
||||
perlfaq9.html
|
||||
# not perltoc.html
|
||||
|
||||
TEX = \
|
||||
perl.tex \
|
||||
perldelta.tex \
|
||||
perl5004delta.tex \
|
||||
perl5005delta.tex \
|
||||
perldata.tex \
|
||||
perlsyn.tex \
|
||||
perlop.tex \
|
||||
perlre.tex \
|
||||
perlrun.tex \
|
||||
perlfunc.tex \
|
||||
perlopentut.tex \
|
||||
perlvar.tex \
|
||||
perlsub.tex \
|
||||
perlmod.tex \
|
||||
perlmodlib.tex \
|
||||
perlmodinstall.tex \
|
||||
perlfork.tex \
|
||||
perlform.tex \
|
||||
perllocale.tex \
|
||||
perlref.tex \
|
||||
perlreftut.tex \
|
||||
perldsc.tex \
|
||||
perllol.tex \
|
||||
perlboot.tex \
|
||||
perltoot.tex \
|
||||
perltootc.tex \
|
||||
perlobj.tex \
|
||||
perltie.tex \
|
||||
perlbot.tex \
|
||||
perlipc.tex \
|
||||
perlthrtut.tex \
|
||||
perldbmfilter.tex \
|
||||
perldebguts.tex \
|
||||
perldebug.tex \
|
||||
perlnumber.tex \
|
||||
perldiag.tex \
|
||||
perlsec.tex \
|
||||
perltrap.tex \
|
||||
perlport.tex \
|
||||
perlstyle.tex \
|
||||
perlpod.tex \
|
||||
perlbook.tex \
|
||||
perlembed.tex \
|
||||
perlapio.tex \
|
||||
perlxs.tex \
|
||||
perlxstut.tex \
|
||||
perlguts.tex \
|
||||
perlcall.tex \
|
||||
perlcompile.tex \
|
||||
perltodo.tex \
|
||||
perlapi.tex \
|
||||
perlintern.tex \
|
||||
perlhack.tex \
|
||||
perlhist.tex \
|
||||
perlfaq.tex \
|
||||
perlfaq1.tex \
|
||||
perlfaq2.tex \
|
||||
perlfaq3.tex \
|
||||
perlfaq4.tex \
|
||||
perlfaq5.tex \
|
||||
perlfaq6.tex \
|
||||
perlfaq7.tex \
|
||||
perlfaq8.tex \
|
||||
perlfaq9.tex \
|
||||
perltoc.tex
|
||||
|
||||
man: pod2man $(MAN)
|
||||
|
||||
html: pod2html $(HTML)
|
||||
|
||||
tex: pod2latex $(TEX)
|
||||
|
||||
toc:
|
||||
$(PERL) -I../lib buildtoc >perltoc.pod
|
||||
|
||||
.SUFFIXES: .pm .pod
|
||||
|
||||
.SUFFIXES: .man
|
||||
|
||||
.pm.man: pod2man
|
||||
$(PERL) -I../lib pod2man $*.pm >$*.man
|
||||
|
||||
.pod.man: pod2man
|
||||
$(PERL) -I../lib pod2man $*.pod >$*.man
|
||||
|
||||
.SUFFIXES: .html
|
||||
|
||||
.pm.html: pod2html
|
||||
$(PERL) -I../lib $(POD2HTML) --infile=$*.pm --outfile=$*.html
|
||||
|
||||
.pod.html: pod2html
|
||||
$(PERL) -I../lib $(POD2HTML) --infile=$*.pod --outfile=$*.html
|
||||
|
||||
.SUFFIXES: .tex
|
||||
|
||||
.pm.tex: pod2latex
|
||||
$(PERL) -I../lib pod2latex $*.pm
|
||||
|
||||
.pod.tex: pod2latex
|
||||
$(PERL) -I../lib pod2latex $*.pod
|
||||
|
||||
clean:
|
||||
rm -f $(MAN)
|
||||
rm -f $(HTML)
|
||||
rm -f $(TEX)
|
||||
rm -f pod2html-*cache
|
||||
rm -f *.aux *.log *.exe
|
||||
|
||||
realclean: clean
|
||||
rm -f $(CONVERTERS)
|
||||
|
||||
distclean: realclean
|
||||
|
||||
check: checkpods
|
||||
@echo "checking..."; \
|
||||
$(PERL) -I../lib checkpods $(POD)
|
||||
|
||||
# Dependencies.
|
||||
pod2latex: pod2latex.PL ../lib/Config.pm
|
||||
$(PERL) -I../lib pod2latex.PL
|
||||
|
||||
pod2html: pod2html.PL ../lib/Config.pm
|
||||
$(PERL) -I ../lib pod2html.PL
|
||||
|
||||
pod2man: pod2man.PL ../lib/Config.pm
|
||||
$(PERL) -I ../lib pod2man.PL
|
||||
|
||||
pod2text: pod2text.PL ../lib/Config.pm
|
||||
$(PERL) -I ../lib pod2text.PL
|
||||
|
||||
checkpods: checkpods.PL ../lib/Config.pm
|
||||
$(PERL) -I ../lib checkpods.PL
|
||||
|
||||
pod2usage: pod2usage.PL ../lib/Config.pm
|
||||
$(PERL) -I ../lib pod2usage.PL
|
||||
|
||||
podchecker: podchecker.PL ../lib/Config.pm
|
||||
$(PERL) -I ../lib podchecker.PL
|
||||
|
||||
podselect: podselect.PL ../lib/Config.pm
|
||||
$(PERL) -I ../lib podselect.PL
|
||||
|
||||
compile: all
|
||||
$(REALPERL) -I../lib ../utils/perlcc -regex 's/$$/.exe/' pod2latex pod2man pod2text checkpods -prog -verbose dcf -log ../compilelog;
|
||||
|
||||
|
||||
|
|
@ -1,284 +0,0 @@
|
|||
=head1 NAME
|
||||
|
||||
Win32 - Interfaces to some Win32 API Functions
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Perl on Win32 contains several functions to access Win32 APIs. Some
|
||||
are included in Perl itself (on Win32) and some are only available
|
||||
after explicitly requesting the Win32 module with:
|
||||
|
||||
use Win32;
|
||||
|
||||
The builtin functions are marked as [CORE] and the other ones
|
||||
as [EXT] in the following alphabetical listing. The C<Win32> module
|
||||
is not part of the Perl source distribution; it is distributed in
|
||||
the libwin32 bundle of Win32::* modules on CPAN. The module is
|
||||
already preinstalled in binary distributions like ActivePerl.
|
||||
|
||||
=head2 Alphabetical Listing of Win32 Functions
|
||||
|
||||
=over
|
||||
|
||||
=item Win32::AbortSystemShutdown(MACHINE)
|
||||
|
||||
[EXT] Aborts a system shutdown (started by the
|
||||
InitiateSystemShutdown function) on the specified MACHINE.
|
||||
|
||||
=item Win32::BuildNumber()
|
||||
|
||||
[CORE] Returns the ActivePerl build number. This function is
|
||||
only available in the ActivePerl binary distribution.
|
||||
|
||||
=item Win32::CopyFile(FROM, TO, OVERWRITE)
|
||||
|
||||
[CORE] The Win32::CopyFile() function copies an existing file to a new
|
||||
file. All file information like creation time and file attributes will
|
||||
be copied to the new file. However it will B<not> copy the security
|
||||
information. If the destination file already exists it will only be
|
||||
overwritten when the OVERWRITE parameter is true. But even this will
|
||||
not overwrite a read-only file; you have to unlink() it first
|
||||
yourself.
|
||||
|
||||
=item Win32::DomainName()
|
||||
|
||||
[CORE] Returns the name of the Microsoft Network domain that the
|
||||
owner of the current perl process is logged into.
|
||||
|
||||
=item Win32::ExpandEnvironmentStrings(STRING)
|
||||
|
||||
[EXT] Takes STRING and replaces all referenced environment variable
|
||||
names with their defined values. References to environment variables
|
||||
take the form C<%VariableName%>. Case is ignored when looking up the
|
||||
VariableName in the environment. If the variable is not found then the
|
||||
original C<%VariableName%> text is retained. Has the same effect
|
||||
as the following:
|
||||
|
||||
$string =~ s/%([^%]*)%/$ENV{$1} || "%$1%"/eg
|
||||
|
||||
=item Win32::FormatMessage(ERRORCODE)
|
||||
|
||||
[CORE] Converts the supplied Win32 error number (e.g. returned by
|
||||
Win32::GetLastError()) to a descriptive string. Analogous to the
|
||||
perror() standard-C library function. Note that C<$^E> used
|
||||
in a string context has much the same effect.
|
||||
|
||||
C:\> perl -e "$^E = 26; print $^E;"
|
||||
The specified disk or diskette cannot be accessed
|
||||
|
||||
=item Win32::FsType()
|
||||
|
||||
[CORE] Returns the name of the filesystem of the currently active
|
||||
drive (like 'FAT' or 'NTFS'). In list context it returns three values:
|
||||
(FSTYPE, FLAGS, MAXCOMPLEN). FSTYPE is the filesystem type as
|
||||
before. FLAGS is a combination of values of the following table:
|
||||
|
||||
0x00000001 supports case-sensitive filenames
|
||||
0x00000002 preserves the case of filenames
|
||||
0x00000004 supports Unicode in filenames
|
||||
0x00000008 preserves and enforces ACLs
|
||||
0x00000010 supports file-based compression
|
||||
0x00000020 supports disk quotas
|
||||
0x00000040 supports sparse files
|
||||
0x00000080 supports reparse points
|
||||
0x00000100 supports remote storage
|
||||
0x00008000 is a compressed volume (e.g. DoubleSpace)
|
||||
0x00010000 supports object identifiers
|
||||
0x00020000 supports the Encrypted File System (EFS)
|
||||
|
||||
MAXCOMPLEN is the maximum length of a filename component (the part
|
||||
between two backslashes) on this file system.
|
||||
|
||||
=item Win32::FreeLibrary(HANDLE)
|
||||
|
||||
[EXT] Unloads a previously loaded dynamic-link library. The HANDLE is
|
||||
no longer valid after this call. See L<LoadLibrary|Win32::LoadLibrary(LIBNAME)>
|
||||
for information on dynamically loading a library.
|
||||
|
||||
=item Win32::GetArchName()
|
||||
|
||||
[EXT] Use of this function is deprecated. It is equivalent with
|
||||
$ENV{PROCESSOR_ARCHITECTURE}. This might not work on Win9X.
|
||||
|
||||
=item Win32::GetChipName()
|
||||
|
||||
[EXT] Returns the processor type: 386, 486 or 586 for Intel processors,
|
||||
21064 for the Alpha chip.
|
||||
|
||||
=item Win32::GetCwd()
|
||||
|
||||
[CORE] Returns the current active drive and directory. This function
|
||||
does not return a UNC path, since the functionality required for such
|
||||
a feature is not available under Windows 95.
|
||||
|
||||
=item Win32::GetFullPathName(FILENAME)
|
||||
|
||||
[CORE] GetFullPathName combines the FILENAME with the current drive
|
||||
and directory name and returns a fully qualified (aka, absolute)
|
||||
path name. In list context it returns two elements: (PATH, FILE) where
|
||||
PATH is the complete pathname component (including trailing backslash)
|
||||
and FILE is just the filename part. Note that no attempt is made to
|
||||
convert 8.3 components in the supplied FILENAME to longnames or
|
||||
vice-versa. Compare with Win32::GetShortPathName and
|
||||
Win32::GetLongPathName.
|
||||
|
||||
This function has been added for Perl 5.6.
|
||||
|
||||
=item Win32::GetLastError()
|
||||
|
||||
[CORE] Returns the last error value generated by a call to a Win32 API
|
||||
function. Note that C<$^E> used in a numeric context amounts to the
|
||||
same value.
|
||||
|
||||
=item Win32::GetLongPathName(PATHNAME)
|
||||
|
||||
[CORE] Returns a representaion of PATHNAME composed of longname
|
||||
components (if any). The result may not necessarily be longer
|
||||
than PATHNAME. No attempt is made to convert PATHNAME to the
|
||||
absolute path. Compare with Win32::GetShortPathName and
|
||||
Win32::GetFullPathName.
|
||||
|
||||
This function has been added for Perl 5.6.
|
||||
|
||||
=item Win32::GetNextAvailDrive()
|
||||
|
||||
[CORE] Returns a string in the form of "<d>:" where <d> is the first
|
||||
available drive letter.
|
||||
|
||||
=item Win32::GetOSVersion()
|
||||
|
||||
[CORE] Returns the array (STRING, MAJOR, MINOR, BUILD, ID), where
|
||||
the elements are, respectively: An arbitrary descriptive string, the
|
||||
major version number of the operating system, the minor version
|
||||
number, the build number, and a digit indicating the actual operating
|
||||
system. For ID, the values are 0 for Win32s, 1 for Windows 9X and 2
|
||||
for Windows NT. In scalar context it returns just the ID.
|
||||
|
||||
=item Win32::GetShortPathName(PATHNAME)
|
||||
|
||||
[CORE] Returns a representation of PATHNAME composed only of
|
||||
short (8.3) path components. The result may not necessarily be
|
||||
shorter than PATHNAME. Compare with Win32::GetFullPathName and
|
||||
Win32::GetLongPathName.
|
||||
|
||||
=item Win32::GetProcAddress(INSTANCE, PROCNAME)
|
||||
|
||||
[EXT] Returns the address of a function inside a loaded library. The
|
||||
information about what you can do with this address has been lost in
|
||||
the mist of time. Use the Win32::API module instead of this deprecated
|
||||
function.
|
||||
|
||||
=item Win32::GetTickCount()
|
||||
|
||||
[CORE] Returns the number of milliseconds elapsed since the last
|
||||
system boot. Resolution is limited to system timer ticks (about 10ms
|
||||
on WinNT and 55ms on Win9X).
|
||||
|
||||
=item Win32::InitiateSystemShutdown(MACHINE, MESSAGE, TIMEOUT, FORCECLOSE, REBOOT)
|
||||
|
||||
[EXT] Shutsdown the specified MACHINE, notifying users with the
|
||||
supplied MESSAGE, within the specified TIMEOUT interval. Forces
|
||||
closing of all documents without prompting the user if FORCECLOSE is
|
||||
true, and reboots the machine if REBOOT is true. This function works
|
||||
only on WinNT.
|
||||
|
||||
=item Win32::IsWinNT()
|
||||
|
||||
[CORE] Returns non zero if the Win32 subsystem is Windows NT.
|
||||
|
||||
=item Win32::IsWin95()
|
||||
|
||||
[CORE] Returns non zero if the Win32 subsystem is Windows 95.
|
||||
|
||||
=item Win32::LoadLibrary(LIBNAME)
|
||||
|
||||
[EXT] Loads a dynamic link library into memory and returns its module
|
||||
handle. This handle can be used with Win32::GetProcAddress and
|
||||
Win32::FreeLibrary. This function is deprecated. Use the Win32::API
|
||||
module instead.
|
||||
|
||||
=item Win32::LoginName()
|
||||
|
||||
[CORE] Returns the username of the owner of the current perl process.
|
||||
|
||||
=item Win32::LookupAccountName(SYSTEM, ACCOUNT, DOMAIN, SID, SIDTYPE)
|
||||
|
||||
[EXT] Looks up ACCOUNT on SYSTEM and returns the domain name the SID and
|
||||
the SID type.
|
||||
|
||||
=item Win32::LookupAccountSID(SYSTEM, SID, ACCOUNT, DOMAIN, SIDTYPE)
|
||||
|
||||
[EXT] Looks up SID on SYSTEM and returns the account name, domain name,
|
||||
and the SID type.
|
||||
|
||||
=item Win32::MsgBox(MESSAGE [, FLAGS [, TITLE]])
|
||||
|
||||
[EXT] Create a dialogbox containing MESSAGE. FLAGS specifies the
|
||||
required icon and buttons according to the following table:
|
||||
|
||||
0 = OK
|
||||
1 = OK and Cancel
|
||||
2 = Abort, Retry, and Ignore
|
||||
3 = Yes, No and Cancel
|
||||
4 = Yes and No
|
||||
5 = Retry and Cancel
|
||||
|
||||
MB_ICONSTOP "X" in a red circle
|
||||
MB_ICONQUESTION question mark in a bubble
|
||||
MB_ICONEXCLAMATION exclamation mark in a yellow triangle
|
||||
MB_ICONINFORMATION "i" in a bubble
|
||||
|
||||
TITLE specifies an optional window title. The default is "Perl".
|
||||
|
||||
The function returns the menu id of the selected push button:
|
||||
|
||||
0 Error
|
||||
|
||||
1 OK
|
||||
2 Cancel
|
||||
3 Abort
|
||||
4 Retry
|
||||
5 Ignore
|
||||
6 Yes
|
||||
7 No
|
||||
|
||||
=item Win32::NodeName()
|
||||
|
||||
[CORE] Returns the Microsoft Network node-name of the current machine.
|
||||
|
||||
=item Win32::RegisterServer(LIBRARYNAME)
|
||||
|
||||
[EXT] Loads the DLL LIBRARYNAME and calls the function DllRegisterServer.
|
||||
|
||||
=item Win32::SetCwd(NEWDIRECTORY)
|
||||
|
||||
[CORE] Sets the current active drive and directory. This function does not
|
||||
work with UNC paths, since the functionality required to required for
|
||||
such a feature is not available under Windows 95.
|
||||
|
||||
=item Win32::SetLastError(ERROR)
|
||||
|
||||
[CORE] Sets the value of the last error encountered to ERROR. This is
|
||||
that value that will be returned by the Win32::GetLastError()
|
||||
function. This functions has been added for Perl 5.6.
|
||||
|
||||
=item Win32::Sleep(TIME)
|
||||
|
||||
[CORE] Pauses for TIME milliseconds. The timeslices are made available
|
||||
to other processes and threads.
|
||||
|
||||
=item Win32::Spawn(COMMAND, ARGS, PID)
|
||||
|
||||
[CORE] Spawns a new process using the supplied COMMAND, passing in
|
||||
arguments in the string ARGS. The pid of the new process is stored in
|
||||
PID. This function is deprecated. Please use the Win32::Process module
|
||||
instead.
|
||||
|
||||
=item Win32::UnregisterServer(LIBRARYNAME)
|
||||
|
||||
[EXT] Loads the DLL LIBRARYNAME and calls the function
|
||||
DllUnregisterServer.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
|
@ -1,258 +0,0 @@
|
|||
use File::Find;
|
||||
use Cwd;
|
||||
use Text::Wrap;
|
||||
|
||||
sub output ($);
|
||||
|
||||
@pods = qw(
|
||||
perl perlfaq perlfaq1 perlfaq2 perlfaq3 perlfaq4 perlfaq5
|
||||
perlfaq6 perlfaq7 perlfaq8 perlfaq9 perldelta perldata
|
||||
perlsyn perlop perlre perlrun perlfunc perlvar perlsub
|
||||
perlmod perlmodlib perlmodinstall perlfork perlform perllocale
|
||||
perlref perlreftut perldsc
|
||||
perllol perlboot perltoot perltootc perlobj perltie perlbot perlipc
|
||||
perldbmfilter perldebug perlnumber perldebguts
|
||||
perldiag perlsec perltrap perlport perlstyle perlpod perlbook
|
||||
perlembed perlapio perlxs perlxstut perlguts perlcall perlcompile
|
||||
perlapi perlintern perlhist
|
||||
);
|
||||
|
||||
for (@pods) { s/$/.pod/ }
|
||||
|
||||
$/ = '';
|
||||
@ARGV = @pods;
|
||||
|
||||
($_= <<EOPOD2B) =~ s/^\t//gm && output($_);
|
||||
|
||||
=head1 NAME
|
||||
|
||||
perltoc - perl documentation table of contents
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This page provides a brief table of contents for the rest of the Perl
|
||||
documentation set. It is meant to be scanned quickly or grepped
|
||||
through to locate the proper section you're looking for.
|
||||
|
||||
=head1 BASIC DOCUMENTATION
|
||||
|
||||
EOPOD2B
|
||||
#' make emacs happy
|
||||
|
||||
podset(@pods);
|
||||
|
||||
find \&getpods => qw(../lib ../ext);
|
||||
|
||||
sub getpods {
|
||||
if (/\.p(od|m)$/) {
|
||||
# Skip .pm files that have corresponding .pod files, and Functions.pm.
|
||||
return if /(.*)\.pm$/ && -f "$1.pod";
|
||||
my $file = $File::Find::name;
|
||||
return if $file eq '../lib/Pod/Functions.pm'; # Used only by pod itself
|
||||
|
||||
die "tut $name" if $file =~ /TUT/;
|
||||
unless (open (F, "< $_\0")) {
|
||||
warn "bogus <$file>: $!";
|
||||
system "ls", "-l", $file;
|
||||
}
|
||||
else {
|
||||
my $line;
|
||||
while ($line = <F>) {
|
||||
if ($line =~ /^=head1\s+NAME\b/) {
|
||||
push @modpods, $file;
|
||||
#warn "GOOD $file\n";
|
||||
return;
|
||||
}
|
||||
}
|
||||
warn "EVIL $file\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
die "no pods" unless @modpods;
|
||||
|
||||
for (@modpods) {
|
||||
#($name) = /(\w+)\.p(m|od)$/;
|
||||
$name = path2modname($_);
|
||||
if ($name =~ /^[a-z]/) {
|
||||
push @pragmata, $_;
|
||||
} else {
|
||||
if ($done{$name}++) {
|
||||
# warn "already did $_\n";
|
||||
next;
|
||||
}
|
||||
push @modules, $_;
|
||||
push @modname, $name;
|
||||
}
|
||||
}
|
||||
|
||||
($_= <<EOPOD2B) =~ s/^\t//gm && output($_);
|
||||
|
||||
|
||||
|
||||
=head1 PRAGMA DOCUMENTATION
|
||||
|
||||
EOPOD2B
|
||||
|
||||
podset(sort @pragmata);
|
||||
|
||||
($_= <<EOPOD2B) =~ s/^\t//gm && output($_);
|
||||
|
||||
|
||||
|
||||
=head1 MODULE DOCUMENTATION
|
||||
|
||||
EOPOD2B
|
||||
|
||||
podset( @modules[ sort { $modname[$a] cmp $modname[$b] } 0 .. $#modules ] );
|
||||
|
||||
($_= <<EOPOD2B) =~ s/^\t//gm;
|
||||
|
||||
|
||||
=head1 AUXILIARY DOCUMENTATION
|
||||
|
||||
Here should be listed all the extra programs' documentation, but they
|
||||
don't all have manual pages yet:
|
||||
|
||||
=over
|
||||
|
||||
=item a2p
|
||||
|
||||
=item s2p
|
||||
|
||||
=item find2perl
|
||||
|
||||
=item h2ph
|
||||
|
||||
=item c2ph
|
||||
|
||||
=item h2xs
|
||||
|
||||
=item xsubpp
|
||||
|
||||
=item pod2man
|
||||
|
||||
=item wrapsuid
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Larry Wall <F<larry\@wall.org>>, with the help of oodles
|
||||
of other folks.
|
||||
|
||||
|
||||
EOPOD2B
|
||||
output $_;
|
||||
output "\n"; # flush $LINE
|
||||
exit;
|
||||
|
||||
sub podset {
|
||||
local @ARGV = @_;
|
||||
|
||||
while(<>) {
|
||||
if (s/^=head1 (NAME)\s*/=head2 /) {
|
||||
$pod = path2modname($ARGV);
|
||||
unhead1();
|
||||
output "\n \n\n=head2 ";
|
||||
$_ = <>;
|
||||
if ( /^\s*$pod\b/ ) {
|
||||
s/$pod\.pm/$pod/; # '.pm' in NAME !?
|
||||
output $_;
|
||||
} else {
|
||||
s/^/$pod, /;
|
||||
output $_;
|
||||
}
|
||||
next;
|
||||
}
|
||||
if (s/^=head1 (.*)/=item $1/) {
|
||||
unhead2();
|
||||
output "=over\n\n" unless $inhead1;
|
||||
$inhead1 = 1;
|
||||
output $_; nl(); next;
|
||||
}
|
||||
if (s/^=head2 (.*)/=item $1/) {
|
||||
unitem();
|
||||
output "=over\n\n" unless $inhead2;
|
||||
$inhead2 = 1;
|
||||
output $_; nl(); next;
|
||||
}
|
||||
if (s/^=item ([^=].*)\n/$1/) {
|
||||
next if $pod eq 'perldiag';
|
||||
s/^\s*\*\s*$// && next;
|
||||
s/^\s*\*\s*//;
|
||||
s/\s+$//;
|
||||
next if /^[\d.]+$/;
|
||||
next if $pod eq 'perlmodlib' && /^ftp:/;
|
||||
##print "=over\n\n" unless $initem;
|
||||
output ", " if $initem;
|
||||
$initem = 1;
|
||||
s/\.$//;
|
||||
s/^-X\b/-I<X>/;
|
||||
output $_; next;
|
||||
}
|
||||
if (s/^=cut\s*\n//) {
|
||||
unhead1();
|
||||
next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub path2modname {
|
||||
local $_ = shift;
|
||||
s/\.p(m|od)$//;
|
||||
s-.*?/(lib|ext)/--;
|
||||
s-/-::-g;
|
||||
s/(\w+)::\1/$1/;
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub unhead1 {
|
||||
unhead2();
|
||||
if ($inhead1) {
|
||||
output "\n\n=back\n\n";
|
||||
}
|
||||
$inhead1 = 0;
|
||||
}
|
||||
|
||||
sub unhead2 {
|
||||
unitem();
|
||||
if ($inhead2) {
|
||||
output "\n\n=back\n\n";
|
||||
}
|
||||
$inhead2 = 0;
|
||||
}
|
||||
|
||||
sub unitem {
|
||||
if ($initem) {
|
||||
output "\n\n";
|
||||
##print "\n\n=back\n\n";
|
||||
}
|
||||
$initem = 0;
|
||||
}
|
||||
|
||||
sub nl {
|
||||
output "\n";
|
||||
}
|
||||
|
||||
my $NEWLINE; # how many newlines have we seen recently
|
||||
my $LINE; # what remains to be printed
|
||||
|
||||
sub output ($) {
|
||||
for (split /(\n)/, shift) {
|
||||
if ($_ eq "\n") {
|
||||
if ($LINE) {
|
||||
print wrap('', '', $LINE);
|
||||
$LINE = '';
|
||||
}
|
||||
if ($NEWLINE < 2) {
|
||||
print;
|
||||
$NEWLINE++;
|
||||
}
|
||||
}
|
||||
elsif (/\S/ && length) {
|
||||
$LINE .= $_;
|
||||
$NEWLINE = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
#!./perl
|
||||
|
||||
BEGIN {
|
||||
chdir 't' if -d 't';
|
||||
@INC = '../lib';
|
||||
require Config; import Config;
|
||||
if (! $Config{'usethreads'}) {
|
||||
print "1..0\n";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
# XXX known trouble with global destruction
|
||||
$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
|
||||
}
|
||||
$| = 1;
|
||||
print "1..14\n";
|
||||
use Thread;
|
||||
print "ok 1\n";
|
||||
|
||||
sub content
|
||||
{
|
||||
print shift;
|
||||
return shift;
|
||||
}
|
||||
|
||||
# create a thread passing args and immedaietly wait for it.
|
||||
my $t = new Thread \&content,("ok 2\n","ok 3\n", 1..1000);
|
||||
print $t->join;
|
||||
|
||||
# check that lock works ...
|
||||
{lock $foo;
|
||||
$t = new Thread sub { lock $foo; print "ok 5\n" };
|
||||
print "ok 4\n";
|
||||
}
|
||||
$t->join;
|
||||
|
||||
sub dorecurse
|
||||
{
|
||||
my $val = shift;
|
||||
my $ret;
|
||||
print $val;
|
||||
if (@_)
|
||||
{
|
||||
$ret = Thread->new(\&dorecurse, @_);
|
||||
$ret->join;
|
||||
}
|
||||
}
|
||||
|
||||
$t = new Thread \&dorecurse, map { "ok $_\n" } 6..10;
|
||||
$t->join;
|
||||
|
||||
# test that sleep lets other thread run
|
||||
$t = new Thread \&dorecurse,"ok 11\n";
|
||||
sleep 6;
|
||||
print "ok 12\n";
|
||||
$t->join;
|
||||
|
||||
sub islocked
|
||||
{
|
||||
use attrs 'locked';
|
||||
my $val = shift;
|
||||
my $ret;
|
||||
print $val;
|
||||
if (@_)
|
||||
{
|
||||
$ret = Thread->new(\&islocked, shift);
|
||||
}
|
||||
$ret;
|
||||
}
|
||||
|
||||
$t = Thread->new(\&islocked, "ok 13\n", "ok 14\n");
|
||||
$t->join->join;
|
||||
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
#!./perl
|
||||
|
||||
# NOTE: Please don't add tests to this file unless they *need* to be run in
|
||||
# separate executable and can't simply use eval.
|
||||
|
||||
BEGIN
|
||||
{
|
||||
chdir 't' if -d 't';
|
||||
@INC = "../lib";
|
||||
require Config;
|
||||
import Config;
|
||||
if ($Config{'usethreads'})
|
||||
{
|
||||
print "1..0\n";
|
||||
exit 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$|=1;
|
||||
|
||||
print "1..9\n";
|
||||
$t = 1;
|
||||
sub foo { local(@_) = ('p', 'q', 'r'); }
|
||||
sub bar { unshift @_, 'D'; @_ }
|
||||
sub baz { push @_, 'E'; return @_ }
|
||||
for (1..3)
|
||||
{
|
||||
print "not " unless join('',foo('a', 'b', 'c')) eq 'pqr';
|
||||
print "ok ",$t++,"\n";
|
||||
print "not" unless join('',bar('d')) eq 'Dd';
|
||||
print "ok ",$t++,"\n";
|
||||
print "not" unless join('',baz('e')) eq 'eE';
|
||||
print "ok ",$t++,"\n";
|
||||
}
|
||||
|
|
@ -1,159 +0,0 @@
|
|||
Check existing $^W functionality
|
||||
|
||||
__END__
|
||||
|
||||
# warnable code, warnings disabled
|
||||
$a =+ 3 ;
|
||||
EXPECT
|
||||
|
||||
########
|
||||
-w
|
||||
# warnable code, warnings enabled via command line switch
|
||||
$a =+ 3 ;
|
||||
EXPECT
|
||||
Reversed += operator at - line 3.
|
||||
Name "main::a" used only once: possible typo at - line 3.
|
||||
########
|
||||
#! perl -w
|
||||
# warnable code, warnings enabled via #! line
|
||||
$a =+ 3 ;
|
||||
EXPECT
|
||||
Reversed += operator at - line 3.
|
||||
Name "main::a" used only once: possible typo at - line 3.
|
||||
########
|
||||
|
||||
# warnable code, warnings enabled via compile time $^W
|
||||
BEGIN { $^W = 1 }
|
||||
$a =+ 3 ;
|
||||
EXPECT
|
||||
Reversed += operator at - line 4.
|
||||
Name "main::a" used only once: possible typo at - line 4.
|
||||
########
|
||||
|
||||
# compile-time warnable code, warnings enabled via runtime $^W
|
||||
# so no warning printed.
|
||||
$^W = 1 ;
|
||||
$a =+ 3 ;
|
||||
EXPECT
|
||||
|
||||
########
|
||||
|
||||
# warnable code, warnings enabled via runtime $^W
|
||||
$^W = 1 ;
|
||||
my $b ; chop $b ;
|
||||
EXPECT
|
||||
Use of uninitialized value at - line 4.
|
||||
########
|
||||
|
||||
# warnings enabled at compile time, disabled at run time
|
||||
BEGIN { $^W = 1 }
|
||||
$^W = 0 ;
|
||||
my $b ; chop $b ;
|
||||
EXPECT
|
||||
|
||||
########
|
||||
|
||||
# warnings disabled at compile time, enabled at run time
|
||||
BEGIN { $^W = 0 }
|
||||
$^W = 1 ;
|
||||
my $b ; chop $b ;
|
||||
EXPECT
|
||||
Use of uninitialized value at - line 5.
|
||||
########
|
||||
-w
|
||||
--FILE-- abcd
|
||||
my $b ; chop $b ;
|
||||
1 ;
|
||||
--FILE--
|
||||
require "./abcd";
|
||||
EXPECT
|
||||
Use of uninitialized value at ./abcd line 1.
|
||||
########
|
||||
|
||||
--FILE-- abcd
|
||||
my $b ; chop $b ;
|
||||
1 ;
|
||||
--FILE--
|
||||
#! perl -w
|
||||
require "./abcd";
|
||||
EXPECT
|
||||
Use of uninitialized value at ./abcd line 1.
|
||||
########
|
||||
|
||||
--FILE-- abcd
|
||||
my $b ; chop $b ;
|
||||
1 ;
|
||||
--FILE--
|
||||
$^W =1 ;
|
||||
require "./abcd";
|
||||
EXPECT
|
||||
Use of uninitialized value at ./abcd line 1.
|
||||
########
|
||||
|
||||
--FILE-- abcd
|
||||
$^W = 0;
|
||||
my $b ; chop $b ;
|
||||
1 ;
|
||||
--FILE--
|
||||
$^W =1 ;
|
||||
require "./abcd";
|
||||
EXPECT
|
||||
|
||||
########
|
||||
|
||||
--FILE-- abcd
|
||||
$^W = 1;
|
||||
1 ;
|
||||
--FILE--
|
||||
$^W =0 ;
|
||||
require "./abcd";
|
||||
my $b ; chop $b ;
|
||||
EXPECT
|
||||
Use of uninitialized value at - line 3.
|
||||
########
|
||||
|
||||
$^W = 1;
|
||||
eval "my $b ; chop $b ;" ;
|
||||
EXPECT
|
||||
Use of uninitialized value at - line 3.
|
||||
Use of uninitialized value at - line 3.
|
||||
########
|
||||
|
||||
eval "$^W = 1;" ;
|
||||
my $b ; chop $b ;
|
||||
EXPECT
|
||||
|
||||
########
|
||||
|
||||
eval {$^W = 1;} ;
|
||||
my $b ; chop $b ;
|
||||
EXPECT
|
||||
Use of uninitialized value at - line 3.
|
||||
########
|
||||
|
||||
{
|
||||
local ($^W) = 1;
|
||||
}
|
||||
my $b ; chop $b ;
|
||||
EXPECT
|
||||
|
||||
########
|
||||
|
||||
my $a ; chop $a ;
|
||||
{
|
||||
local ($^W) = 1;
|
||||
my $b ; chop $b ;
|
||||
}
|
||||
my $c ; chop $c ;
|
||||
EXPECT
|
||||
Use of uninitialized value at - line 5.
|
||||
########
|
||||
-w
|
||||
-e undef
|
||||
EXPECT
|
||||
Use of uninitialized value at - line 2.
|
||||
########
|
||||
BEGIN { $^W = 1 }
|
||||
for (@{[0]}) { "$_" } # check warning isn't duplicated
|
||||
EXPECT
|
||||
Useless use of string in void context at - line 2.
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
#!./perl
|
||||
|
||||
BEGIN {
|
||||
chdir 't' if -d 't';
|
||||
@INC = '../lib';
|
||||
$ENV{PERL5LIB} = '../lib';
|
||||
require Config; import Config;
|
||||
}
|
||||
|
||||
$| = 1;
|
||||
|
||||
my $Is_VMS = $^O eq 'VMS';
|
||||
my $Is_MSWin32 = $^O eq 'MSWin32';
|
||||
my $tmpfile = "tmp0000";
|
||||
my $i = 0 ;
|
||||
1 while -f ++$tmpfile;
|
||||
END { if ($tmpfile) { 1 while unlink $tmpfile} }
|
||||
|
||||
my @prgs = () ;
|
||||
|
||||
foreach (sort glob("pragma/warn-*")) {
|
||||
|
||||
next if /\.orig$/ ;
|
||||
|
||||
next if /(~|\.orig)$/;
|
||||
|
||||
open F, "<$_" or die "Cannot open $_: $!\n" ;
|
||||
while (<F>) {
|
||||
last if /^__END__/ ;
|
||||
}
|
||||
|
||||
{
|
||||
local $/ = undef;
|
||||
@prgs = (@prgs, split "\n########\n", <F>) ;
|
||||
}
|
||||
close F ;
|
||||
}
|
||||
|
||||
undef $/;
|
||||
|
||||
print "1..", scalar @prgs, "\n";
|
||||
|
||||
|
||||
for (@prgs){
|
||||
my $switch = "";
|
||||
my @temps = () ;
|
||||
if (s/^\s*-\w+//){
|
||||
$switch = $&;
|
||||
$switch =~ s/(-\S*[A-Z]\S*)/"-$1"/ if $Is_VMS; # protect uc switches
|
||||
}
|
||||
my($prog,$expected) = split(/\nEXPECT\n/, $_);
|
||||
if ( $prog =~ /--FILE--/) {
|
||||
my(@files) = split(/\n--FILE--\s*([^\s\n]*)\s*\n/, $prog) ;
|
||||
shift @files ;
|
||||
die "Internal error test $i didn't split into pairs, got " .
|
||||
scalar(@files) . "[" . join("%%%%", @files) ."]\n"
|
||||
if @files % 2 ;
|
||||
while (@files > 2) {
|
||||
my $filename = shift @files ;
|
||||
my $code = shift @files ;
|
||||
push @temps, $filename ;
|
||||
open F, ">$filename" or die "Cannot open $filename: $!\n" ;
|
||||
print F $code ;
|
||||
close F ;
|
||||
}
|
||||
shift @files ;
|
||||
$prog = shift @files ;
|
||||
}
|
||||
open TEST, ">$tmpfile";
|
||||
print TEST $prog,"\n";
|
||||
close TEST;
|
||||
my $results = $Is_VMS ?
|
||||
`MCR $^X $switch $tmpfile` :
|
||||
$Is_MSWin32 ?
|
||||
`.\\perl -I../lib $switch $tmpfile 2>&1` :
|
||||
`sh -c './perl $switch $tmpfile' 2>&1`;
|
||||
my $status = $?;
|
||||
$results =~ s/\n+$//;
|
||||
# allow expected output to be written as if $prog is on STDIN
|
||||
$results =~ s/tmp\d+/-/g;
|
||||
$results =~ s/\n%[A-Z]+-[SIWEF]-.*$// if $Is_VMS; # clip off DCL status msg
|
||||
# bison says 'parse error' instead of 'syntax error',
|
||||
# various yaccs may or may not capitalize 'syntax'.
|
||||
$results =~ s/^(syntax|parse) error/syntax error/mig;
|
||||
$expected =~ s/\n+$//;
|
||||
my $prefix = ($results =~ s/^PREFIX\n//) ;
|
||||
# any special options? (OPTIONS foo bar zap)
|
||||
my $option_regex = 0;
|
||||
if ($expected =~ s/^OPTIONS? (.+)\n//) {
|
||||
foreach my $option (split(' ', $1)) {
|
||||
if ($option eq 'regex') { # allow regular expressions
|
||||
$option_regex = 1;
|
||||
} else {
|
||||
die "$0: Unknown OPTION '$option'\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( $results =~ s/^SKIPPED\n//) {
|
||||
print "$results\n" ;
|
||||
}
|
||||
elsif (($prefix && (( $option_regex && $results !~ /^$expected/) ||
|
||||
(!$option_regex && $results !~ /^\Q$expected/))) or
|
||||
(!$prefix && (( $option_regex && $results !~ /^$expected/) ||
|
||||
(!$option_regex && $results ne $expected)))) {
|
||||
print STDERR "PROG: $switch\n$prog\n";
|
||||
print STDERR "EXPECTED:\n$expected\n";
|
||||
print STDERR "GOT:\n$results\n";
|
||||
print "not ";
|
||||
}
|
||||
print "ok ", ++$i, "\n";
|
||||
foreach (@temps)
|
||||
{ unlink $_ if $_ }
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
#
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
#!/usr/local/bin/perl
|
||||
|
||||
use Config;
|
||||
use File::Basename qw(&basename &dirname);
|
||||
use Cwd;
|
||||
|
||||
# List explicitly here the variables you want Configure to
|
||||
# generate. Metaconfig only looks for shell variables, so you
|
||||
# have to mention them as if they were shell variables, not
|
||||
# %Config entries. Thus you write
|
||||
# $startperl
|
||||
# to ensure Configure will look for $Config{startperl}.
|
||||
# Wanted: $archlibexp
|
||||
|
||||
# This forces PL files to create target in same directory as PL file.
|
||||
# This is so that make depend always knows where to find PL derivatives.
|
||||
$origdir = cwd;
|
||||
chdir dirname($0);
|
||||
$file = basename($0, '.PL');
|
||||
$file .= '.com' if $^O eq 'VMS';
|
||||
|
||||
open OUT,">$file" or die "Can't create $file: $!";
|
||||
|
||||
print "Extracting $file (with variable substitutions)\n";
|
||||
|
||||
# In this section, perl variables will be expanded during extraction.
|
||||
# You can use $Config{...} to use Configure variables.
|
||||
|
||||
print OUT <<"!GROK!THIS!";
|
||||
$Config{startperl}
|
||||
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
|
||||
if \$running_under_some_shell;
|
||||
!GROK!THIS!
|
||||
|
||||
# In the following, perl variables are not expanded during extraction.
|
||||
|
||||
print OUT <<'!NO!SUBS!';
|
||||
|
||||
use strict;
|
||||
use warning;
|
||||
no warning qw(once);
|
||||
|
||||
use Config;
|
||||
|
||||
require ByteLoader;
|
||||
|
||||
foreach my $infile (@ARGV)
|
||||
{
|
||||
if ($infile =~ /\.p[ml]$/)
|
||||
{
|
||||
my $outfile = $infile . "c";
|
||||
|
||||
open(OUT,"> $outfile") || die "Can't open $outfile: $!";
|
||||
|
||||
if ($infile =~ /\.pl$/)
|
||||
{
|
||||
print OUT "$Config{startperl}\n";
|
||||
print OUT " eval 'exec $Config{perlpath} -S \$0 \${1+\"\$@\"}'\n";
|
||||
print OUT " if \$running_under_some_shell;\n\n";
|
||||
}
|
||||
|
||||
print OUT "use ByteLoader $ByteLoader::VERSION;\n";
|
||||
|
||||
close(OUT);
|
||||
|
||||
print "$^X -MO=Bytecode $infile >> $outfile\n";
|
||||
|
||||
system("$^X -MO=Bytecode $infile >> $outfile");
|
||||
}
|
||||
else
|
||||
{
|
||||
warn "Don't know how to byte compile $infile";
|
||||
}
|
||||
}
|
||||
!NO!SUBS!
|
||||
|
||||
close OUT or die "Can't close $file: $!";
|
||||
chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
|
||||
exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
|
||||
chdir $origdir;
|
||||
Loading…
Reference in a new issue