+-------------
+Version 5.001
+-------------
+
+Nearly all the changes for 5.001 were bug fixes of one variety or another,
+so here's the bug list, along with the "resolution" for each of them. If
+you wish to correspond about any of them, please include the bug number.
+
+There were a few that can be construed as enhancements:
+ NETaa13059: now warns of use of \1 where $1 is necessary.
+ NETaa13512: added $SIG{__WARN__} and $SIG{__DIE__} hooks
+ NETaa13520: added closures
+ NETaa13530: scalar keys now resets hash iterator
+ NETaa13641: added Tim's fancy new import whizbangers
+ NETaa13710: cryptswitch needed to be more "useable"
+ NETaa13716: Carp now allows multiple packages to be skipped out of
+ NETaa13716: now counts imported routines as "defined" for redef warnings
+ (and, of course, much of the stuff from the perl5-porters)
+
+NETaa12974: README incorrectly said it was a pre-release.
+Files patched: README
+
+NETaa13033: goto pushed a bogus scope on the context stack.
+From: Steve Vinoski
+Files patched: pp_ctl.c
+ The goto operator pushed an extra bogus scope onto the context stack. (This
+ often didn't matter, since many things pop extra unrecognized scopes off.)
+
+NETaa13034: tried to get valid pointer from undef.
+From: Castor Fu
+Also: Achille Hui, the Day Dreamer
+Also: Eric Arnold
+Files patched: pp_sys.c
+ Now treats undef specially, and calls SvPV_force on any non-numeric scalar
+ value to get a real pointer to somewhere.
+
+NETaa13035: included package info with filehandles.
+From: Jack Shirazi - BIU
+Files patched: pp_hot.c pp_sys.c
+ Now passes a glob to filehandle methods to keep the package info intact.
+
+NETaa13048: didn't give strict vars message on every occurrence.
+From: Doug Campbell
+Files patched: gv.c
+ It now complains about every occurrence. (The bug resulted from an
+ ill-conceived attempt to suppress a duplicate error message in a
+ suboptimal fashion.)
+
+NETaa13052: test for numeric sort sub return value fooled by taint magic.
+From: Peter Jaspers-Fayer
+Files patched: pp_ctl.c sv.h
+ The test to see if the sort sub return value was numeric looked at the
+ public flags rather than the private flags of the SV, so taint magic
+ hid that info from the sort.
+
+NETaa13053: forced a2p to use byacc
+From: Andy Dougherty
+Files patched: MANIFEST x2p/Makefile.SH x2p/a2p.c
+ a2p.c is now pre-byacced and shipped with the kit.
+
+NETaa13055: misnamed constant in previous patch.
+From: Conrad Augustin
+Files patched: op.c op.h toke.c
+ The tokener translates $[ to a constant, but with a special marking in case
+ the constant gets assigned to or localized. Unfortunately, the marking
+ was done with a combination of OPf_SPECIAL and OPf_MOD that was easily
+ spoofed. There is now a private OPpCONST_ARYLEN flag for this purpose.
+
+NETaa13055: use of OPf_SPECIAL for $[ lvaluehood was too fragile.
+Files patched: op.c op.h toke.c
+ (same)
+
+NETaa13056: convert needs to throw away any number info on its list.
+From: Jack Shirazi - BIU
+Files patched: op.c
+ The listiness of the argument list leaked out to the subroutine call because
+ of how prepend_elem and append_elem reuse an existing list. The convert()
+ routine just needs to discard any listiness it finds on its argument.
+
+NETaa13058: AUTOLOAD shouldn't assume size of @_ is meaningful.
+From: Florent Guillaume
+Files patched: ext/DB_File/DB_File.pm ext/Fcntl/Fcntl.pm ext/GDBM_File/GDBM_File.pm ext/Socket/Socket.pm h2xs.SH
+ I just deleted the optimization, which is silly anyway since the eventual
+ subroutine definition is cached.
+
+NETaa13059: now warns of use of \1 where $1 is necessary.
+From: Gustaf Neumann
+Files patched: toke.c
+ Now says
+
+ Can't use \1 to mean $1 in expression at foo line 2
+
+ along with an explanation in perldiag.
+
+NETaa13060: no longer warns on attempt to read <> operator's transition state.
+From: Chaim Frenkel
+Files patched: pp_hot.c
+ No longer warns on <> operator's transitional state.
+
+NETaa13140: warning said $ when @ would be more appropriate.
+From: David J. MacKenzie
+Files patched: op.c pod/perldiag.pod
+ Now says
+
+ (Did you mean $ or @ instead of %?)
+
+ and added more explanation to perldiag.
+
+NETaa13149: was reading freed memory to make incorrect error message.
+Files patched: pp_ctl.c
+ It was reading freed memory to make an error message that would be
+ incorrect in any event because it had the inner filename rather than
+ the outer.
+
+NETaa13149: confess was sometimes less informative than croak
+From: Jack Shirazi
+Files patched: lib/Carp.pm
+ (same)
+
+NETaa13150: stderr needs to be STDERR in package
+From: Jack Shirazi
+Files patched: lib/File/CheckTree.pm
+ Also fixed pl2pm to translate the filehandles to uppercase.
+
+NETaa13150: uppercases stdin, stdout and stderr
+Files patched: pl2pm
+ (same)
+
+NETaa13154: array assignment didn't notice package magic.
+From: Brian Reichert
+Files patched: pp_hot.c
+ The list assignment operator looked for only set magic, but set magic is
+ only on the elements of a magical hash, not on the hash as a whole. I made
+ the operator look for any magic at all on the target array or hash.
+
+NETaa13155: &DB::DB left trash on the stack.
+From: Thomas Koenig
+Files patched: lib/perl5db.pl pp_ctl.c
+ The call by pp_dbstate() to &DB::DB left trash on the stack. It now
+ calls DB in list context, and DB returns ().
+
+NETaa13156: lexical variables didn't show up in debugger evals.
+From: Joergen Haegg
+Files patched: op.c
+ The code that searched back up the context stack for the lexical scope
+ outside the eval only partially took into consideration that there
+ might be extra debugger subroutine frames that shouldn't be used, and
+ ended up comparing the wrong statement sequence number to the range of
+ valid sequence numbers for the scope of the lexical variable. (There
+ was also a bug fixed in passing that caused the scope of lexical to go
+ clear to the end of the subroutine even if it was within an inner block.)
+
+NETaa13157: any request for autoloaded DESTROY should create a null one.
+From: Tom Christiansen
+Files patched: lib/AutoLoader.pm
+ If DESTROY.al is not located, it now creates sub DESTROY {} automatically.
+
+NETaa13158: now preserves $@ around destructors while leaving eval.
+From: Tim Bunce
+Files patched: pp_ctl.c
+ Applied supplied patch, except the whole second hunk can be replaced with
+
+ sv_insert(errsv, 0, 0, message, strlen(message));
+
+NETaa13160: clarified behavior of split without arguments
+From: Harry Edmon
+Files patched: pod/perlfunc.pod
+ Clarified the behavior of split without arguments.
+
+NETaa13162: eval {} lost list/scalar context
+From: Dov Grobgeld
+Files patched: op.c
+ LEAVETRY didn't propagate number to ENTERTRY.
+
+NETaa13163: clarified documentation of foreach using my variable
+From: Tom Christiansen
+Files patched: pod/perlsyn.pod
+ Explained that foreach using a lexical is still localized.
+
+NETaa13164: the dot detector for the end of formats was over-rambunctious.
+From: John Stoffel
+Files patched: toke.c
+ The dot detector for the end of formats was over-rambunctious. It would
+ pick up any dot that didn't have a space in front of it.
+
+NETaa13165: do {} while 1 never linked outer block into next chain.
+From: Gisle Aas
+Files patched: op.c
+ When the conditional of do {} while 1; was optimized away, it confused the
+ postfix order construction so that the block that ordinarily sits around the
+ whole loop was never executed. So when the loop tried to unstack between
+ iterations, it got the wrong context, and blew away the lexical variables
+ of the outer scope. Fixed it by introducing a NULL opcode that will be
+ optimized away later.
+
+NETaa13167: coercion was looking at public bits rather than private bits.
+From: Randal L. Schwartz
+Also: Thomas Riechmann
+Also: Shane Castle
+Files patched: sv.c
+ There were some bad ifdefs around the various varieties of set*id(). In
+ addition, tainting was interacting badly with assignment to $> because
+ sv_2iv() was examining SvPOK rather than SvPOKp, and so couldn't coerce
+ a string uid to an integer one.
+
+NETaa13167: had some ifdefs wrong on set*id.
+Files patched: mg.c pp_hot.c
+ (same)
+
+NETaa13168: relaxed test for comparison of new and old fds
+From: Casper H.S. Dik
+Files patched: t/lib/posix.t
+ I relaxed the comparison to just check that the new fd is greater.
+
+NETaa13169: autoincrement can corrupt scalar value state.
+From: Gisle Aas
+Also: Tom Christiansen
+Files patched: sv.c
+ It assumed a PV didn't need to be upgraded to become an NV.
+
+NETaa13169: previous patch could leak a string pointer.
+Files patched: sv.c
+ (same)
+
+NETaa13170: symbols missing from global.sym
+From: Tim Bunce
+Files patched: global.sym
+ Applied suggested patch.
+
+NETaa13171: \\ in <<'END' shouldn't reduce to \.
+From: Randal L. Schwartz
+Files patched: toke.c
+ <<'END' needed to bypass ordinary single-quote processing.
+
+NETaa13172: 'use integer' turned off magical autoincrement.
+From: Erich Rickheit KSC
+Files patched: pp.c pp_hot.c
+ The integer versions of the increment and decrement operators were trying too
+ hard to be efficient.
+
+NETaa13172: deleted duplicate increment and decrement code
+Files patched: opcode.h opcode.pl pp.c
+ (same)
+
+NETaa13173: install should make shared libraries executable.
+From: Brian Grossman
+Also: Dave Nadler
+Also: Eero Pajarre
+Files patched: installperl
+ Now gives permission 555 to any file ending with extension specified by $dlext.
+
+NETaa13176: ck_rvconst didn't free the const it used up.
+From: Nick Duffek
+Files patched: op.c
+ I checked in many random memory leaks under this bug number, since it
+ was an eval that brought many of them out.
+
+NETaa13176: didn't delete XRV for temp ref of destructor.
+Files patched: sv.c
+ (same)
+
+NETaa13176: didn't delete op_pmshort in matching operators.
+Files patched: op.c
+ (same)
+
+NETaa13176: eval leaked the name of the eval.
+Files patched: scope.c
+ (same)
+
+NETaa13176: gp_free didn't free the format.
+Files patched: gv.c
+ (same)
+
+NETaa13176: minor leaks in loop exits and constant subscript optimization.
+Files patched: op.c
+ (same)
+
+NETaa13176: plugged some duplicate struct allocation memory leaks.
+Files patched: perl.c
+ (same)
+
+NETaa13176: sv_clear of an FM didn't clear anything.
+Files patched: sv.c
+ (same)
+
+NETaa13176: tr/// didn't mortalize its return value.
+Files patched: pp.c
+ (same)
+
+NETaa13177: SCOPE optimization hid line number info
+From: David J. MacKenzie
+Also: Hallvard B Furuseth
+Files patched: op.c
+ Every pass on the syntax tree has to keep track of the current statement.
+ Unfortunately, the single-statement block was optimized into a single
+ statement between the time the variable was parsed and the time the
+ void code scan was done, so that pass didn't see the OP_NEXTSTATE
+ operator, because it has been optimized to an OP_NULL.
+
+ Fortunately, null operands remember what they were, so it was pretty easy
+ to make it set the correct line number anyway.
+
+NETaa13178: some linux doesn't handle nm well
+From: Alan Modra
+Files patched: hints/linux.sh
+ Applied supplied patch.
+
+NETaa13180: localized slice now pre-extends array
+From: Larry Schuler
+Files patched: pp.c
+ A localized slice now pre-extends its array to avoid reallocation during
+ the scope of the local.
+
+NETaa13181: m//g didn't keep track of whether previous match matched null.
+From: "philippe.verdret"
+Files patched: mg.h pp_hot.c
+ A pattern isn't allowed to match a null string in the same place twice in
+ a row. m//g wasn't keeping track of whether the previous match matched
+ the null string.
+
+NETaa13182: now includes whitespace as a regexp metacharacter.
+From: Larry Wall
+Files patched: toke.c
+ scan_const() now counts " \t\n\r\f\v" as metacharacters when scanning a pattern.
+
+NETaa13183: sv_setsv shouldn't try to clone an object.
+From: Peter Gordon
+Files patched: sv.c
+ The sv_mortalcopy() done by the return in STORE called sv_setsv(),
+ which cloned the object. sv_setsv() shouldn't be in the business of
+ cloning objects.
+
+NETaa13184: bogus warning on quoted signal handler name removed.
+From: Dan Carson
+Files patched: toke.c
+ Now doesn't complain unless the first non-whitespace character after the =
+ is an alphabetic character.
+
+NETaa13186: now croaks on chop($')
+From: Casper H.S. Dik
+Files patched: doop.c
+ Now croaks on chop($') and such.
+
+NETaa13187: "${foo::bar}" now counts as mere delimitation, not as a bareword.
+From: Jay Rogers
+Files patched: toke.c
+ "${foo::bar}" now counts as mere delimitation, not as a bareword inside a
+ reference block.
+
+NETaa13188: for backward compatibility, looks for "perl -" before "perl".
+From: Russell Mosemann
+Files patched: toke.c
+ Now allows non-whitespace characters on the #! line between the "perl"
+ and the "-".
+
+NETaa13188: now allows non-whitespace after #!...perl before switches.
+Files patched: toke.c
+ (same)
+
+NETaa13189: derivative files need to be removed before recreation
+From: Simon Leinen
+Also: Dick Middleton
+Also: David J. MacKenzie
+Files patched: embed_h.sh x2p/Makefile.SH
+ Fixed various little nits as suggested in several messages.
+
+NETaa13190: certain assignments can spoof pod directive recognizer
+From: Ilya Zakharevich
+Files patched: toke.c
+ The lexer now only recognizes pod directives where a statement is expected.
+
+NETaa13194: now returns undef when there is no curpm.
+From: lusol@Dillon.CC.Lehigh.EDU
+Files patched: mg.c
+ Since there was no regexp prior to the "use", it was returning whatever the
+ last successful match was within the "use", because there was no current
+ regexp, so it treated it as a normal variable. It now returns undef.
+
+NETaa13195: semop had one S too many.
+From: Joachim Huober
+Files patched: opcode.pl
+ The entry in opcode.pl had one too many S's.
+
+NETaa13196: always assumes it's a Perl script if -c is used.
+From: Dan Carson
+Files patched: toke.c
+ It now will assume it's a Perl script if the -c switch is used.
+
+NETaa13197: changed implicit -> message to be more understandable.
+From: Bruce Barnett
+Files patched: op.c pod/perldiag.pod
+ I changed the error message to be more understandable. It now says
+
+ Can't use subscript on sort...
+
+
+NETaa13201: added OPpCONST_ENTERED flag to properly enter filehandle symbols.
+From: E. Jay Berkenbilt
+Also: Tom Christiansen
+Files patched: op.c op.h toke.c
+ The grammatical reduction of a print statement didn't properly count
+ the filehandle as a symbol reference because it couldn't distinguish
+ between a symbol entered earlier in the program and a symbol entered
+ for the first time down in the lexer.
+
+NETaa13203: README shouldn't mention uperl.o any more.
+From: Anno Siegel
+Files patched: README
+
+NETaa13204: .= shouldn't warn on uninitialized target.
+From: Pete Peterson
+Files patched: pp_hot.c
+ No longer warns on uninitialized target of .= operator.
+
+NETaa13206: handy macros in XSUB.h
+From: Tim Bunce
+Files patched: XSUB.h
+ Added suggested macros.
+
+NETaa13228: commonality checker didn't treat lexicals as variables.
+From: mcook@cognex.com
+Files patched: op.c opcode.pl
+ The list assignment operator tries to avoid unnecessary copies by doing the
+ assignment directly if there are no common variables on either side of the
+ equals. Unfortunately, the code that decided that only recognized references
+ to dynamic variables, not lexical variables.
+
+NETaa13229: fixed sign stuff for complement, integer coercion.
+From: Larry Wall
+Files patched: perl.h pp.c sv.c
+ Fixed ~0 and integer coercions.
+
+NETaa13230: no longer tries to reuse scratchpad temps if tainting in effect.
+From: Luca Fini
+Files patched: op.c
+ I haven't reproduced it, but I believe the problem is the reuse of scratchpad
+ temporaries between statements. I've made it not try to reuse them if
+ tainting is in effect.
+
+NETaa13231: *foo = *bar now prevents typo warnings on "foo"
+From: Robin Barker
+Files patched: sv.c
+ Aliasing of the form *foo = *bar is now protected from the typo warnings.
+ Previously only the *foo = \$bar form was.
+
+NETaa13235: require BAREWORD now introduces package name immediately.
+From: Larry Wall
+Files patched: toke.c
+ require BAREWORD now introduces package name immediately. This lets the
+ method intuit code work right even though the require hasn't actually run
+ yet.
+
+NETaa13289: didn't calculate correctly using arybase.
+From: Jared Rhine
+Files patched: pp.c pp_hot.c
+ The runtime code didn't use curcop->cop_arybase correctly.
+
+NETaa13301: store now throws exception on error
+From: Barry Friedman
+Files patched: ext/GDBM_File/GDBM_File.xs ext/NDBM_File/NDBM_File.xs ext/ODBM_File/ODBM_File.xs ext/SDBM_File/SDBM_File.xs
+ Changed warn to croak in ext/*DBM_File/*.xs.
+
+NETaa13302: ctime now takes Time_t rather than Time_t*.
+From: Rodger Anderson
+Files patched: ext/POSIX/POSIX.xs
+ Now declares a Time_t and takes the address of that in CODE.
+
+NETaa13302: shorter way to do this patch
+Files patched: ext/POSIX/POSIX.xs
+ (same)
+
+NETaa13304: could feed too large $@ back into croak, whereupon it croaked.
+From: Larry Wall
+Files patched: perl.c
+ callist() could feed $@ back into croak with more than a bare %s. (croak()
+ handles long strings with a bare %s okay.)
+
+NETaa13305: compiler misoptimized RHS to outside of s/a/print/e
+From: Brian S. Cashman <bsc@umich.edu>
+Files patched: op.c
+ The syntax tree was being misconstructed because the compiler felt that
+ the RHS was invariant, so it did it outside the s///.
+
+NETaa13314: assigning mortal to lexical leaks
+From: Larry Wall
+Files patched: sv.c
+ In stealing strings, sv_setsv was checking SvPOK to see if it should free
+ the destination string. It should have been checking SvPVX.
+
+NETaa13316: wait4pid now recalled when errno == EINTR
+From: Robert J. Pankratz
+Files patched: pp_sys.c util.c
+ system() and the close() of a piped open now recall wait4pid if it returned
+ prematurely with errno == EINTR.
+
+NETaa13329: needed to localize taint magic
+From: Brian Katzung
+Files patched: sv.c doio.c mg.c pp_hot.c pp_sys.c scope.c taint.c
+ Taint magic is now localized better, though I had to resort to a kludge
+ to allow a value to be both tainted and untainted simultaneously during
+ the assignment of
+
+ local $foo = $_[0];
+
+ when $_[0] is a reference to the variable $foo already.
+
+NETaa13341: clarified interaction of AnyDBM_File::ISA and "use"
+From: Ian Phillipps
+Files patched: pod/modpods/AnyDBMFile.pod
+ The doc was misleading.
+
+NETaa13342: grep and map with block would enter block but never leave it.
+From: Ian Phillipps
+Files patched: op.c
+ The compiler use some sort-checking code to handle the arguments of
+ grep and map. Unfortunately, this wiped out the block exit opcode while
+ leaving the block entry opcode. This doesn't matter to sort, but did
+ matter to grep and map. It now leave the block entry intact.
+
+ The reason it worked without the my is because the block entry and exit
+ were optimized away to an OP_SCOPE, which it doesn't matter if it's there
+ or not.
+
+NETaa13343: goto needed to longjmp when in a signal handler.
+From: Robert Partington
+Files patched: pp_ctl.c
+ goto needed to longjmp() when in a signal handler to get back into the
+ right run() context.
+
+
+NETaa13344: strict vars shouldn't apply to globs or filehandles.
+From: Andrew Wilcox
+Files patched: gv.c
+ Filehandles and globs will be excepted from "strict vars", so that you can
+ do the standard Perl 4 trick of
+
+ use strict;
+ sub foo {
+ local(*IN);
+ open(IN,"file");
+ }
+
+
+NETaa13345: assert.pl didn't use package DB
+From: Hans Mulder
+Files patched: lib/assert.pl
+ Now it does.
+
+NETaa13348: av_undef didn't free scalar representing $#foo.
+From: David Filo
+Files patched: av.c
+ av_undef didn't free scalar representing $#foo.
+
+NETaa13349: sort sub accumulated save stack entries
+From: David Filo
+Files patched: pp_ctl.c
+ COMMON only gets set if assigning to @_, which is reasonable. Most of the
+ problem was a memory leak.
+
+NETaa13351: didn't treat indirect filehandles as references.
+From: Andy Dougherty
+Files patched: op.c
+ Now produces
+
+ Can't use an undefined value as a symbol reference at ./foo line 3.
+
+
+NETaa13352: OP_SCOPE allocated as UNOP rather than LISTOP.
+From: Andy Dougherty
+Files patched: op.c
+
+NETaa13353: scope() didn't release filegv on OP_SCOPE optimization.
+From: Larry Wall
+Files patched: op.c
+ When scope() nulled out a NEXTSTATE, it didn't release its filegv reference.
+
+NETaa13355: hv_delete now avoids useless mortalcopy
+From: Larry Wall
+Files patched: hv.c op.c pp.c pp_ctl.c proto.h scope.c util.c
+ hv_delete now avoids useless mortalcopy.
+
+
+NETaa13359: comma operator section missing its heading
+From: Larry Wall
+Files patched: pod/perlop.pod
+
+NETaa13359: random typo
+Files patched: pod/perldiag.pod
+
+NETaa13360: code to handle partial vec values was bogus.
+From: Conrad Augustin
+Files patched: pp.c
+ The code that Mark J. added a long time ago to handle values that were partially
+ off the end of the string was incorrect.
+
+NETaa13361: made it not interpolate inside regexp comments
+From: Martin Jost
+Files patched: toke.c
+ To avoid surprising people, it no longer interpolates inside regexp
+ comments.
+
+NETaa13362: ${q[1]} should be interpreted like it used to
+From: Hans Mulder
+Files patched: toke.c
+ Now resolves ${keyword[1]} to $keyword[1] and warns if -w. Likewise for {}.
+
+NETaa13363: meaning of repeated search chars undocumented in tr///
+From: Stephen P. Potter
+Files patched: pod/perlop.pod
+ Documented that repeated characters use the first translation given.
+
+NETaa13365: if closedir fails, don't try it again.
+From: Frank Crawford
+Files patched: pp_sys.c
+ Now does not attempt to closedir a second time.
+
+NETaa13366: can't do block scope optimization on $1 et al when tainting.
+From: Andrew Vignaux
+Files patched: toke.c
+ The tainting mechanism assumes that every statement starts out
+ untainted. Unfortunately, the scope removal optimization for very
+ short blocks removed the statementhood of statements that were
+ attempting to read $1 as an untainted value, with the effect that $1
+ appeared to be tainted anyway. The optimization is now disabled when
+ tainting and the block contains $1 (or equivalent).
+
+NETaa13366: fixed this a better way in toke.c.
+Files patched: op.c
+ (same)
+
+NETaa13366: need to disable scope optimization when tainting.
+Files patched: op.c
+ (same)
+
+NETaa13367: Did a SvCUR_set without nulling out final char.
+From: "Rob Henderson" <robh@cs.indiana.edu>
+Files patched: doop.c pp.c pp_sys.c
+ When do_vop set the length on its result string it neglected to null-terminate
+ it.
+
+NETaa13368: bigrat::norm sometimes chucked sign
+From: Greg Kuperberg
+Files patched: lib/bigrat.pl
+ The normalization routine was assuming that the gcd of two numbers was
+ never negative, and based on that assumption managed to move the sign
+ to the denominator, where it was deleted on the assumption that the
+ denominator is always positive.
+
+NETaa13368: botched previous patch
+Files patched: lib/bigrat.pl
+ (same)
+
+NETaa13369: # is now a comment character, and \# should be left for regcomp.
+From: Simon Parsons
+Files patched: toke.c
+ It was not skipping the comment when it skipped the white space, and constructed
+ an opcode that tried to match a null string. Unfortunately, the previous
+ star tried to use the first character of the null string to optimize where
+ to recurse, so it never matched.
+
+NETaa13369: comment after regexp quantifier induced non-match.
+Files patched: regcomp.c
+ (same)
+
+NETaa13370: some code assumed SvCUR was of type int.
+From: Spider Boardman
+Files patched: pp_sys.c
+ Did something similar to the proposed patch. I also fixed the problem that
+ it assumed the type of SvCUR was int. And fixed get{peer,sock}name the
+ same way.
+
+NETaa13375: sometimes dontbother wasn't added back into strend.
+From: Jamshid Afshar
+Files patched: regexec.c
+ When the /g modifier was used, the regular expression code would calculate
+ the end of $' too short by the minimum number of characters the pattern could
+ match.
+
+NETaa13375: sv_setpvn now disallows negative length.
+Files patched: sv.c
+ (same)
+
+NETaa13376: suspected indirect objecthood prevented recognition of lexical.
+From: Gisle.Aas@nr.no
+Files patched: toke.c
+ When $data[0] is used in a spot that might be an indirect object, the lexer
+ was getting confused over the rule that says the $data in $$data[0] isn't
+ an array element. (The lexer uses XREF state for both indirect objects
+ and for variables used as names.)
+
+NETaa13377: -I processesing ate remainder of #! line.
+From: Darrell Schiebel
+Files patched: perl.c
+ I made the -I processing in moreswitches look for the end of the string,
+ delimited by whitespace.
+
+NETaa13379: ${foo} now treated the same outside quotes as inside
+From: Hans Mulder
+Files patched: toke.c
+ ${bareword} is now treated the same outside quotes as inside.
+
+NETaa13379: previous fix for this bug was botched
+Files patched: toke.c
+ (same)
+
+NETaa13381: TEST should check for perl link
+From: Andy Dougherty
+Files patched: t/TEST
+ die "You need to run \"make test\" first to set things up.\n" unless -e 'perl';
+
+
+NETaa13384: fixed version 0.000 botch.
+From: Larry Wall
+Files patched: installperl
+
+NETaa13385: return 0 from required file loses message
+From: Malcolm Beattie
+Files patched: pp_ctl.c
+ Works right now.
+
+NETaa13387: added pod2latex
+From: Taro KAWAGISHI
+Files patched: MANIFEST pod/pod2latex
+ Added most recent copy to pod directory.
+
+NETaa13388: constant folding now prefers integer results over double
+From: Ilya Zakharevich
+Files patched: op.c
+ Constant folding now prefers integer results over double.
+
+NETaa13389: now treats . and exec as shell metathingies
+From: Hans Mulder
+Files patched: doio.c
+ Now treats . and exec as shell metathingies.
+
+NETaa13395: eval didn't check taintedness.
+From: Larry Wall
+Files patched: pp_ctl.c
+
+NETaa13396: $^ coredumps at end of string
+From: Paul Rogers
+Files patched: toke.c
+ The scan_ident() didn't check for a null following $^.
+
+NETaa13397: improved error messages when operator expected
+From: Larry Wall
+Files patched: toke.c
+ Added message (Do you need to predeclare BAR?). Also fixed the missing
+ semicolon message.
+
+NETaa13399: cleanup by Andy
+From: Larry Wall
+Files patched: Changes Configure Makefile.SH README cflags.SH config.H config_h.SH deb.c doop.c dump.c ext/DB_File/DB_File.pm ext/DB_File/DB_File.xs ext/DynaLoader/DynaLoader.pm ext/Fcntl/Fcntl.pm ext/GDBM_File/GDBM_File.pm ext/POSIX/POSIX.pm ext/SDBM_File/sdbm/sdbm.h ext/Socket/Socket.pm ext/util/make_ext h2xs.SH hints/aix.sh hints/bsd386.sh hints/dec_osf.sh hints/esix4.sh hints/freebsd.sh hints/irix_5.sh hints/next_3_2.sh hints/sunos_4_1.sh hints/svr4.sh hints/ultrix_4.sh installperl lib/AutoSplit.pm lib/Cwd.pm lib/ExtUtils/MakeMaker.pm lib/ExtUtils/xsubpp lib/Term/Cap.pm mg.c miniperlmain.c perl.c perl.h perl_exp.SH pod/Makefile pod/perldiag.pod pod/pod2html pp.c pp_ctl.c pp_hot.c pp_sys.c proto.h sv.h t/re_tests util.c x2p/Makefile.SH x2p/a2p.h x2p/a2py.c x2p/handy.h x2p/hash.c x2p/hash.h x2p/str.c x2p/str.h x2p/util.c x2p/util.h x2p/walk.c
+
+NETaa13399: cleanup from Andy
+Files patched: MANIFEST
+
+NETaa13399: configuration cleanup
+Files patched: Configure Configure MANIFEST MANIFEST Makefile.SH Makefile.SH README config.H config.H config_h.SH config_h.SH configpm ext/DynaLoader/DynaLoader.pm ext/DynaLoader/dl_hpux.xs ext/NDBM_File/Makefile.PL ext/ODBM_File/Makefile.PL ext/util/make_ext handy.h hints/aix.sh hints/hpux_9.sh hints/hpux_9.sh hints/irix_4.sh hints/linux.sh hints/mpeix.sh hints/next_3_2.sh hints/solaris_2.sh hints/svr4.sh installperl installperl lib/AutoSplit.pm lib/ExtUtils/MakeMaker.pm lib/ExtUtils/MakeMaker.pm lib/ExtUtils/xsubpp lib/Getopt/Long.pm lib/Text/Tabs.pm makedepend.SH makedepend.SH mg.c op.c perl.h perl_exp.SH pod/perl.pod pod/perldiag.pod pod/perlsyn.pod pod/pod2man pp_sys.c proto.h proto.h unixish.h util.c util.c vms/config.vms writemain.SH x2p/a2p.h x2p/a2p.h x2p/a2py.c x2p/a2py.c x2p/handy.h x2p/util.c x2p/walk.c x2p/walk.c
+
+NETaa13399: new files from Andy
+Files patched: ext/DB_File/Makefile.PL ext/DynaLoader/Makefile.PL ext/Fcntl/Makefile.PL ext/GDBM_File/Makefile.PL ext/NDBM_File/Makefile.PL ext/ODBM_File/Makefile.PL ext/POSIX/Makefile.PL ext/SDBM_File/Makefile.PL ext/SDBM_File/sdbm/Makefile.PL ext/Socket/Makefile.PL globals.c hints/convexos.sh hints/irix_6.sh
+
+NETaa13399: patch0l from Andy
+Files patched: Configure MANIFEST Makefile.SH config.H config_h.SH ext/DB_File/Makefile.PL ext/GDBM_File/Makefile.PL ext/NDBM_File/Makefile.PL ext/POSIX/POSIX.xs ext/SDBM_File/sdbm/Makefile.PL ext/util/make_ext h2xs.SH hints/next_3_2.sh hints/solaris_2.sh hints/unicos.sh installperl lib/Cwd.pm lib/ExtUtils/MakeMaker.pm makeaperl.SH vms/config.vms x2p/util.c x2p/util.h
+
+NETaa13399: stuff from Andy
+Files patched: Configure MANIFEST Makefile.SH configpm hints/dec_osf.sh hints/linux.sh hints/machten.sh lib/ExtUtils/MakeMaker.pm util.c
+
+NETaa13399: Patch 0k from Andy
+Files patched: Configure MANIFEST Makefile.SH config.H config_h.SH hints/dec_osf.sh hints/mpeix.sh hints/next_3_0.sh hints/ultrix_4.sh installperl lib/ExtUtils/MakeMaker.pm lib/File/Path.pm makeaperl.SH minimod.PL perl.c proto.h vms/config.vms vms/ext/MM_VMS.pm x2p/a2p.h
+
+NETaa13399: Patch 0m from Andy
+Files patched: Configure MANIFEST Makefile.SH README config.H config_h.SH ext/DynaLoader/README ext/POSIX/POSIX.xs ext/SDBM_File/sdbm/sdbm.h ext/util/extliblist hints/cxux.sh hints/linux.sh hints/powerunix.sh lib/ExtUtils/MakeMaker.pm malloc.c perl.h pp_sys.c util.c
+
+NETaa13400: pod2html update from Bill Middleton
+From: Larry Wall
+Files patched: pod/pod2html
+
+NETaa13401: Boyer-Moore code attempts to compile string longer than 255.
+From: Kyriakos Georgiou
+Files patched: util.c
+ The Boyer-Moore table uses unsigned char offsets, but the BM compiler wasn't
+ rejecting strings longer than 255 chars, and was miscompiling them.
+
+NETaa13403: missing a $ on variable name
+From: Wayne Scott
+Files patched: installperl
+ Yup, it was missing.
+
+NETaa13406: didn't wipe out dead match when proceeding to next BRANCH
+From: Michael P. Clemens
+Files patched: regexec.c
+ The code to check alternatives didn't invalidate backreferences matched by the
+ failed branch.
+
+NETaa13407: overload upgrade
+From: owner-perl5-porters@nicoh.com
+Also: Ilya Zakharevich
+Files patched: MANIFEST gv.c lib/Math/BigInt.pm perl.h pod/perlovl.pod pp.c pp.h pp_hot.c sv.c t/lib/bigintpm.t t/op/overload.t
+ Applied supplied patch, and fixed bug induced by use of sv_setsv to do
+ a deep copy, since sv_setsv no longer copies objecthood.
+
+NETaa13409: sv_gets tries to grow string at EOF
+From: Harold O Morris
+Files patched: sv.c
+ Applied suggested patch, only two statements earlier, since the end code
+ also does SvCUR_set.
+
+NETaa13410: delaymagic did =~ instead of &= ~
+From: Andreas Schwab
+Files patched: pp_hot.c
+ Applied supplied patch.
+
+NETaa13411: POSIX didn't compile under -DLEAKTEST
+From: Frederic Chauveau
+Files patched: ext/POSIX/POSIX.xs
+ Used NEWSV instead of newSV.
+
+NETaa13412: new version from Tony Sanders
+From: Tony Sanders
+Files patched: lib/Term/Cap.pm
+ Installed as Term::Cap.pm
+
+NETaa13413: regmust extractor needed to restart loop on BRANCH for (?:) to work
+From: DESARMENIEN
+Files patched: regcomp.c
+ The BRANCH skipper should have restarted the loop from the top.
+
+NETaa13414: the check for accidental list context was done after pm_short check
+From: Michael H. Coen
+Files patched: pp_hot.c
+ Moved check for accidental list context to before the pm_short optimization.
+
+NETaa13418: perlre.pod babbled nonsense about | in character classes
+From: Philip Hazel
+Files patched: pod/perlre.pod
+ Removed bogus brackets. Now reads:
+ Note however that "|" is interpreted as a literal with square brackets,
+ so if you write C<[fee|fie|foe]> you're really only matching C<[feio|]>.
+
+NETaa13419: need to document introduction of lexical variables
+From: "Heading, Anthony"
+Files patched: pod/perlfunc.pod
+ Now mentions that lexicals aren't introduced till after the current statement.
+
+NETaa13420: formats that overflowed a page caused endless top of forms
+From: Hildo@CONSUL.NL
+Files patched: pp_sys.c
+ If a record is too large to fit on a page, it now prints whatever will
+ fit and then calls top of form again on the remainder.
+
+NETaa13423: the code to do negative list subscript in scalar context was missing
+From: Steve McDougall
+Files patched: pp.c
+ The negative subscript code worked right in list context but not in scalar
+ context. In fact, there wasn't code to do it in the scalar context.
+
+NETaa13424: existing but undefined CV blocked inheritance
+From: Spider Boardman
+Files patched: gv.c
+ Applied supplied patch.
+
+NETaa13425: removed extra argument to croak
+From: "R. Bernstein"
+Files patched: regcomp.c
+ Removed extra argument.
+
+NETaa13427: added return types
+From: "R. Bernstein"
+Files patched: x2p/a2py.c
+ Applied suggested patch.
+
+NETaa13427: added static declarations
+Files patched: x2p/walk.c
+ (same)
+
+NETaa13428: split was assuming that all backreferences were defined
+From: Dave Schweisguth
+Files patched: pp.c
+ split was assuming that all backreferences were defined.
+
+NETaa13430: hoistmust wasn't hoisting anchored shortcircuit's length
+From: Tom Christiansen
+Also: Rob Hooft
+Files patched: toke.c
+
+NETaa13432: couldn't call code ref under debugger
+From: Mike Fletcher
+Files patched: op.c pp_hot.c sv.h
+ The debugging code assumed it could remember a name to represent a subroutine,
+ but anonymous subroutines don't have a name. It now remembers a CV reference
+ in that case.
+
+NETaa13435: 1' dumped core
+From: Larry Wall
+Files patched: toke.c
+ Didn't check a pointer for nullness.
+
+NETaa13436: print foo(123) didn't treat foo as subroutine
+From: mcook@cognex.com
+Files patched: toke.c
+ Now treats it as a subroutine rather than a filehandle.
+
+NETaa13437: &$::foo didn't think $::foo was a variable name
+From: mcook@cognex.com
+Files patched: toke.c
+ Now treats $::foo as a global variable.
+
+NETaa13439: referred to old package name
+From: Tom Christiansen
+Files patched: lib/Sys/Syslog.pm
+ Wasn't a strict refs problem after all. It was simply referring to package
+ syslog, which had been renamed to Sys::Syslog.
+
+NETaa13440: stat operations didn't know what to do with glob or ref to glob
+From: mcook@cognex.com
+Files patched: doio.c pp_sys.c
+ Now knows about the kinds of filehandles returned by FileHandle constructors
+ and such.
+
+NETaa13442: couldn't find name of copy of deleted symbol table entry
+From: Spider Boardman
+Files patched: gv.c gv.h
+ I did a much simpler fix. When gp_free notices that it's freeing the
+ master GV, it nulls out gp_egv. The GvENAME and GvESTASH macros know
+ to revert to gv if egv is null.
+
+ This has the advantage of not creating a reference loop.
+
+NETaa13443: couldn't override an XSUB
+From: William Setzer
+Files patched: op.c
+ When the newSUB and newXS routines checked for whether the old sub was
+ defined, they only looked at CvROOT(cv), not CvXSUB(cv).
+
+NETaa13443: needed to do same thing in newXS
+Files patched: op.c
+ (same)
+
+NETaa13444: -foo now doesn't warn unless sub foo is defined
+From: Larry Wall
+Files patched: toke.c
+ Made it not warn on -foo, unless there is a sub foo defined.
+
+NETaa13451: in scalar context, pp_entersub now guarantees one item from XSUB
+From: Nick Gianniotis
+Files patched: pp_hot.c
+ The pp_entersub routine now guarantees that an XSUB in scalar context
+ returns one and only one value. If there are fewer, it pushes undef,
+ and if there are more, it returns the last one.
+
+NETaa13457: now explicitly disallows printf format with 'n' or '*'.
+From: lees@cps.msu.edu
+Files patched: doop.c
+ Now says
+
+ Use of n in printf format not supported at ./foo line 3.
+
+
+NETaa13458: needed to call SvPOK_only() in pp_substr
+From: Wayne Scott
+Files patched: pp.c
+ Needed to call SvPOK_only() in pp_substr.
+
+NETaa13459: umask and chmod now warn about missing initial 0 even with paren
+From: Andreas Koenig
+Files patched: toke.c
+ Now skips parens as well as whitespace looking for argument.
+
+NETaa13460: backtracking didn't work on .*? because reginput got clobbered
+From: Andreas Koenig
+Files patched: regexec.c
+ When .*? did a probe of the rest of the string, it clobbered reginput,
+ so the next call to match a . tried to match the newline and failed.
+
+NETaa13475: \(@ary) now treats array as list of scalars
+From: Tim Bunce
+Files patched: op.c
+ The mod() routine now refrains from marking @ary as an lvalue if it's in parens
+ and is the subject of an OP_REFGEN.
+
+NETaa13481: accept buffer wasn't aligned good enough
+From: Holger Bechtold
+Also: Christian Murphy
+Files patched: pp_sys.c
+ Applied suggested patch.
+
+NETaa13486: while (<>) now means while (defined($_ = <>))
+From: Jim Balter
+Files patched: op.c pod/perlop.pod
+ while (<HANDLE>) now means while (defined($_ = <HANDLE>)).
+
+NETaa13500: needed DESTROY in FileHandle
+From: Tim Bunce
+Files patched: ext/POSIX/POSIX.pm
+ Added DESTROY method. Also fixed ungensym to use POSIX:: instead of _POSIX.
+ Removed ungensym from close method, since DESTROY should do that now.
+
+NETaa13502: now complains if you use local on a lexical variable
+From: Larry Wall
+Files patched: op.c
+ Now says something like
+
+ Can't localize lexical variable $var at ./try line 6.
+
+NETaa13512: added $SIG{__WARN__} and $SIG{__DIE__} hooks
+From: Larry Wall
+Files patched: embed.h gv.c interp.sym mg.c perl.h pod/perlvar.pod pp_ctl.c util.c Todo pod/perldiag.pod
+
+NETaa13514: statements before intro of lex var could see lex var
+From: William Setzer
+Files patched: op.c
+ When a lexical variable is declared, introduction is delayed until
+ the start of the next statement, so that any initialization code runs
+ outside the scope of the new variable. Thus,
+
+ my $y = 3;
+ my $y = $y;
+ print $y;
+
+ should print 3. Unfortunately, the declaration was marked with the
+ beginning location at the time that "my $y" was processed instead of
+ when the variable was introduced, so any embedded statements within
+ an anonymous subroutine picked up the wrong "my". The declaration
+ is now labelled correctly when the variable is actually introduced.
+
+NETaa13520: added closures
+From: Larry Wall
+Files patched: Todo cv.h embed.h global.sym gv.c interp.sym op.c perl.c perl.h pod/perlform.pod pp.c pp_ctl.c pp_hot.c sv.c sv.h toke.c
+
+NETaa13520: test to see if lexical works in a format now
+Files patched: t/op/write.t
+
+NETaa13522: substitution couldn't be used on a substr()
+From: Hans Mulder
+Files patched: pp_ctl.c pp_hot.c
+ Changed pp_subst not to use sv_replace() anymore, which didn't handle lvalues
+ and was overkill anyway. Should be slightly faster this way too.
+
+NETaa13525: G_EVAL mode in perl_call_sv didn't return values right.
+Files patched: perl.c
+
+NETaa13525: consolidated error message
+From: Larry Wall
+Files patched: perl.h toke.c
+
+NETaa13525: derived it
+Files patched: perly.h
+
+NETaa13525: missing some values from embed.h
+Files patched: embed.h
+
+NETaa13525: random cleanup
+Files patched: MANIFEST Todo cop.h lib/TieHash.pm lib/perl5db.pl opcode.h patchlevel.h pod/perldata.pod pod/perlsub.pod t/op/ref.t toke.c
+
+NETaa13525: random cleanup
+Files patched: pp_ctl.c util.c
+
+NETaa13527: File::Find needed to export $name and $dir
+From: Chaim Frenkel
+Files patched: lib/File/Find.pm
+ They are now exported.
+
+NETaa13528: cv_undef left unaccounted-for GV pointer in CV
+From: Tye McQueen
+Also: Spider Boardman
+Files patched: op.c
+
+NETaa13530: scalar keys now resets hash iterator
+From: Tim Bunce
+Files patched: doop.c
+ scalar keys() now resets the hash iterator.
+
+NETaa13531: h2ph doesn't check defined right
+From: Casper H.S. Dik
+Files patched: h2ph.SH
+
+NETaa13540: VMS update
+From: Larry Wall
+Files patched: MANIFEST README.vms doio.c embed.h ext/DynaLoader/dl_vms.xs interp.sym lib/Cwd.pm lib/ExtUtils/xsubpp lib/File/Basename.pm lib/File/Find.pm lib/File/Path.pm mg.c miniperlmain.c perl.c perl.h perly.c perly.c.diff pod/perldiag.pod pp_ctl.c pp_hot.c pp_sys.c proto.h util.c vms/Makefile vms/config.vms vms/descrip.mms vms/ext/Filespec.pm vms/ext/MM_VMS.pm vms/ext/VMS/stdio/Makefile.PL vms/ext/VMS/stdio/stdio.pm vms/ext/VMS/stdio/stdio.xs vms/genconfig.pl vms/perlvms.pod vms/sockadapt.c vms/sockadapt.h vms/vms.c vms/vmsish.h vms/writemain.pl
+
+NETaa13540: got some duplicate code
+Files patched: lib/File/Path.pm
+
+NETaa13540: stuff from Charles
+Files patched: MANIFEST README.vms lib/ExtUtils/MakeMaker.pm lib/ExtUtils/MakeMaker.pm lib/ExtUtils/xsubpp lib/File/Basename.pm lib/File/Path.pm perl.c perl.h pod/perldiag.pod pod/perldiag.pod vms/Makefile vms/Makefile vms/config.vms vms/config.vms vms/descrip.mms vms/descrip.mms vms/ext/Filespec.pm vms/ext/Filespec.pm vms/ext/MM_VMS.pm vms/ext/MM_VMS.pm vms/ext/VMS/stdio/stdio.pm vms/ext/VMS/stdio/stdio.xs vms/gen_shrfls.pl vms/gen_shrfls.pl vms/genconfig.pl vms/genconfig.pl vms/mms2make.pl vms/perlvms.pod vms/sockadapt.h vms/test.com vms/vms.c vms/vms.c vms/vmsish.h vms/vmsish.h vms/writemain.pl
+
+NETaa13540: tweak from Charles
+Files patched: lib/File/Path.pm
+
+NETaa13552: scalar unpack("P4",...) ignored the 4
+From: Eric Arnold
+Files patched: pp.c
+ The optimization that tried to do only one item in a scalar context didn't
+ realize that the argument to P was not a repeat count.
+
+NETaa13553: now warns about 8 or 9 in octal escapes
+From: Mike Rogers
+Files patched: util.c
+ Now warns if it finds 8 or 9 before the end of the octal escape sequence.
+ So \039 produces a warning, but \0339 does not.
+
+NETaa13554: now allows foreach ${"name"}
+From: Johan Holtman
+Files patched: op.c
+ Instead of trying to remove OP_RV2SV, the compiler now just transmutes it into an
+ OP_RV2GV, which is a no-op for ordinary variables and does the right
+ thing for ${"name"}.
+
+NETaa13559: substitution now always checks for readonly
+From: Rodger Anderson
+Files patched: pp_hot.c
+ Substitution now always checks for readonly.
+
+NETaa13561: added explanations of closures and curly-quotes
+From: Larry Wall
+Files patched: pod/perlref.pod
+
+NETaa13562: null components in path cause indigestion
+From: Ambrose Kofi Laing
+Files patched: lib/Cwd.pm lib/pwd.pl
+
+NETaa13575: documented semantics of negative substr length
+From: Jeff Bouis
+Files patched: pod/perlfunc.pod
+ Documented the fact that negative length now leaves characters off the end,
+ and while I was at it, made it work right even if offset wasn't 0.
+
+NETaa13575: negative length to substr didn't work when offset non-zero
+Files patched: pp.c
+ (same)
+
+NETaa13575: random cleanup
+Files patched: pod/perlfunc.pod
+ (same)
+
+NETaa13580: couldn't localize $ACCUMULATOR
+From: Larry Wall
+Files patched: gv.c lib/English.pm mg.c perl.c sv.c
+ Needed to make $^A a real magical variable. Also lib/English.pm wasn't
+ exporting good.
+
+NETaa13583: doc mods from Tom
+From: Larry Wall
+Files patched: pod/modpods/AnyDBMFile.pod pod/modpods/Basename.pod pod/modpods/Benchmark.pod pod/modpods/Cwd.pod pod/modpods/Dynaloader.pod pod/modpods/Exporter.pod pod/modpods/Find.pod pod/modpods/Finddepth.pod pod/modpods/Getopt.pod pod/modpods/MakeMaker.pod pod/modpods/Open2.pod pod/modpods/POSIX.pod pod/modpods/Ping.pod pod/modpods/less.pod pod/modpods/strict.pod pod/perlapi.pod pod/perlbook.pod pod/perldata.pod pod/perlform.pod pod/perlfunc.pod pod/perlipc.pod pod/perlmod.pod pod/perlobj.pod pod/perlref.pod pod/perlrun.pod pod/perlsec.pod pod/perlsub.pod pod/perltrap.pod pod/perlvar.pod
+
+NETaa13589: return was enforcing list context on its arguments
+From: Tim Freeman
+Files patched: opcode.pl
+ A return was being treated like a normal list operator, in that it was
+ setting list context on its arguments. This was bogus.
+
+NETaa13591: POSIX::creat used wrong argument
+From: Paul Marquess
+Files patched: ext/POSIX/POSIX.pm
+ Applied suggested patch.
+
+NETaa13605: use strict refs error message now displays bad ref
+From: Peter Gordon
+Files patched: perl.h pod/perldiag.pod pp.c pp_hot.c
+ Now says
+
+ Can't use string ("2") as a HASH ref while "strict refs" in use at ./foo line 12.
+
+NETaa13630: eof docs were unclear
+From: Hallvard B Furuseth
+Files patched: pod/perlfunc.pod
+ Applied suggested patch.
+
+NETaa13636: $< and $> weren't refetched on undump restart
+From: Steve Pearlmutter
+Files patched: perl.c
+ The code in main() bypassed perl_construct on an undump restart, which bypassed
+ the code that set $< and $>.
+
+NETaa13641: added Tim's fancy new import whizbangers
+From: Tim Bunce
+Files patched: lib/Exporter.pm
+ Applied suggested patch.
+
+NETaa13649: couldn't AUTOLOAD a symbol reference
+From: Larry Wall
+Files patched: pp_hot.c
+ pp_entersub needed to guarantee a CV so it would get to the AUTOLOAD code.
+
+NETaa13651: renamed file had wrong package name
+From: Andreas Koenig
+Files patched: lib/File/Path.pm
+ Applied suggested patch.
+
+NETaa13660: now that we're testing distribution we can diagnose RANDBITS errors
+From: Karl Glazebrook
+Files patched: t/op/rand.t
+ Changed to suggested algorithm. Also duplicated it to test rand(100) too.
+
+NETaa13660: rand.t didn't test for proper distribution within range
+Files patched: t/op/rand.t
+ (same)
+
+NETaa13671: array slice misbehaved in a scalar context
+From: Tye McQueen
+Files patched: pp.c
+ A spurious else prevented the scalar-context-handling code from running.
+
+NETaa13672: filehandle constructors in POSIX don't return failure successfully
+From: Ian Phillipps
+Files patched: ext/POSIX/POSIX.pm
+ Applied suggested patch.
+
+
+NETaa13678: forced $1 to always be untainted
+From: Ka-Ping Yee
+Files patched: mg.c
+ I believe the bug that triggered this was fixed elsewhere, but just in case,
+ I put in explicit code to force $1 et al not to be tainted regardless.
+
+NETaa13682: formline doc need to discuss ~ and ~~ policy
+From: Peter Gordon
+Files patched: pod/perlfunc.pod
+
+NETaa13686: POSIX::open and POSIX::mkfifo didn't check tainting
+From: Larry Wall
+Files patched: ext/POSIX/POSIX.xs
+ open() and mkfifo() now check tainting.
+
+NETaa13687: new Exporter.pm
+From: Tim Bunce
+Files patched: lib/Exporter.pm
+ Added suggested changes, except for @EXPORTABLE, because it looks too much
+ like @EXPORTTABLE. Decided to stick with @EXPORT_OK because it looks more
+ like an adjunct. Also added an export_tags routine. The keys in the
+ %EXPORT_TAGS hash no longer use colons, to make the initializers prettier.
+
+NETaa13687: new Exporter.pm
+Files patched: ext/POSIX/POSIX.pm
+ (same)
+
+NETaa13694: add sockaddr_in to Socket.pm
+From: Tim Bunce
+Files patched: ext/Socket/Socket.pm
+ Applied suggested patch.
+
+NETaa13695: library routines should use qw() as good example
+From: Dean Roehrich
+Files patched: ext/DB_File/DB_File.pm ext/DynaLoader/DynaLoader.pm ext/Fcntl/Fcntl.pm ext/GDBM_File/GDBM_File.pm ext/POSIX/POSIX.pm ext/Socket/Socket.pm
+ Applied suggested patch.
+
+NETaa13696: myconfig should be a routine in Config.pm
+From: Kenneth Albanowski
+Files patched: configpm
+ Applied suggested patch.
+
+NETaa13704: fdopen closed fd on failure
+From: Hallvard B Furuseth
+Files patched: doio.c
+ Applied suggested patch.
+
+NETaa13706: Term::Cap doesn't work
+From: Dean Roehrich
+Files patched: lib/Term/Cap.pm
+ Applied suggested patch.
+
+NETaa13710: cryptswitch needed to be more "useable"
+From: Tim Bunce
+Files patched: embed.h global.sym perl.h toke.c
+ The cryptswitch_fp function now can operate in two modes. It can
+ modify the global rsfp to redirect input as before, or it can modify
+ linestr and return true, indicating that it is not necessary for yylex
+ to read another line since cryptswitch_fp has just done it.
+
+NETaa13712: new_tmpfile() can't be called as constructor
+From: Hans Mulder
+Files patched: ext/POSIX/POSIX.xs
+ Now allows new_tmpfile() to be called as a constructor.
+
+NETaa13714: variable method call not documented
+From: "Randal L. Schwartz"
+Files patched: pod/perlobj.pod
+ Now indicates that OBJECT->$method() works.
+
+NETaa13715: PACK->$method produces spurious warning
+From: Larry Wall
+Files patched: toke.c
+ The -> operator was telling the lexer to expect an operator when the
+ next thing was a variable.
+
+NETaa13716: Carp now allows multiple packages to be skipped out of
+From: Larry Wall
+Files patched: lib/Carp.pm
+ The subroutine redefinition warnings now warn on import collisions.
+
+NETaa13716: Exporter catches warnings and gives a better line number
+Files patched: lib/Exporter.pm
+ (same)
+
+NETaa13716: now counts imported routines as "defined" for redef warnings
+Files patched: op.c sv.c
+ (same)
+
+-------------
+Version 5.000
+-------------
+
New things
----------
The -w switch is much more informative.
handy.h Handy definitions
hints/3b1.sh Hints for named architecture
hints/3b1cc Hints for named architecture
-hints/PowerUNIX.sh Hints for named architecture
hints/README.hints Notes about hints.
hints/aix.sh Hints for named architecture
hints/altos486.sh Hints for named architecture
hints/next_3_0.sh Hints for named architecture
hints/next_3_2.sh Hints for named architecture
hints/opus.sh Hints for named architecture
+hints/powerunix.sh Hints for named architecture
hints/sco_2_3_0.sh Hints for named architecture
hints/sco_2_3_1.sh Hints for named architecture
hints/sco_2_3_2.sh Hints for named architecture
lib/Text/Soundex.pm Perl module to implement Soundex
lib/Text/Tabs.pm Do expand and unexpand
lib/TieHash.pm Base class for tied hashes
+lib/SubstrHash.pm Compact hash for known key, value and table size
lib/Time/Local.pm Reverse translation of localtime, gmtime
lib/abbrev.pl An abbreviation table builder
lib/assert.pl assertion and panic with stack trace
pod/perltrap.pod Trap info
pod/perlvar.pod Variable info
pod/pod2html Translator to turn pod into HTML
+pod/pod2latex Translator to turn pod into LaTeX
pod/pod2man Translator to turn pod into manpage
pod/splitman Splits perlfunc into multiple man pages
pp.c Push/Pop code
t/io/tell.t See if file seeking works
t/lib/anydbm.t See if AnyDBM_File works
t/lib/bigint.t See if bigint.pl works
+t/lib/bigintpm.t See if BigInt.pm works
t/lib/db-btree.t See if DB_File works
t/lib/db-hash.t See if DB_File works
t/lib/db-recno.t See if DB_File works
t/op/my.t See if lexical scoping works
t/op/oct.t See if oct and hex work
t/op/ord.t See if ord works
+t/op/overload.t See if operator overload works
t/op/pack.t See if pack and unpack work
t/op/pat.t See if esoteric patterns work
t/op/push.t See if push and pop work
unixish.h Defines that are assumed on Unix
util.c Utility routines
util.h Public declarations for the above
+vms/Makefile VMS port
vms/config.vms VMS port
vms/descrip.mms VMS port
-vms/ext/MM_VMS.pm VMS port
+vms/ext/Filespec.pm VMS-Unix file syntax interconversion
+vms/ext/MM_VMS.pm VMS-specific methods for MakeMaker
+vms/ext/VMS/stdio/Makefile.PL MakeMaker driver for VMS::stdio
+vms/ext/VMS/stdio/stdio.pm VMS options to stdio routines
+vms/ext/VMS/stdio/stdio.xs VMS options to stdio routines
vms/gen_shrfls.pl VMS port
vms/genconfig.pl VMS port
vms/genopt.com VMS port
-vms/makefile. VMS port
vms/mms2make.pl VMS port
vms/perlshr.c VMS port
vms/perlvms.pod VMS port
x2p/EXTERN.h Same as above
x2p/INTERN.h Same as above
x2p/Makefile.SH Precursor to Makefile
-x2p/a2p.c A byacc'ed a2p.y
+x2p/a2p.c Output of a2p.y run through byacc
x2p/a2p.h Global declarations
x2p/a2p.man Manual page for awk to perl translator
x2p/a2p.y A yacc grammer for awk
+++ /dev/null
-Artistic The "Artistic License"
-Changes Differences between Perl 4 and Perl 5
-Configure Portability tool
-Copying The GNU General Public License
-Doc/perl5-notes Samples of new functionality
-EXTERN.h Included before foreign .h files
-INTERN.h Included before domestic .h files
-MANIFEST This list of files
-Makefile.SH A script that generates Makefile
-README The Instructions
-README.vms Notes about VMS
-Todo The Wishlist
-XSUB.h Include file for extension subroutines
-autosplit Splits up autoloader functions
-av.c Array value code
-av.h Array value header
-c2ph.SH program to translate dbx stabs to perl
-c2ph.doc documentation for c2ph
-cflags.SH A script that emits C compilation flags per file
-config.H Sample config.h
-config_h.SH Produces config.h
-configpm Produces lib/Config.pm
-cop.h Control operator header
-cv.h Code value header
-deb.c Debugging routines
-doSH Script to run all the *.SH files
-doio.c I/O operations
-doop.c Support code for various operations
-dosish.h Some defines for MS/DOSish machines
-dump.c Debugging output
-eg/ADB An adb wrapper to put in your crash dir
-eg/README Intro to example perl scripts
-eg/changes A program to list recently changed files
-eg/client A sample client
-eg/down A program to do things to subdirectories
-eg/dus A program to do du -s on non-mounted dirs
-eg/findcp A find wrapper that implements a -cp switch
-eg/findtar A find wrapper that pumps out a tar file
-eg/g/gcp A program to do a global rcp
-eg/g/gcp.man Manual page for gcp
-eg/g/ged A program to do a global edit
-eg/g/ghosts A sample /etc/ghosts file
-eg/g/gsh A program to do a global rsh
-eg/g/gsh.man Manual page for gsh
-eg/muck A program to find missing make dependencies
-eg/muck.man Manual page for muck
-eg/myrup A program to find lightly loaded machines
-eg/nih Script to insert #! workaround
-eg/relink A program to change symbolic links
-eg/rename A program to rename files
-eg/rmfrom A program to feed doomed filenames to
-eg/scan/scan_df Scan for filesystem anomalies
-eg/scan/scan_last Scan for login anomalies
-eg/scan/scan_messages Scan for console message anomalies
-eg/scan/scan_passwd Scan for passwd file anomalies
-eg/scan/scan_ps Scan for process anomalies
-eg/scan/scan_sudo Scan for sudo anomalies
-eg/scan/scan_suid Scan for setuid anomalies
-eg/scan/scanner An anomaly reporter
-eg/server A sample server
-eg/shmkill A program to remove unused shared memory
-eg/sysvipc/README Intro to Sys V IPC examples
-eg/sysvipc/ipcmsg Example of SYS V IPC message queues
-eg/sysvipc/ipcsem Example of Sys V IPC semaphores
-eg/sysvipc/ipcshm Example of Sys V IPC shared memory
-eg/travesty A program to print travesties of its input text
-eg/unuc Un-uppercases an all-uppercase text
-eg/uudecode A version of uudecode
-eg/van/empty A program to empty the trashcan
-eg/van/unvanish A program to undo what vanish does
-eg/van/vanexp A program to expire vanished files
-eg/van/vanish A program to put files in a trashcan
-eg/who A sample who program
-eg/wrapsuid A setuid script wrapper generator
-emacs/cperl-mode An alternate perl-mode
-emacs/emacs19 Notes about emacs 19
-emacs/perl-mode.el Emacs major mode for perl
-emacs/perldb.el Emacs debugging
-emacs/perldb.pl Emacs debugging
-emacs/tedstuff Some optional patches
-embed.h Maps symbols to safer names
-embed_h.sh Produces embed.h
-ext/DB_File/DB_File.pm Berkeley DB extension Perl module
-ext/DB_File/DB_File.xs Berkeley DB extension external subroutines
-ext/DB_File/DB_File_BS Berkeley DB extension mkbootstrap fodder
-ext/DB_File/Makefile.PL Berkeley DB extension makefile writer
-ext/DB_File/typemap Berkeley DB extension interface types
-ext/DynaLoader/DynaLoader.doc Dynamic Loader specification
-ext/DynaLoader/DynaLoader.pm Dynamic Loader perl module
-ext/DynaLoader/Makefile.PL Dynamic Loader makefile writer
-ext/DynaLoader/README Dynamic Loader notes and intro
-ext/DynaLoader/dl_aix.xs AIX implementation
-ext/DynaLoader/dl_dld.xs GNU dld style implementation
-ext/DynaLoader/dl_dlopen.xs BSD/SunOS4&5 dlopen() style implementation
-ext/DynaLoader/dl_hpux.xs HP-UX implementation
-ext/DynaLoader/dl_next.xs Next implementation
-ext/DynaLoader/dl_none.xs Stub implementation
-ext/DynaLoader/dl_vms.xs VMS implementation
-ext/DynaLoader/dlutils.c Dynamic loader utilities for dl_*.xs files
-ext/Fcntl/Fcntl.pm Fcntl extension Perl module
-ext/Fcntl/Fcntl.xs Fcntl extension external subroutines
-ext/Fcntl/MANIFEST Fcntl extension file list
-ext/Fcntl/Makefile.PL Fcntl extension makefile writer
-ext/GDBM_File/GDBM_File.pm GDBM extension Perl module
-ext/GDBM_File/GDBM_File.xs GDBM extension external subroutines
-ext/GDBM_File/Makefile.PL GDBM extension makefile writer
-ext/GDBM_File/typemap GDBM extension interface types
-ext/NDBM_File/Makefile.PL NDBM extension makefile writer
-ext/NDBM_File/NDBM_File.pm NDBM extension Perl module
-ext/NDBM_File/NDBM_File.xs NDBM extension external subroutines
-ext/NDBM_File/typemap NDBM extension interface types
-ext/ODBM_File/Makefile.PL ODBM extension makefile writer
-ext/ODBM_File/ODBM_File.pm ODBM extension Perl module
-ext/ODBM_File/ODBM_File.xs ODBM extension external subroutines
-ext/ODBM_File/typemap ODBM extension interface types
-ext/POSIX/Makefile.PL POSIX extension makefile writer
-ext/POSIX/POSIX.pm POSIX extension Perl module
-ext/POSIX/POSIX.xs POSIX extension external subroutines
-ext/POSIX/typemap POSIX extension interface types
-ext/SDBM_File/Makefile.PL SDBM extension makefile writer
-ext/SDBM_File/SDBM_File.pm SDBM extension Perl module
-ext/SDBM_File/SDBM_File.xs SDBM extension external subroutines
-ext/SDBM_File/sdbm/CHANGES SDBM kit
-ext/SDBM_File/sdbm/COMPARE SDBM kit
-ext/SDBM_File/sdbm/Makefile.PL SDBM kit
-ext/SDBM_File/sdbm/README SDBM kit
-ext/SDBM_File/sdbm/README.too SDBM kit
-ext/SDBM_File/sdbm/biblio SDBM kit
-ext/SDBM_File/sdbm/dba.c SDBM kit
-ext/SDBM_File/sdbm/dbd.c SDBM kit
-ext/SDBM_File/sdbm/dbe.1 SDBM kit
-ext/SDBM_File/sdbm/dbe.c SDBM kit
-ext/SDBM_File/sdbm/dbm.c SDBM kit
-ext/SDBM_File/sdbm/dbm.h SDBM kit
-ext/SDBM_File/sdbm/dbu.c SDBM kit
-ext/SDBM_File/sdbm/grind SDBM kit
-ext/SDBM_File/sdbm/hash.c SDBM kit
-ext/SDBM_File/sdbm/linux.patches SDBM kit
-ext/SDBM_File/sdbm/makefile.sdbm SDBM kit
-ext/SDBM_File/sdbm/pair.c SDBM kit
-ext/SDBM_File/sdbm/pair.h SDBM kit
-ext/SDBM_File/sdbm/readme.ms SDBM kit
-ext/SDBM_File/sdbm/readme.ps SDBM kit
-ext/SDBM_File/sdbm/sdbm.3 SDBM kit
-ext/SDBM_File/sdbm/sdbm.c SDBM kit
-ext/SDBM_File/sdbm/sdbm.h SDBM kit
-ext/SDBM_File/sdbm/tune.h SDBM kit
-ext/SDBM_File/sdbm/util.c SDBM kit
-ext/SDBM_File/typemap SDBM extension interface types
-ext/Socket/Makefile.PL Socket extension makefile writer
-ext/Socket/Socket.pm Socket extension Perl module
-ext/Socket/Socket.xs Socket extension external subroutines
-ext/util/extliblist Used by extension Makefile.PL to make lib lists
-ext/util/make_ext Used by Makefile to execute extension Makefiles
-ext/util/mkbootstrap Turns ext/*/*_BS into bootstrap info
-form.h Public declarations for the above
-global.sym Symbols that need hiding when embedded
-globals.c File to declare global symbols (for shared library)
-gv.c Glob value code
-gv.h Glob value header
-h2ph.SH A thing to turn C .h files into perl .ph files
-h2pl/README How to turn .ph files into .pl files
-h2pl/cbreak.pl cbreak routines using .ph
-h2pl/cbreak2.pl cbreak routines using .pl
-h2pl/eg/sizeof.ph Sample sizeof array initialization
-h2pl/eg/sys/errno.pl Sample translated errno.pl
-h2pl/eg/sys/ioctl.pl Sample translated ioctl.pl
-h2pl/eg/sysexits.pl Sample translated sysexits.pl
-h2pl/getioctlsizes Program to extract types from ioctl.h
-h2pl/mksizes Program to make %sizeof array
-h2pl/mkvars Program to make .pl from .ph files
-h2pl/tcbreak cbreak test routine using .ph
-h2pl/tcbreak2 cbreak test routine using .pl
-h2xs.SH Program to make .xs files from C header files
-handy.h Handy definitions
-hints/3b1.sh Hints for named architecture
-hints/3b1cc Hints for named architecture
-hints/PowerUNIX.sh Hints for named architecture
-hints/README.hints Notes about hints.
-hints/aix.sh Hints for named architecture
-hints/altos486.sh Hints for named architecture
-hints/apollo.sh Hints for named architecture
-hints/aux.sh Hints for named architecture
-hints/bsd386.sh Hints for named architecture
-hints/convexos.sh Hints for named architecture
-hints/cxux.sh Hints for named architecture
-hints/dec_osf.sh Hints for named architecture
-hints/dgux.sh Hints for named architecture
-hints/dnix.sh Hints for named architecture
-hints/dynix.sh Hints for named architecture
-hints/esix4.sh Hints for named architecture
-hints/fps.sh Hints for named architecture
-hints/freebsd.sh Hints for named architecture
-hints/genix.sh Hints for named architecture
-hints/greenhills.sh Hints for named architecture
-hints/hpux_9.sh Hints for named architecture
-hints/i386.sh Hints for named architecture
-hints/irix_4.sh Hints for named architecture
-hints/irix_5.sh Hints for named architecture
-hints/irix_6.sh Hints for named architecture
-hints/isc.sh Hints for named architecture
-hints/isc_2.sh Hints for named architecture
-hints/linux.sh Hints for named architecture
-hints/machten.sh Hints for named architecture
-hints/mips.sh Hints for named architecture
-hints/mpc.sh Hints for named architecture
-hints/mpeix.sh Hints for named architecture
-hints/ncr_tower.sh Hints for named architecture
-hints/netbsd.sh Hints for named architecture
-hints/next_3_0.sh Hints for named architecture
-hints/next_3_2.sh Hints for named architecture
-hints/opus.sh Hints for named architecture
-hints/sco_2_3_0.sh Hints for named architecture
-hints/sco_2_3_1.sh Hints for named architecture
-hints/sco_2_3_2.sh Hints for named architecture
-hints/sco_2_3_3.sh Hints for named architecture
-hints/sco_2_3_4.sh Hints for named architecture
-hints/sco_3.sh Hints for named architecture
-hints/solaris_2.sh Hints for named architecture
-hints/stellar.sh Hints for named architecture
-hints/sunos_4_0.sh Hints for named architecture
-hints/sunos_4_1.sh Hints for named architecture
-hints/svr4.sh Hints for named architecture
-hints/ti1500.sh Hints for named architecture
-hints/titanos.sh Hints for named architecture
-hints/ultrix_4.sh Hints for named architecture
-hints/unicos.sh Hints for named architecture
-hints/unisysdynix.sh Hints for named architecture
-hints/utekv.sh Hints for named architecture
-hints/uts.sh Hints for named architecture
-hv.c Hash value code
-hv.h Hash value header
-installperl Perl script to do "make install" dirty work
-interp.sym Interpreter specific symbols to hide in a struct
-ioctl.pl Sample ioctl.pl
-keywords.h The keyword numbers
-keywords.pl Program to write keywords.h
-lib/AnyDBM_File.pm Perl module to emulate dbmopen
-lib/AutoLoader.pm Autoloader base class
-lib/AutoSplit.pm A module to split up autoload functions
-lib/Benchmark.pm A module to time pieces of code and such
-lib/Carp.pm Error message base class
-lib/Cwd.pm Various cwd routines (getcwd, fastcwd, chdir)
-lib/English.pm Readable aliases for short variables
-lib/Env.pm Map environment into ordinary variables
-lib/Exporter.pm Exporter base class
-lib/ExtUtils/MakeMaker.pm Write Makefiles for extensions
-lib/ExtUtils/typemap Extension interface types
-lib/ExtUtils/xsubpp External subroutine preprocessor
-lib/File/Basename.pm A module to emulate the basename program
-lib/File/CheckTree.pm Perl module supporting wholesale file mode validation
-lib/File/Find.pm Routines to do a find
-lib/File/Path.pm A module to do things like `mkdir -p' and `rm -r'
-lib/FileHandle.pm FileHandle methods
-lib/Getopt/Long.pm A module to fetch command options (GetOptions)
-lib/Getopt/Std.pm A module to fetch command options (getopt, getopts)
-lib/I18N/Collate.pm Routines to do strxfrm-based collation
-lib/IPC/Open2.pm Open a two-ended pipe
-lib/IPC/Open3.pm Open a three-ended pipe!
-lib/Math/BigFloat.pm An arbitrary precision floating-point arithmetic package
-lib/Math/BigInt.pm An arbitrary precision integer arithmetic package
-lib/Math/Complex.pm A Complex package
-lib/Net/Ping.pm Ping methods
-lib/Search/Dict.pm A module to do binary search on dictionaries
-lib/Shell.pm A module to make AUTOLOADEed system() calls
-lib/Sys/Hostname.pm Hostname methods
-lib/Sys/Syslog.pm Perl module supporting syslogging
-lib/Term/Cap.pm Perl module supporting termcap usage
-lib/Term/Complete.pm A command completion subroutine
-lib/Test/Harness.pm A test harness
-lib/Text/Abbrev.pm An abbreviation table builder
-lib/Text/ParseWords.pm Perl module to split words on arbitrary delimiter
-lib/Text/Soundex.pm Perl module to implement Soundex
-lib/Text/Tabs.pm Do expand and unexpand
-lib/TieHash.pm Base class for tied hashes
-lib/Time/Local.pm Reverse translation of localtime, gmtime
-lib/abbrev.pl An abbreviation table builder
-lib/assert.pl assertion and panic with stack trace
-lib/bigfloat.pl An arbitrary precision floating point package
-lib/bigint.pl An arbitrary precision integer arithmetic package
-lib/bigrat.pl An arbitrary precision rational arithmetic package
-lib/cacheout.pl Manages output filehandles when you need too many
-lib/chat2.inter A chat2 with interaction
-lib/chat2.pl Randal's famous expect-ish routines
-lib/complete.pl A command completion subroutine
-lib/ctime.pl A ctime workalike
-lib/dotsh.pl Code to "dot" in a shell script
-lib/dumpvar.pl A variable dumper
-lib/exceptions.pl catch and throw routines
-lib/fastcwd.pl a faster but more dangerous getcwd
-lib/find.pl A find emulator--used by find2perl
-lib/finddepth.pl A depth-first find emulator--used by find2perl
-lib/flush.pl Routines to do single flush
-lib/ftp.pl FTP code
-lib/getcwd.pl A getcwd() emulator
-lib/getopt.pl Perl library supporting option parsing
-lib/getopts.pl Perl library supporting option parsing
-lib/hostname.pl Old hostname code
-lib/importenv.pl Perl routine to get environment into variables
-lib/integer.pm For "use integer"
-lib/less.pm For "use less"
-lib/look.pl A "look" equivalent
-lib/newgetopt.pl A perl library supporting long option parsing
-lib/open2.pl Open a two-ended pipe
-lib/open3.pl Open a three-ended pipe
-lib/perl5db.pl Perl debugging routines
-lib/pwd.pl Routines to keep track of PWD environment variable
-lib/shellwords.pl Perl library to split into words with shell quoting
-lib/sigtrap.pm For trapping an abort and giving traceback
-lib/stat.pl Perl library supporting stat function
-lib/strict.pm For "use strict"
-lib/subs.pm Declare overriding subs
-lib/syslog.pl Perl library supporting syslogging
-lib/tainted.pl Old code for tainting
-lib/termcap.pl Perl library supporting termcap usage
-lib/timelocal.pl Perl library supporting inverse of localtime, gmtime
-lib/validate.pl Perl library supporting wholesale file mode validation
-makeaperl.SH perl script that produces a new perl binary
-makedepend.SH Precursor to makedepend
-makedir.SH Precursor to makedir
-malloc.c A version of malloc you might not want
-mg.c Magic code
-mg.h Magic header
-minimod.PL Writes lib/ExtUtils/Miniperl.pm
-miniperlmain.c Basic perl w/o dynamic loading or extensions
-mv-if-diff Script to mv a file if it changed
-myconfig Prints summary of the current configuration
-op.c Opcode syntax tree code
-op.h Opcode syntax tree header
-opcode.h Automatically generated opcode header
-opcode.pl Opcode header generatore
-patchlevel.h The current patch level of perl
-perl.c main()
-perl.h Global declarations
-perl_exp.SH Creates list of exported symbols for AIX.
-perlsh A poor man's perl shell
-perly.c A byacc'ed perly.y
-perly.c.diff Fixup perly.c to allow recursion
-perly.fixer A program to remove yacc stack limitations
-perly.h The header file for perly.c
-perly.y Yacc grammar for perl
-pl2pm A pl to pm translator
-pod/Makefile Make pods into something else
-pod/modpods/Abbrev.pod Doc for Abbrev.pm
-pod/modpods/AnyDBMFile.pod Doc for AnyDBMFile.pm
-pod/modpods/AutoLoader.pod Doc for AutoLoader.pm
-pod/modpods/AutoSplit.pod Doc for AutoSplit.pm
-pod/modpods/Basename.pod Doc for Basename.pm
-pod/modpods/Benchmark.pod Doc for Benchmark.pm
-pod/modpods/Carp.pod Doc for Carp.pm
-pod/modpods/CheckTree.pod Doc for CheckTree.pm
-pod/modpods/Collate.pod Doc for Collate.pm
-pod/modpods/Config.pod Doc for Config.pm
-pod/modpods/Cwd.pod Doc for Cwd.pm
-pod/modpods/DB_File.pod Doc for File.pm
-pod/modpods/Dynaloader.pod Doc for Dynaloader.pm
-pod/modpods/English.pod Doc for English.pm
-pod/modpods/Env.pod Doc for Env.pm
-pod/modpods/Exporter.pod Doc for Exporter.pm
-pod/modpods/Fcntl.pod Doc for Fcntl.pm
-pod/modpods/FileHandle.pod Doc for FileHandle.pm
-pod/modpods/Find.pod Doc for Find.pm
-pod/modpods/Finddepth.pod Doc for Finddepth.pm
-pod/modpods/GetOptions.pod Doc for GetOptions.pm
-pod/modpods/Getopt.pod Doc for Getopt.pm
-pod/modpods/MakeMaker.pod Doc for MakeMaker.pm
-pod/modpods/Open2.pod Doc for Open2.pm
-pod/modpods/Open3.pod Doc for Open3.pm
-pod/modpods/POSIX.pod Doc for POSIX.pm
-pod/modpods/Ping.pod Doc for Ping.pm
-pod/modpods/Socket.pod Doc for Socket.pm
-pod/modpods/integer.pod Doc for integer.pm
-pod/modpods/less.pod Doc for less.pm
-pod/modpods/sigtrap.pod Doc for sigtrap.pm
-pod/modpods/strict.pod Doc for strict.pm
-pod/modpods/subs.pod Doc for subs.pm
-pod/perl.pod Top level perl man page
-pod/perlapi.pod XS api info
-pod/perlbook.pod Book info
-pod/perlbot.pod Object-oriented Bag o' Tricks
-pod/perlcall.pod Callback info
-pod/perldata.pod Data structure info
-pod/perldebug.pod Debugger info
-pod/perldiag.pod Diagnostic info
-pod/perlembed.pod Embedding info
-pod/perlform.pod Format info
-pod/perlfunc.pod Function info
-pod/perlguts.pod Internals info
-pod/perlipc.pod IPC info
-pod/perlmod.pod Module info
-pod/perlobj.pod Object info
-pod/perlop.pod Operator info
-pod/perlovl.pod Overloading info
-pod/perlpod.pod Pod info
-pod/perlre.pod Regular expression info
-pod/perlref.pod References info
-pod/perlrun.pod Execution info
-pod/perlsec.pod Security info
-pod/perlstyle.pod Style info
-pod/perlsub.pod Subroutine info
-pod/perlsyn.pod Syntax info
-pod/perltrap.pod Trap info
-pod/perlvar.pod Variable info
-pod/pod2html Translator to turn pod into HTML
-pod/pod2man Translator to turn pod into manpage
-pod/splitman Splits perlfunc into multiple man pages
-pp.c Push/Pop code
-pp.h Push/Pop code defs
-pp_ctl.c Push/Pop code for control flow
-pp_hot.c Push/Pop code for heavily used opcodes
-pp_sys.c Push/Pop code for system interaction
-proto.h Prototypes
-regcomp.c Regular expression compiler
-regcomp.h Private declarations for above
-regexec.c Regular expression evaluator
-regexp.h Public declarations for the above
-run.c The interpreter loop
-scope.c Scope entry and exit code
-scope.h Scope entry and exit header
-sv.c Scalar value code
-sv.h Scalar value header
-t/README Instructions for regression tests
-t/TEST The regression tester
-t/base/cond.t See if conditionals work
-t/base/if.t See if if works
-t/base/lex.t See if lexical items work
-t/base/pat.t See if pattern matching works
-t/base/term.t See if various terms work
-t/cmd/elsif.t See if else-if works
-t/cmd/for.t See if for loops work
-t/cmd/mod.t See if statement modifiers work
-t/cmd/subval.t See if subroutine values work
-t/cmd/switch.t See if switch optimizations work
-t/cmd/while.t See if while loops work
-t/comp/cmdopt.t See if command optimization works
-t/comp/cpp.t See if C preprocessor works
-t/comp/decl.t See if declarations work
-t/comp/multiline.t See if multiline strings work
-t/comp/package.t See if packages work
-t/comp/script.t See if script invokation works
-t/comp/term.t See if more terms work
-t/io/argv.t See if ARGV stuff works
-t/io/dup.t See if >& works right
-t/io/fs.t See if directory manipulations work
-t/io/inplace.t See if inplace editing works
-t/io/pipe.t See if secure pipes work
-t/io/print.t See if print commands work
-t/io/tell.t See if file seeking works
-t/lib/anydbm.t See if AnyDBM_File works
-t/lib/bigint.t See if bigint.pl works
-t/lib/db-btree.t See if DB_File works
-t/lib/db-hash.t See if DB_File works
-t/lib/db-recno.t See if DB_File works
-t/lib/english.t See if English works
-t/lib/gdbm.t See if GDBM_File works
-t/lib/ndbm.t See if NDBM_File works
-t/lib/odbm.t See if ODBM_File works
-t/lib/posix.t See if POSIX works
-t/lib/sdbm.t See if SDBM_File works
-t/lib/soundex.t See if Soundex works
-t/op/append.t See if . works
-t/op/array.t See if array operations work
-t/op/auto.t See if autoincrement et all work
-t/op/chop.t See if chop works
-t/op/cond.t See if conditional expressions work
-t/op/delete.t See if delete works
-t/op/do.t See if subroutines work
-t/op/each.t See if associative iterators work
-t/op/eval.t See if eval operator works
-t/op/exec.t See if exec and system work
-t/op/exp.t See if math functions work
-t/op/flip.t See if range operator works
-t/op/fork.t See if fork works
-t/op/glob.t See if <*> works
-t/op/goto.t See if goto works
-t/op/groups.t See if $( works
-t/op/index.t See if index works
-t/op/int.t See if int works
-t/op/join.t See if join works
-t/op/list.t See if array lists work
-t/op/local.t See if local works
-t/op/magic.t See if magic variables work
-t/op/misc.t See if miscellaneous bugs have been fixed
-t/op/mkdir.t See if mkdir works
-t/op/my.t See if lexical scoping works
-t/op/oct.t See if oct and hex work
-t/op/ord.t See if ord works
-t/op/pack.t See if pack and unpack work
-t/op/pat.t See if esoteric patterns work
-t/op/push.t See if push and pop work
-t/op/quotemeta.t See if quotemeta works
-t/op/rand.t See if rand works
-t/op/range.t See if .. works
-t/op/re_tests Input file for op.regexp
-t/op/read.t See if read() works
-t/op/readdir.t See if readdir() works
-t/op/ref.t See if refs and objects work
-t/op/regexp.t See if regular expressions work
-t/op/repeat.t See if x operator works
-t/op/sleep.t See if sleep works
-t/op/sort.t See if sort works
-t/op/split.t See if split works
-t/op/sprintf.t See if sprintf works
-t/op/stat.t See if stat works
-t/op/study.t See if study works
-t/op/subst.t See if substitution works
-t/op/substr.t See if substr works
-t/op/time.t See if time functions work
-t/op/undef.t See if undef works
-t/op/unshift.t See if unshift works
-t/op/vec.t See if vectors work
-t/op/write.t See if write works
-t/re_tests Regular expressions for regexp.t
-taint.c Tainting code
-toke.c The tokener
-unixish.h Defines that are assumed on Unix
-util.c Utility routines
-util.h Public declarations for the above
-vms/config.vms VMS port
-vms/descrip.mms VMS port
-vms/ext/MM_VMS.pm VMS port
-vms/gen_shrfls.pl VMS port
-vms/genconfig.pl VMS port
-vms/genopt.com VMS port
-vms/makefile. VMS port
-vms/mms2make.pl VMS port
-vms/perlshr.c VMS port
-vms/perlvms.pod VMS port
-vms/sockadapt.c VMS port
-vms/sockadapt.h VMS port
-vms/test.com VMS port
-vms/vms.c VMS port
-vms/vmsish.h VMS port
-vms/writemain.pl VMS port
-writemain.SH Generate perlmain.c from miniperlmain.c+extensions
-x2p/EXTERN.h Same as above
-x2p/INTERN.h Same as above
-x2p/Makefile.SH Precursor to Makefile
-x2p/a2p.c A byacc'ed a2p.y
-x2p/a2p.h Global declarations
-x2p/a2p.man Manual page for awk to perl translator
-x2p/a2p.y A yacc grammer for awk
-x2p/a2py.c Awk compiler, sort of
-x2p/cflags.SH A script that emits C compilation flags per file
-x2p/find2perl.SH A find to perl translator
-x2p/handy.h Handy definitions
-x2p/hash.c Associative arrays again
-x2p/hash.h Public declarations for the above
-x2p/s2p.SH Sed to perl translator
-x2p/s2p.man Manual page for sed to perl translator
-x2p/str.c String handling package
-x2p/str.h Public declarations for the above
-x2p/util.c Utility routines
-x2p/util.h Public declarations for the above
-x2p/walk.c Parse tree walker
-xf A script to translate Perl 4 symbols to Perl 5
-[This is an unsupported, pre-release version of Perl 5.0.]
Perl Kit, Version 5.0
my interpretation of the GNU General Public License is that no Perl
script falls under the terms of the GPL unless you explicitly put
said script under the terms of the GPL yourself. Furthermore, any
- object code linked with uperl.o does not automatically fall under the
+ object code linked with perl does not automatically fall under the
terms of the GPL, provided such object code only adds definitions
of subroutines and variables, and does not otherwise impair the
resulting interpreter from executing any standard Perl script. I
-Last revised: 09-Oct-1994 by Charles Bailey bailey@genetics.upenn.edu
+Last revised: 08-Feb-1995 by Charles Bailey bailey@genetics.upenn.edu
-The VMS port of perl5 is still under development. At this time, the perl
+The VMS port of Perl is still under development. At this time, the Perl
binaries built under VMS handle internal operations properly, for the most
part, as well as most of the system calls which have close equivalents under
VMS. There are still some incompatibilities in process handling (e.g the
fork/exec model for creating subprocesses doesn't do what you might expect
-under Unix), and there remain some file handling differences from Unix. There
-is a VMS implementation of the DynaLoader, but it hasn't been tested much, so
-it may still have some bugs in it. Over the longer term, we'll try to get many
-of the useful VMS system services integrated as well, depending on time and
-people available. Of course, if you'd like to add something yourself, or join
-the porting team, we'd love to have you!
+under Unix), and there remain some file handling differences from Unix. Over
+the longer term, we'll try to get many of the useful VMS system services
+integrated as well, depending on time and people available. Of course, if
+you'd like to add something yourself, or join the porting team, we'd love to
+have you!
The current sources and build procedures have been tested on a VAX using VAXC
-and on an AXP using DECC. IF you run into problems with other compilers,
+and on an AXP using DECC. If you run into problems with other compilers,
please let us know.
+Note to DECC users: Some early versions of the DECCRTL contained a few bugs
+which affect Perl performance:
+ - Newlines are lost on I/O through pipes, causing lines to run together.
+ This shows up as RMS RTB errors when reading from a pipe. You can
+ work around this by having one process write data to a file, and
+ then having the other read the file, instead of the pipe.
+ - The modf() routine returns a non-integral value for some values above
+ INT_MAX; the Perl "int" operator will return a non-integral value in
+ these cases.
+Both of these bugs have been fixed in later releases of the DECCRTL, but some
+systems running AXP/VMS 1.5 still have the old RTLs.
* Other software required
* Socket support
-Perl5 includes a number of IP socket routines among its builtin functions,
-which are available if you choose to compile perl with socket support. Since
+Perl includes a number of IP socket routines among its builtin functions,
+which are available if you choose to compile Perl with socket support. Since
IP networking is an optional addition to VMS, there are several different IP
-stacks available, it's difficult to automate the process of building perl5 with
+stacks available, it's difficult to automate the process of building Perl with
socket support in a way which will work on all systems.
-By default, perl5 is built without IP socket support. If you define the macro
+By default, Perl is built without IP socket support. If you define the macro
SOCKET when invoking MMS, however, socket support will be included. As
-distributed, perl5 for VMS includes support for the SOCKETSHR socket library,
+distributed, Perl for VMS includes support for the SOCKETSHR socket library,
which is layered on MadGoat software's vendor-independent NETLIB interface.
-This provides support for all socket calls used by perl5 except the
+This provides support for all socket calls used by Perl except the
[g|s]et*ent() routines, which are replaced for the moment by stubs which
-generate a fatal error if a perl script attempts to call one of these routines.
-If you'd like to link perl directly to your IP stack to take advantage of these
+generate a fatal error if a Perl script attempts to call one of these routines.
+If you'd like to link Perl directly to your IP stack to take advantage of these
routines or to eliminate the intermediate NETLIB, then make the following
changes:
- In Descrip.MMS, locate the section beginning with .ifdef SOCKET, and
includes the In.H, NetDb.H, and, if necessary, Errno.H header files
for your IP stack, or so that it declares the standard TCP/IP data
structures appropriately (see the distributed copy of SockAdapt.H
- for a collection of the structures needed by perl.) You should also
+ for a collection of the structures needed by Perl.) You should also
define any logical names necessary to find these files before invoking
- MMS to build perl.
+ MMS to build Perl.
- Edit the file SockAdapt.C in the [.VMS] subdirectory so that it
contains routines which substitute for any IP library routines
- required by perl which your IP stack does not provide. This may
+ required by Perl which your IP stack does not provide. This may
require a little trial and error; we'll try to compile a complete
- list soon of socket routines required by perl5.
+ list soon of socket routines required by Perl.
-* Building perl under VMS
+* Building Perl under VMS
-Since you're reading this, presumable you've unpacked the perl distribution
+Since you're reading this, presumably you've unpacked the Perl distribution
into its directory tree, in which you will find a [.vms] subdirectory below
the directory in which this file is found. If this isn't the case, then you'll
need to unpack the distribution properly, or manually edit Descrip.MMS or
-the VMS Makefile. to alter directory paths as necessary. (I'd advise using the
+the VMS Makefile to alter directory paths as necessary. (I'd advise using the
`normal' directory tree, at least for the first time through.) This
subdirectory contains several files, among which are the following:
Config.VMS - A template C header file set up for VMS.
- Descrip.MMS - The MMS/MMK dependency file for building perl
- GenConfig.Pl - A perl script to generate Config.SH retrospectively
+ Descrip.MMS - The MMS/MMK dependency file for building Perl
+ GenConfig.Pl - A Perl script to generate Config.SH retrospectively
from Config.VMS, since the Configure shell script which
normally generates Config.SH doesn't run under VMS.
GenOpt.Com - A little DCL procedure used to write some linker options
files, since not all make utilities can do this easily.
- Gen_ShrFls.Pl - A perl script which generates linker options files and
+ Gen_ShrFls.Pl - A Perl script which generates linker options files and
MACRO declarations for PerlShr.Exe.
- Makefile. - The make dependency file for building perl
- MMS2Make.Pl - A perl script used to generate Makefile. from Descrip.MMS
+ Makefile - The make dependency file for building Perl
+ MMS2Make.Pl - A Perl script used to generate Makefile from Descrip.MMS
VMSish.H - C header file containing VMS-specific definitions
VMS.C - C source code for VMS-specific routines
- WriteMain.Pl - A perl script used to generate perlmain.c during the build.
+ WriteMain.Pl - A Perl script used to generate perlmain.c during the build.
There may also be other files pertaining to features under development; for the
most part, you can ignore them.
-Config.VMS and Decrip.MMS/Makefile. are set up to build a version of perl which
+Config.VMS and Decrip.MMS/Makefile are set up to build a version of Perl which
includes all features known to work when this release was assembled. If you
have code at your site which would support additional features (e.g. emulation
of Unix system calls), feel free to make the appropriate changes to these
-files. (Note: Do not use or edit config.h in the main perl source directory;
+files. (Note: Do not use or edit config.h in the main Perl source directory;
it is superseded by the current Config.VMS during the build.) You may also
-wish to make site-specific changes to Descrip.MMS or Makefile. to reflect local
+wish to make site-specific changes to Descrip.MMS or Makefile to reflect local
conventions for naming of files, etc.
-At the moment, system-specific information which becomes part of the perl5
+At the moment, system-specific information which becomes part of the Perl
Config extension is hard-coded into the file genconfig.pl in the vms
-subdirectory. Before you build perl, you should make any changes to the list
+subdirectory. Before you build Perl, you should make any changes to the list
at the end of this file necessary to reflect your system (e.g your hostname and
VMS version).
Examine the information at the beginning of Descrip.MMS for information about
-specifying alternate C compilers or building a version of perl with debugging
+specifying alternate C compilers or building a version of Perl with debugging
support. For instance, if you want to use DECC, you'll need to include the
/macro="decc=1" qualifier to MMS (If you're using make, these options are not
supported.) If you're on an AXP system, define the macro __AXP__ (MMK does
this for you), and DECC will automatically be selected.
-To start the build, set default to the main source directory.
-Then, if you are using MMS or MMK, issue the command
+To start the build, set default to the main source directory. Since
+Descrip.MMS assumes that VMS commands have their usual meaning, and makes use
+of command-line macros, you may want to be certain that you haven't defined DCL
+symbols which would interfere with the build. Then, if you are using MMS or
+MMK, say
$ MMS/Descrip=[.VMS] ! or MMK
-If you are using make, issue the command
-$ Make -f [.VMS]Makefile.
-Note that the Makefile. doesn't support conditional compilation, and is
+If you are using make, say
+$ Make -f [.VMS]Makefile
+Note that the Makefile doesn't support conditional compilation, is
set up to use VAXC on a VAX, and does not include socket support. You can
-either edit the Makefile. by hand, using Descrip.MMS as a guide, or use the
-Makefile. to build Miniperl.Exe, and then run the Perl script MMS@Make.pl,
+either edit the Makefile by hand, using Descrip.MMS as a guide, or use the
+Makefile to build Miniperl.Exe, and then run the Perl script MMS2Make.pl,
found in the [.VMS] subdirectory, to generate a new Makefile with the options
appropriate to your site.
This will build the following files:
Miniperl.Exe - a stand-alone version of without any extensions.
- Miniperl has all the intrinsic capabilities of perl,
+ Miniperl has all the intrinsic capabilities of Perl,
but cannot make use of the DynaLoader or any
extensions which use XS code.
- PerlShr.Exe - a shareable image containing most of perl's internal
+ PerlShr.Exe - a shareable image containing most of Perl's internal
routines and global variables. Perl.Exe is linked to
this image, as are all dynamic extensions, so everyone's
using the same set of global variables and routines.
- Perl.Exe - the main perl executable image. It's contains the
+ Perl.Exe - the main Perl executable image. It's contains the
main() routine, plus code for any statically linked
extensions.
PerlShr_Attr.Opt - A linker options file which specifies psect attributes
matching those in PerlShr.Exe. It should be used when
linking images against PerlShr.Exe
- [.Lib]Config.pm - the perl extension which saves configuration information
- about perl and your system.
- [.lib]DynaLoader.pm - The perl extension which performs dynamic linking of
+ PerlShr_Bld.Opt - A linker options file which specifies various things
+ used to build PerlShr.Exe. It should be used when
+ rebuilding PerlShr.Exe via MakeMaker-produced
+ Descrip.MMS files for static extensions.
+ [.Lib]Config.pm - the Perl extension which saves configuration information
+ about Perl and your system.
+ [.lib]DynaLoader.pm - The Perl extension which performs dynamic linking of
shareable images for extensions.
There are, of course, a number of other files created for use during the build.
Once you've got the binaries built, you may wish to `build' the `tidy' or
`clean' targets to remove extra files.
-* Installing perl once it's built
+* Installing Perl once it's built
Once the build is complete, you'll need to do the following:
- Put PerlShr.Exe in a common directory, and make it world-readable.
If you place it in a location other than Sys$Share, you'll need to
define the logical name PerlShr to point to the image.
- Put Perl.Exe in a common directory, and make it world executable
- - Define a foreign command to invoke perl, using a statement like
+ - Define a foreign command to invoke Perl, using a statement like
$ Perl == "$dev:[dir]Perl.Exe"
- - Create a world-readable directory tree for perl library modules,
+ - Create a world-readable directory tree for Perl library modules,
scripts, and what-have-you, and define PERL_ROOT as a rooted logical
- name pointing to the top of this tree (i.e. if your perl files were
- going to live in DKA1:[Perl5...], then you should
- $ Define/Translation=Concealed Perl_Root DKA1:[Perl5.]
+ name pointing to the top of this tree (i.e. if your Perl files were
+ going to live in DKA1:[Util.Perl5...], then you should
+ $ Define/Translation=Concealed Perl_Root DKA1:[Util.Perl5.]
+ (Be careful to follow the rules for rooted logical names; in particular,
+ remember that a rooted logical name cannot have as its device portion
+ another rooted logical name - you've got to supply the actual device name
+ and directory path to the root directory.)
- Define the logical name PERLSHR as the full file specification of
PERLSHR.EXE, so executable images linked to it can find it. Alternatively,
you can justput PERLSHR.EXE int SYS$SHARE.
- Place the files from the [.lib] subdirectory in the distribution package
into a [.lib] subdirectory off the root directory described above.
- - Most of the perl5 documentation lives in the [.pod] subdirectory, and
+ - Most of the Perl documentation lives in the [.pod] subdirectory, and
is written in a simple markup format which can be easily read. In this
directory as well are pod2man and pod2html translators to reformat the
docs for common display engines; a pod2hlp translator is under development.
- Information on perl5 can also be gleaned from the files in the [.doc]
+ Information on Perl can also be gleaned from the files in the [.doc]
subdirectory (internals documents and summaries of changes), and from
the test scripts in the [.t...] subdirectories.
For now, that's it.
* For more information
-If you're interested in more information on perl in general, consult the Usenet
+If you're interested in more information on Perl in general, consult the Usenet
newsgroup comp.lang.perl. The FAQ for that group provides pointers to other
-online sources of information, as well as books describing perl in depth.
+online sources of information, as well as books describing Perl in depth.
-If you're interested in up-to-date information on perl5 development and
+If you're interested in up-to-date information on Perl development and
internals, you might want to subscribe to the perl5-porters mailing list. You
-can do this by sending a message to perl5-porters-request@isi.edu, containing
+can do this by sending a message to perl5-porters-request@nicoh.com, containing
the single line
subscribe perl5-porters Your Name Here
This is a moderately high-volume list at the moment (25-50 messages/day).
like to offer - you can send mail to bailey@genetics.upenn.edu or directly to
the VMSperl list at vmsperl@genetics.upenn.edu.
-Good luck using perl. Please let us know how it works for you - we can't
+Good luck using Perl. Please let us know how it works for you - we can't
guarantee that we'll be able to fix bugs quickly, but we'll try, and we'd
certainly like to know they're out there.
* Acknowledgements
There are, of course, far too many people involved in the porting and testing
-of perl5 to mention everyone who deserves it, so please forgive us if we've
+of Perl to mention everyone who deserves it, so please forgive us if we've
missed someone. That said, special thanks are due to the following:
+ Tim Adye <T.J.Adye@rl.ac.uk>
+ for the VMS emulations of getpw*()
David Denholm <denholm@conmat.phys.soton.ac.uk>
for extensive testing and provision of pipe and SocketShr code,
Mark Pizzolato <mark@infocomm.com>
Rich Salz <rsalz@bbn.com>
for readdir() and related routines
Denis Haskin <DWH@epub.ziff.com>
- for work on a pod-to-hlp translator for the perl5 documentation
+ for work on a pod-to-hlp translator for the Perl documentation
Richard Dyson <dyson@blaze.physics.uiowa.edu> and
Kent Covert <kacovert@miavx1.acs.muohio.edu>
for additional testing on the AXP.
-Modules needed
- X/Motif/Tk etc.
- Curses
-
Tie Modules
VecArray Implement array using vec()
SubstrArray Implement array using substr()
-i rename file only when successfully changed
All ARGV input should act like <>
Multiple levels of warning
- .= shouldn't complain about undefined under -w
report HANDLE [formats].
tie(FILEHANDLE, ...)
__DATA__
support in perlmain to rerun debugger
make 'r' print return value like gdb 'fini'
+ regression tests using __WARN__ and __DIE__ hooks
Possible pragmas
debugger
Populate %SIG at startup if appropriate
sub mysplice(@, $, $, ...)
data prettyprint function? (or is it, as I suspect, a lib routine?)
- Nested destructors
make tr/// return histogram in list context?
undef wantarray in void context
Loop control on do{} et al
autocroak?
Modifiable $1 et al
substr EXPR,OFFSET,LENGTH,STRING
- locally capture warnings into an array
+++ /dev/null
-?RCS: $Id: Extensions.U,v$
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: Extensions.U,v $
-?RCS:
-?MAKE:known_extensions extensions dynamic_ext static_ext useposix : \
- Myread usedl d_socket i_db i_dbm i_ndbm i_gdbm package test cat
-?MAKE: -pick add $@ %<
-?S:known_extensions:
-?S: This variable holds a list of all extensions included in
-?S: the package.
-?S:.
-?S:dynamic_ext:
-?S: This variable holds a list of extension files we want to
-?S: link dynamically into the package. It is used by Makefile.
-?S:.
-?S:static_ext:
-?S: This variable holds a list of extension files we want to
-?S: link statically into the package. It is used by Makefile.
-?S:.
-?S:extensions:
-?S: This variable holds a list of all extension files
-?S: linked into the package. It is propagated to Config.pm
-?S: and is typically used to test whether a particular extesion
-?S: is available.
-?S:.
-?S:useposix:
-?S: This variable holds either 'true' or 'false' to indicate
-?S: whether the POSIX extension should be used. The sole
-?S: use for this currently is to allow an easy mechanism
-?S: for hints files to indicate that POSIX will not compile
-?S: on a particular system.
-?S:.
-?T:xxx yyy avail_ext
-?INIT:: set useposix=false in your hint file to disable the POSIX extension.
-?INIT:useposix=true
-echo " "
-echo "Looking for extensions..." >&4
-cd ../ext
-: If we are using the old config.sh, known_extensions may contain
-: old or inaccurate or duplicate values.
-known_extensions=''
-: We do not use find because it might not be available.
-: We do not just use MANIFEST because the user may have dropped
-: some additional extensions into the source tree and expect them
-: to be built.
-for xxx in * ; do
- if $test -f $xxx/$xxx.xs; then
- known_extensions="$known_extensions $xxx"
- else
- if $test -d $xxx; then
- cd $xxx
- for yyy in * ; do
- if $test -f $yyy/$yyy.xs; then
- known_extensions="$known_extensions $xxx/$yyy"
- fi
- done
- cd ..
- fi
- fi
-done
-set X $known_extensions
-shift
-known_extensions="$*"
-cd ../UU
-
-: Now see which are supported on this system.
-avail_ext=''
-for xxx in $known_extensions ; do
- case "$xxx" in
- DB_File) case "$i_db" in
- $define) avail_ext="$avail_ext $xxx" ;;
- esac
- ;;
- GDBM_File) case "$i_gdbm" in
- $define) avail_ext="$avail_ext $xxx" ;;
- esac
- ;;
- NDBM_File) case "$i_ndbm" in
- $define) avail_ext="$avail_ext $xxx" ;;
- esac
- ;;
- ODBM_File) case "$i_dbm" in
- $define) avail_ext="$avail_ext $xxx" ;;
- esac
- ;;
- POSIX) case "$useposix" in
- true|define|y) avail_ext="$avail_ext $xxx" ;;
- esac
- ;;
- Socket) case "$d_socket" in
- $define) avail_ext="$avail_ext $xxx" ;;
- esac
- ;;
- *) avail_ext="$avail_ext $xxx"
- ;;
- esac
-done
-
-set X $avail_ext
-shift
-avail_ext="$*"
-
-case $usedl in
-$define)
- $cat <<EOM
-A number of extensions are supplied with $package. You may choose to
-compile these extensions for dynamic loading (the default), compile
-them into the $package executable (static loading), or not include
-them at all. Answer "none" to include no extensions.
-
-EOM
- case "$dynamic_ext" in
- ''|' ') dflt="$avail_ext" ;;
- *) dflt="$dynamic_ext" ;;
- esac
- case "$dflt" in
- '') dflt=none;;
- esac
- rp="What extensions do you wish to load dynamically?"
- . ./myread
- case "$ans" in
- none) dynamic_ext='' ;;
- *) dynamic_ext="$ans" ;;
- esac
-
- case "$static_ext" in
- ''|' ')
- : Exclude those already listed in dynamic linking
- dflt=''
- for xxx in $avail_ext; do
- case " $dynamic_ext " in
- *" $xxx "*) ;;
- *) dflt="$dflt $xxx" ;;
- esac
- done
- set X $dflt
- shift
- dflt="$*"
- ;;
- *) dflt="$static_ext"
- ;;
- esac
-
- case "$dflt" in
- '') dflt=none;;
- esac
- rp="What extensions do you wish to load statically?"
- . ./myread
- case "$ans" in
- none) static_ext='' ;;
- *) static_ext="$ans" ;;
- esac
- ;;
-*)
- $cat <<EOM
-A number of extensions are supplied with $package. Answer "none"
-to include no extensions.
-
-EOM
- case "$static_ext" in
- ''|' ') dflt="$avail_ext" ;;
- *) dflt="$static_ext" ;;
- esac
-
- case "$dflt" in
- '') dflt=none;;
- esac
- rp="What extensions do you wish to include?"
- . ./myread
- case "$ans" in
- none) static_ext='' ;;
- *) static_ext="$ans" ;;
- esac
- ;;
-esac
-
-set X $dynamic_ext $static_ext
-shift
-extensions="$*"
-
+++ /dev/null
-?RCS: $Id: Extract.U,v 3.0.1.1 1994/10/29 15:51:46 ram Exp $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: This private version for perl5 will also extract files from
-?RCS: extension MANIFEST. (ext/Blah/MANIFEST).
-?RCS:
-?RCS: $Log: Extract.U,v $
-?RCS: Revision 3.0.1.1 1994/10/29 15:51:46 ram
-?RCS: patch36: added ?F: line for metalint file checking
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:04:52 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?X:
-?X: This unit produces a shell script which can be doted in order to extract
-?X: .SH files with variable substitutions.
-?X:
-?MAKE:Extract: Nothing
-?MAKE: -pick add $@ %<
-?F:./extract !config_h.SH
-?T:CONFIG dir file shlist xxx
-: script used to extract .SH files with variable substitutions
-cat >extract <<'EOS'
-CONFIG=true
-echo "Doing variable substitutions on .SH files..."
-if test -f MANIFEST; then
- shlist=`awk '{print $1}' <MANIFEST | grep '\.SH'`
- : Pick up possible extension manifests.
- for dir in ext/* ; do
- if test -f $dir/MANIFEST; then
- xxx=`awk '{print $1}' < $dir/MANIFEST |
- sed -n "/\.SH$/ s@^@$dir/@p"`
- shlist="$shlist $xxx"
- fi
- done
- set x $shlist
-else
- echo "(Looking for .SH files under the current directory.)"
- set x `find . -name "*.SH" -print`
-fi
-shift
-case $# in
-0) set x *.SH; shift;;
-esac
-if test ! -f $1; then
- shift
-fi
-for file in $*; do
- case "$file" in
- */*)
- dir=`expr X$file : 'X\(.*\)/'`
- file=`expr X$file : 'X.*/\(.*\)'`
- (cd $dir && . ./$file)
- ;;
- *)
- . ./$file
- ;;
- esac
-done
-if test -f config_h.SH; then
- if test ! -f config.h; then
- : oops, they left it out of MANIFEST, probably, so do it anyway.
- . ./config_h.SH
- fi
-fi
-EOS
-
+++ /dev/null
-?RCS: $Id: Guess.U,v 3.0.1.4 1994/10/29 15:53:55 ram Exp $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: Guess.U,v $
-?RCS: Revision 3.0.1.4 1994/10/29 15:53:55 ram
-?RCS: patch36: added ?F: line for metalint file checking
-?RCS: patch36: call ./xenix explicitely instead of relying on PATH
-?RCS:
-?RCS: Revision 3.0.1.3 1993/12/15 08:14:35 ram
-?RCS: patch15: variable d_bsd was not always set properly
-?RCS:
-?RCS: Revision 3.0.1.2 1993/08/30 08:57:14 ram
-?RCS: patch8: fixed comment which wrongly attributed the usrinc symbol
-?RCS: patch8: no more ugly messages when no /usr/include/ctype.h
-?RCS:
-?RCS: Revision 3.0.1.1 1993/08/27 14:37:37 ram
-?RCS: patch7: added support for OSF/1 machines
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:04:57 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?X:
-?X: This unit hazards some guesses as to what the general nature of the system
-?X: is. The information it collects here is used primarily to establish default
-?X: answers to other questions.
-?X:
-?MAKE:Guess d_eunice d_xenix d_bsd: cat test echo n c contains rm Loc eunicefix
-?MAKE: -pick add $@ %<
-?S:d_eunice:
-?S: This variable conditionally defines the symbols EUNICE and VAX, which
-?S: alerts the C program that it must deal with ideosyncracies of VMS.
-?S:.
-?S:d_xenix:
-?S: This variable conditionally defines the symbol XENIX, which alerts
-?S: the C program that it runs under Xenix.
-?S:.
-?S:d_bsd:
-?S: This symbol conditionally defines the symbol BSD when running on a
-?S: BSD system.
-?S:.
-?C:EUNICE:
-?C: This symbol, if defined, indicates that the program is being compiled
-?C: under the EUNICE package under VMS. The program will need to handle
-?C: things like files that don't go away the first time you unlink them,
-?C: due to version numbering. It will also need to compensate for lack
-?C: of a respectable link() command.
-?C:.
-?C:VMS:
-?C: This symbol, if defined, indicates that the program is running under
-?C: VMS. It is currently only set in conjunction with the EUNICE symbol.
-?C:.
-?C:XENIX:
-?C: This symbol, if defined, indicates thet the program is running under
-?C: Xenix (at least 3.0 ?).
-?C:.
-?X:We don't use BSD in the perl source. It's too vague, and already
-?X:defined in some header files anyway (e.g. NetBSD).
-?X:?C:BSD:
-?X:?C: This symbol, if defined, indicates that the program is running under
-?X:?C: a BSD system.
-?X:?C:.
-?H:#$d_eunice EUNICE /**/
-?H:#$d_eunice VMS /**/
-?H:#$d_xenix XENIX /**/
-?X:?H:#$d_bsd BSD /**/
-?H:.
-?F:./bsd ./usg ./v7 ./osf1 ./eunice ./xenix ./venix
-?T:xxx
-: make some quick guesses about what we are up against
-echo " "
-$echo $n "Hmm... $c"
-echo exit 1 >bsd
-echo exit 1 >usg
-echo exit 1 >v7
-echo exit 1 >osf1
-echo exit 1 >eunice
-echo exit 1 >xenix
-echo exit 1 >venix
-d_bsd="$undef"
-?X:
-?X: Do not use 'usrinc', or we get a circular dependency. because
-?X: usrinc is defined in usrinc.U, which relies on us...
-?X:
-$cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
-if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
-then
- echo "Looks kind of like an OSF/1 system, but we'll see..."
- echo exit 0 >osf1
-elif test `echo abc | tr a-z A-Z` = Abc ; then
- xxx=`./loc addbib blurfl $pth`
- if $test -f $xxx; then
- echo "Looks kind of like a USG system with BSD features, but we'll see..."
- echo exit 0 >bsd
- echo exit 0 >usg
- else
- if $contains SIGTSTP foo >/dev/null 2>&1 ; then
- echo "Looks kind of like an extended USG system, but we'll see..."
- else
- echo "Looks kind of like a USG system, but we'll see..."
- fi
- echo exit 0 >usg
- fi
-elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
- echo "Looks kind of like a BSD system, but we'll see..."
- d_bsd="$define"
- echo exit 0 >bsd
-else
- echo "Looks kind of like a Version 7 system, but we'll see..."
- echo exit 0 >v7
-fi
-case "$eunicefix" in
-*unixtovms*)
- $cat <<'EOI'
-There is, however, a strange, musty smell in the air that reminds me of
-something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
-EOI
- echo exit 0 >eunice
- d_eunice="$define"
-: it so happens the Eunice I know will not run shell scripts in Unix format
- ;;
-*)
- echo " "
- echo "Congratulations. You aren't running Eunice."
- d_eunice="$undef"
- ;;
-esac
-if test -f /xenix; then
- echo "Actually, this looks more like a XENIX system..."
- echo exit 0 >xenix
- d_xenix="$define"
-else
- echo " "
- echo "It's not Xenix..."
- d_xenix="$undef"
-fi
-chmod +x xenix
-$eunicefix xenix
-if test -f /venix; then
- echo "Actually, this looks more like a VENIX system..."
- echo exit 0 >venix
-else
- echo " "
- if ./xenix; then
- : null
- else
- echo "Nor is it Venix..."
- fi
-fi
-chmod +x bsd usg v7 osf1 eunice xenix venix
-$eunicefix bsd usg v7 osf1 eunice xenix venix
-$rm -f foo
-
+++ /dev/null
-?RCS: $Id: Loc_sed.U,v $
-?RCS:
-?X: This is used in perl.c.
-?MAKE:full_sed: sed
-?MAKE: -pick add $@ %<
-?S:full_sed:
-?S: This variable contains the full pathname to 'sed', whether or
-?S: not the user has specified 'portability'. This is only used
-?S: in the compiled C program, and we assume that all systems which
-?S: can share this executable will have the same full pathname to
-?S: 'sed.'
-?S:.
-?X: Yes, I know about the C symbol PORTABLE, but I think sed
-?X: is unlikely to move, and I'm too lazy to add all the
-?X: #ifdef PORTABLE sections to the perl source.
-?X:
-?C:LOC_SED:
-?C: This symbol holds the complete pathname to the sed program.
-?C:.
-?H:#define LOC_SED "$full_sed" /**/
-?H:.
-?LINT:use sed
-?LINT:extern sed
-: Store the full pathname to the sed program for use in the C program
-full_sed=$sed
-
+++ /dev/null
-?RCS: $Id: Myinit.U,v 3.0 1993/08/18 12:05:07 ram Exp $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: Myinit.U,v $
-?RCS: Revision 3.0 1993/08/18 12:05:07 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?X:
-?X: If you want to initialize any default values, copy this unit to your
-?X: personal U directory and add the assignments to the end. This file
-?X: is included after variables are initialized but before any old
-?X: config.sh file is read in.
-?X:
-?MAKE:Myinit libswanted : Init
-?MAKE: -pick add $@ %<
-?S:libswanted:
-?S: This variable holds a list of all the libraries we want to
-?S: search. The order is chosen to pick up the c library
-?S: ahead of ucb or bsd libraries for SVR4.
-?S:.
-?LINT:extern usevfork glibpth d_portable
-?LINT:change usevfork glibpth d_portable
-: List of libraries we want.
-?X: Put crypt here, even though I should really fix d_crypt.U to look
-?X: for it correctly, including possible shared library versions.
-libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl'
-libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt"
-libswanted="$libswanted ucb bsd BSD PW x"
-: We probably want to search /usr/shlib before most other libraries.
-: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
-glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
-glibpth="/usr/shlib $glibpth"
-: Do not use vfork unless overridden by a hint file.
-usevfork=false
-: We might as well always be portable. It makes no difference for
-: perl5, and makes people happy.
-d_portable=define
-
+++ /dev/null
-?X: These units are based on the ones supplied with dist-3.0.
-?X: They have been changed or enhanced to work with perl.
-?X: I would appreciate hearing about any changes, corrections,
-?X: or enhancements.
-?X: Andy Dougherty doughera@lafcol.lafayette.edu
-?X: Dept. of Physics
-?X: Lafayette College
-?X: Easton, PA 18042-1782
-?X: Wed Nov 9 15:34:15 EST 1994
+++ /dev/null
-?RCS: $Id: ccflags.U,v 3.0.1.6 1994/10/29 16:07:02 ram Exp $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: This is the same as dist's ccflags unit except that perl uses
-?RCS: -DDEBUGGING rather than -DDEBUG, and I also suggest a few other
-?RCS: flags the user might set, such as -DCRIPPLED_CC and -D_POSIX_SOURCE.
-?RCS:
-?RCS: $Log: ccflags.U,v $
-?RCS: Revision 3.0.1.6 1994/10/29 16:07:02 ram
-?RCS: patch36: gcc versionning no longer relies on the C compiler's name
-?RCS: patch36: simplified check for gcc version checking (ADO)
-?RCS:
-?RCS: Revision 3.0.1.5 1994/08/29 16:06:35 ram
-?RCS: patch32: propagate -posix flag from ccflags to ldflags
-?RCS:
-?RCS: Revision 3.0.1.4 1994/05/06 14:28:45 ram
-?RCS: patch23: -fpcc-struct-return only needed in gcc 1.x (ADO)
-?RCS: patch23: cppflags now computed on an option-by-option basis
-?RCS: patch23: magically added cc flags now only done the first time
-?RCS:
-?RCS: Revision 3.0.1.3 1993/09/13 15:58:29 ram
-?RCS: patch10: explicitely mention -DDEBUG just in case they need it (WAD)
-?RCS: patch10: removed all the "tans" variable usage (WAD)
-?RCS:
-?RCS: Revision 3.0.1.2 1993/08/27 14:39:38 ram
-?RCS: patch7: added support for OSF/1 machines
-?RCS:
-?RCS: Revision 3.0.1.1 1993/08/25 14:00:24 ram
-?RCS: patch6: added defaults for cppflags, ccflags and ldflags
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:05:31 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:ccflags ldflags lkflags cppflags optimize: test cat Myread Guess \
- Oldconfig +gccversion mips_type +usrinc package contains rm \
- cppstdin cppminus cpprun cpplast
-?MAKE: -pick add $@ %<
-?S:ccflags:
-?S: This variable contains any additional C compiler flags desired by
-?S: the user. It is up to the Makefile to use this.
-?S:.
-?S:cppflags:
-?S: This variable holds the flags that will be passed to the C pre-
-?S: processor. It is up to the Makefile to use it.
-?S:.
-?S:optimize:
-?S: This variable contains any optimizer/debugger flag that should be used.
-?S: It is up to the Makefile to use it.
-?S:.
-?S:ldflags:
-?S: This variable contains any additional C loader flags desired by
-?S: the user. It is up to the Makefile to use this.
-?S:.
-?S:lkflags:
-?S: This variable contains any additional C partial linker flags desired by
-?S: the user. It is up to the Makefile to use this.
-?S:.
-?T:inctest thisincl xxx flag inclwanted ftry previous
-?D:cppflags=''
-?D:ccflags=''
-?D:ldflags=''
-?INIT:: no include file wanted by default
-?INIT:inclwanted=''
-?INIT:
-: determine optimize, if desired, or use for debug flag also
-case "$optimize" in
-' ') dflt='none';;
-'') dflt='-O';;
-*) dflt="$optimize";;
-esac
-$cat <<EOH
-
-Some C compilers have problems with their optimizers, by default, $package
-compiles with the -O flag to use the optimizer. Alternately, you might want
-to use the symbolic debugger, which uses the -g flag (on traditional Unix
-systems). Either flag can be specified here. To use neither flag, specify
-the word "none".
-
-EOH
-rp="What optimizer/debugger flag should be used?"
-. ./myread
-optimize="$ans"
-case "$optimize" in
-'none') optimize=" ";;
-esac
-
-dflt=''
-case "$ccflags" in
-'')
- case "$gccversion" in
- 1*) dflt='-fpcc-struct-return' ;;
- esac
- case "$optimize" in
- *-g*) dflt="$dflt -DDEBUGGING";;
- esac
-?X: check for POSIXized ISC
- case "$gccversion" in
- 2*) if test -d /etc/conf/kconfig.d &&
- $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
- then
- dflt="$dflt -posix"
- fi
- ;;
- esac
- ;;
-esac
-
-?X: In USG mode, a MIPS system may need some BSD includes
-case "$mips_type" in
-*BSD*) ;;
-'') ;;
-*) inclwanted="$inclwanted $usrinc/bsd";;
-esac
-for thisincl in $inclwanted; do
- if $test -d $thisincl; then
- if $test x$thisincl != x$usrinc; then
- case "$dflt" in
- *$thisincl*);;
- *) dflt="$dflt -I$thisincl";;
- esac
- fi
- fi
-done
-
-?X: Include test function (header, symbol)
-inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
- xxx=true;
-elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
- xxx=true;
-else
- xxx=false;
-fi;
-if $xxx; then
- case "$dflt" in
- *$2*);;
- *) dflt="$dflt -D$2";;
- esac;
-fi'
-
-?X:
-?X: SCO unix uses NO_PROTOTYPE instead of _NO_PROTO
-?X: OSF/1 uses __LANGUAGE_C__ instead of LANGUAGE_C
-?X:
-if ./osf1; then
- set signal.h __LANGUAGE_C__; eval $inctest
-else
- set signal.h LANGUAGE_C; eval $inctest
-fi
-set signal.h NO_PROTOTYPE; eval $inctest
-set signal.h _NO_PROTO; eval $inctest
-
-case "$dflt" in
-'') dflt=none;;
-esac
-case "$ccflags" in
-'') ;;
-*) dflt="$ccflags";;
-esac
-$cat <<EOH
-
-Your C compiler may want other flags. For this question you should include
--I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
-but you should NOT include libraries or ld flags like -lwhatever. If you
-want $package to honor its debug switch, you should include -DDEBUGGING here.
-Your C compiler might also need additional flags, such as -D_POSIX_SOURCE,
--DHIDEMYMALLOC or -DCRIPPLED_CC.
-
-To use no flags, specify the word "none".
-
-EOH
-?X: strip leading space
-set X $dflt
-shift
-dflt=${1+"$@"}
-rp="Any additional cc flags?"
-. ./myread
-case "$ans" in
-none) ccflags='';;
-*) ccflags="$ans";;
-esac
-
-: the following weeds options from ccflags that are of no interest to cpp
-cppflags="$ccflags"
-case "$gccversion" in
-1*) cppflags="$cppflags -D__GNUC__"
-esac
-case "$mips_type" in
-'');;
-*BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
-esac
-case "$cppflags" in
-'');;
-*)
- echo " "
- echo "Let me guess what the preprocessor flags are..." >&4
- set X $cppflags
- shift
- cppflags=''
- $cat >cpp.c <<'EOM'
-#define BLURFL foo
-
-BLURFL xx LFRULB
-EOM
-?X:
-?X: For each cc flag, try it out with both cppstdin and cpprun, since the
-?X: first is almost surely a cc wrapper. We have to try both in case
-?X: of cc flags like '-Olimit 2900' that are actually two words...
-?X:
- previous=''
- for flag in $*
- do
- case "$flag" in
- -*) ftry="$flag";;
- *) ftry="$previous $flag";;
- esac
- if $cppstdin -DLFRULB=bar $ftry $cppminus <cpp.c \
- >cpp1.out 2>/dev/null && \
- $cpprun -DLFRULB=bar $ftry $cpplast <cpp.c \
- >cpp2.out 2>/dev/null && \
- $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
- $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
- then
- cppflags="$cppflags $ftry"
- previous=''
- else
- previous="$flag"
- fi
- done
- set X $cppflags
- shift
- cppflags=${1+"$@"}
- case "$cppflags" in
- *-*) echo "They appear to be: $cppflags";;
- esac
- $rm -f cpp.c cpp?.out
- ;;
-esac
-
-: flags used in final linking phase
-case "$ldflags" in
-'') if ./venix; then
- dflt='-i -z'
- else
- dflt=''
- fi
- case "$ccflags" in
- *-posix*) dflt="$dflt -posix" ;;
- esac
- case "$dflt" in
- '') dflt='none' ;;
- esac
- ;;
-*) dflt="$ldflags";;
-esac
-echo " "
-rp="Any additional ld flags (NOT including libraries)?"
-. ./myread
-case "$ans" in
-none) ldflags='';;
-*) ldflags="$ans";;
-esac
-rmlist="$rmlist pdp11"
-
-@if lkflags
-: partial linking may need other flags
-case "$lkflags" in
-'') case "$ldflags" in
- '') dflt='none';;
- *) dflt="$ldflags";;
- esac;;
-*) dflt="$lkflags";;
-esac
-echo " "
-rp="Partial linking flags to be used (NOT including -r)?"
-. ./myread
-case "$ans" in
-none) lkflags='';;
-*) lkflags="$ans";;
-esac
-
-@end
+++ /dev/null
-?RCS: $Id: d_byacc.U $
-?RCS:
-?RCS: $Log: d_byacc.U,v $
-?RCS:
-?MAKE:d_byacc: byacc Setvar
-?MAKE: -pick add $@ %<
-?LINT:extern byacc
-?S:d_byacc:
-?S: This variable indicates whether byacc is available.
-?S: If the user has specified 'portability', then Makefile.SH
-?S: sees $byacc='byacc' whether or not the user actually has
-?S: byacc. This variable allows us to determine in a makefile
-?S: if we really have byacc.
-?S:.
-?X: We want byacc for perl because the perly.fixer script assumes it.
-?X: We need to patch up yacc-generated parsers to allow dynamic
-?X: allocation of the stack.
-?LINT:set d_byacc
-: Check if we really have byacc
-case "$byacc" in
-''|'byacc') val="$undef" ;;
-*) val="$define" ;;
-esac
-set d_byacc
-eval $setvar
-
+++ /dev/null
-?RCS: $Id: d_csh.U,v 3.0 1993/08/18 12:05:53 ram Exp $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: d_csh.U,v $
-?RCS: Revision 3.0 1993/08/18 12:05:53 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:d_csh full_csh: csh Setvar
-?MAKE: -pick add $@ %<
-?LINT:extern csh
-?S:d_csh:
-?S: This variable conditionally defines the CSH symbol, which
-?S: indicates to the C program that the C-shell exists.
-?S:.
-?S:full_csh:
-?S: This variable contains the full pathname to 'csh', whether or
-?S: not the user has specified 'portability'. This is only used
-?S: in the compiled C program, and we assume that all systems whic
-?S: can share this executable will have the same full pathname to
-?S: 'csh.'
-?S:.
-?X: Yes, I know about the C symbol PORTABLE, but I think csh
-?X: is unlikely to move, and I'm too lazy to add all the
-?X: #ifdef PORTABLE sections to the perl source.
-?X:
-?C:CSH:
-?C: This symbol, if defined, indicates that the C-shell exists.
-?C: If defined, contains the full pathname of csh.
-?C:.
-?H:#$d_csh CSH "$full_csh" /**/
-?H:.
-?LINT:set d_csh
-: get csh whereabouts
-case "$csh" in
-'csh') val="$undef" ;;
-*) val="$define" ;;
-esac
-set d_csh
-eval $setvar
-full_csh=$csh
-
+++ /dev/null
-?RCS: $Id: d_dlsymun.U,v $
-?RCS:
-?RCS: $Log: d_dlsymun.U,v $
-?RCS:
-?MAKE:d_dlsymun: cat cc ccflags ldflags rm Setvar dlsrc i_dlfcn \
- cccdlflags ccdlflags lddlflags libs dlext
-?MAKE: -pick add $@ %<
-?X: This is specific to perl5.
-?S:d_dlsymun:
-?S: This variable conditionally defines DLSYM_NEEDS_UNDERSCORE, which
-?S: indicates that we need to prepend an underscore to the symbol
-?S: name before calling dlsym().
-?S:.
-?C:DLSYM_NEEDS_UNDERSCORE:
-?C: This symbol, if defined, indicates that we need to prepend an
-?C: underscore to the symbol name before calling dlsym(). This only
-?C: makes sense if you *have* dlsym, which we will presume is the
-?C: case if you're using dl_dlopen.xs.
-?C:.
-?H:#$d_dlsymun DLSYM_NEEDS_UNDERSCORE /* */
-?H:.
-?F: !fred
-?LINT:set d_dlsymun
-?T: xxx
-: Check if dlsym need a leading underscore
-echo " "
-val="$undef"
-
-case "$dlsrc" in
-dl_dlopen.xs)
- echo "Checking whether your dlsym() needs a leading underscore ..." >&4
- $cat >dyna.c <<'EOM'
-fred () { }
-EOM
-
-$cat >fred.c<<EOM
-
-#include <stdio.h>
-#$i_dlfcn I_DLFCN
-#ifdef I_DLFCN
-#include <dlfcn.h> /* the dynamic linker include file for Sunos/Solaris */
-#else
-#include <sys/types.h>
-#include <nlist.h>
-#include <link.h>
-#endif
-
-extern int fred() ;
-
-main()
-{
- void * handle ;
- void * symbol ;
-#ifndef RTLD_LAZY
- int mode = 1 ;
-#else
- int mode = RTLD_LAZY ;
-#endif
- handle = dlopen("./dyna.$dlext", mode) ;
- if (handle == NULL) {
- printf ("1\n") ;
- exit(0);
- }
- symbol = dlsym(handle, "fred") ;
- if (symbol == NULL) {
- /* try putting a leading underscore */
- symbol = dlsym(handle, "_fred") ;
- if (symbol == NULL) {
- printf ("2\n") ;
- exit(0);
- }
- printf ("3\n") ;
- }
- else
- printf ("4\n") ;
- exit(0);
-}
-EOM
- if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
- ld $lddlflags -o dyna.$dlext dyna.o > /dev/null 2>&1 &&
- $cc $ccflags $ldflags $cccdlflags $ccdlflags fred.c -o fred $libs > /dev/null 2>&1; then
- xxx=`./fred`
- case $xxx in
- 1) echo "Test program failed using dlopen." >&4
- echo "Perhaps you should not use dynamic loading." >&4;;
- 2) echo "Test program failed using dlsym." >&4
- echo "Perhaps you should not use dynamic loading." >&4;;
- 3) echo "dlsym needs a leading underscore" >&4
- val="$define" ;;
- 4) echo "dlsym doesn't need a leading underscore." >&4;;
- esac
- else
- echo "I can't compile and run the test program." >&4
- fi
- ;;
-esac
-
-$rm -f fred fred.? dyna.$dlext dyna.?
-
-set d_dlsymun
-eval $setvar
-
+++ /dev/null
-?X: Deliberately empty file to fool metaconfig. I don't want
-?X: the standard d_group since it's useless. (I wrote it, so I know :-).
-?X:?RCS: $Id: d_group.U,v 3.0.1.1 1994/08/29 16:07:48 ram Exp $
+++ /dev/null
-?X: Deliberately empty file to fool metaconfig. I don't want
-?X: the standard d_passwd since it's useless. (I wrote it, so I know :-).
-?X:?RCS: $Id: d_passwd.U,v 3.0.1.1 1994/08/29 16:09:51 ram Exp $
+++ /dev/null
-This file contains patches to dist 3 (PL 51) that I used to generate
-Configure for perl.
-
-These patches do the following:
-
-Oldconfig.U
- Clean up and extend the $osvers detection for DEC OSF/1 on the Alpha.
- Add MachTen detection (requires adding awk to ?MAKE line).
-archname.U
- Protect against spaces in the output of uname -m.
-Inhdr.U
- Delete tabs that caused /bin/sh to core dump on Mach Ten 2.1.1.
-libc.U
- Pick up Linux nm output with leading __IO.
-sig_name.U
- Look in <linux/signals.h> too.
-usrinc.U
- Ensure that the ./mips file exists. libpth.U calls it.
-
- Andy Dougherty doughera@lafcol.lafayette.edu
- Dept. of Physics
- Lafayette College, Easton, PA 18042 USA
-
-Index: Inhdr.U
-Prereq: 3.0.1.1
-*** mcon/U/Inhdr.U Sat Oct 29 15:28:15 1994
---- /home2/doughera/lib/dist/U/Inhdr.U Wed Mar 8 15:52:13 1995
-***************
-*** 52,61 ****
- var=$2; eval "was=\$$2";
- if $test "$xxx" && $test -r "$xxx";
- then eval $xxf;
-! eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
- cont="";
- else eval $xxnf;
-! eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
- set $yyy; shift; shift; yyy=$@;
- case $# in 0) cont="";;
- 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
---- 52,65 ----
- var=$2; eval "was=\$$2";
- if $test "$xxx" && $test -r "$xxx";
- then eval $xxf;
-! ?X: This line deliberately shifted left 1 tabstop to avoid /bin/sh core dump
-! ?X: on MachTen 2.1.1. --AD March 8, 1995
-! eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
- cont="";
- else eval $xxnf;
-! ?X: This line deliberately shifted left 1 tabstop to avoid /bin/sh core dump
-! ?X: on MachTen 2.1.1. --AD March 8, 1995
-! eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
- set $yyy; shift; shift; yyy=$@;
- case $# in 0) cont="";;
- 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
-Index: Oldconfig.U
-Prereq: 3.0.1.7
-*** mcon/U/Oldconfig.U Thu Feb 16 09:52:38 1995
---- /home2/doughera/lib/dist/U/Oldconfig.U Fri Mar 10 09:43:30 1995
-***************
-*** 45,51 ****
- ?X: for the sake of setting defaults.
- ?X:
- ?MAKE:Oldconfig hint myuname osname osvers: Instruct Myread uname \
-! sed test cat rm lns n c contains Loc Options Tr
- ?MAKE: -pick wipe $@ %<
- ?S:myuname:
- ?S: The output of 'uname -a' if available, otherwise the hostname. On Xenix,
---- 45,51 ----
- ?X: for the sake of setting defaults.
- ?X:
- ?MAKE:Oldconfig hint myuname osname osvers: Instruct Myread uname \
-! awk sed test cat rm lns n c contains Loc Options Tr
- ?MAKE: -pick wipe $@ %<
- ?S:myuname:
- ?S: The output of 'uname -a' if available, otherwise the hostname. On Xenix,
-***************
-*** 150,155 ****
---- 150,158 ----
- $test -d /usr/apollo/bin && osname=apollo
- $test -f /etc/saf/_sactab && osname=svr4
- $test -d /usr/include/minix && osname=minix
-+ $test -d /MachTen && osname=machten && \
-+ osvers=`/usr/etc/version | $awk '{print $2}' | \
-+ $sed -e 's/[A-Za-z]$//'`
- ?X: If we have uname, we already computed a suitable uname -a output, correctly
- ?X: formatted for Xenix, and it lies in $myuname.
- if $test -f $uname; then
-***************
-*** 264,275 ****
- osvers="$3"
- ;;
- osf1) case "$5" in
-! alpha) osname=dec_osf
-! case "$3" in
-! [vt]1\.*) osvers=1 ;;
-! [vt]2\.*) osvers=2 ;;
-! [vt]3\.*) osvers=3 ;;
-! esac
- ;;
- hp*) osname=hp_osf1 ;;
- mips) osname=mips_osf1 ;;
---- 267,277 ----
- osvers="$3"
- ;;
- osf1) case "$5" in
-! alpha)
-! ?X: DEC OSF/1 myuname -a output looks like: osf1 xxxx t3.2 123.4 alpha
-! ?X: where the version number can be either vn.n or tn.n.
-! osname=dec_osf
-! osvers=`echo "$3" | sed 's/^[vt]//'`
- ;;
- hp*) osname=hp_osf1 ;;
- mips) osname=mips_osf1 ;;
-Index: archname.U
-Prereq: 3.0.1.1
-*** mcon/U/archname.U Thu Feb 16 09:52:31 1995
---- /home2/doughera/lib/dist/U/archname.U Mon Feb 27 15:24:22 1995
-***************
-*** 12,18 ****
- ?RCS: Revision 3.0.1.1 1995/02/15 14:14:21 ram
- ?RCS: patch51: created
- ?RCS:
-! ?MAKE:archname myarchname: cat Loc Myread Oldconfig osname test rm
- ?MAKE: -pick add $@ %<
- ?S:archname:
- ?S: This variable is a short name to characterize the current
---- 12,18 ----
- ?RCS: Revision 3.0.1.1 1995/02/15 14:14:21 ram
- ?RCS: patch51: created
- ?RCS:
-! ?MAKE:archname myarchname: sed Loc Myread Oldconfig osname test rm
- ?MAKE: -pick add $@ %<
- ?S:archname:
- ?S: This variable is a short name to characterize the current
-***************
-*** 43,49 ****
- tarch=`arch`"-$osname"
- elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
- if uname -m > tmparch 2>&1 ; then
-! tarch=`$cat tmparch`"-$osname"
- else
- tarch="$osname"
- fi
---- 43,49 ----
- tarch=`arch`"-$osname"
- elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
- if uname -m > tmparch 2>&1 ; then
-! tarch=`$sed -e 's/ /_/g' -e 's/$/'"-$osname/" tmparch`
- else
- tarch="$osname"
- fi
-Index: libc.U
-Prereq: 3.0.1.7
-*** mcon/U/libc.U Sat Oct 29 15:28:06 1994
---- /home2/doughera/lib/dist/U/libc.U Mon Mar 6 10:34:07 1995
-***************
-*** 218,224 ****
- xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
- xrun='eval "<libc.tmp $com >libc.list"; echo "done" >&4'
- ?X: BSD-like output, I-type for Linux
-! if com="$sed -n -e 's/^.* [ADTSI] *_[_.]*//p' -e 's/^.* [ADTSI] //p'";\
- eval $xscan;\
- $contains '^fprintf$' libc.list >/dev/null 2>&1; then
- eval $xrun
---- 218,225 ----
- xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
- xrun='eval "<libc.tmp $com >libc.list"; echo "done" >&4'
- ?X: BSD-like output, I-type for Linux
-! ?X: Some versions of Linux include a leading __IO in the symbol name.
-! if com="$sed -n -e 's/__IO//' -e 's/^.* [ADTSI] *_[_.]*//p' -e 's/^.* [ADTSI] //p'";\
- eval $xscan;\
- $contains '^fprintf$' libc.list >/dev/null 2>&1; then
- eval $xrun
-***************
-*** 263,269 ****
- eval $xrun
- else
- nm -p $* 2>/dev/null >libc.tmp
-! com="$sed -n -e 's/^.* [ADTS] *_[_.]*//p' -e 's/^.* [ADTS] //p'";\
- eval "<libc.tmp $com >libc.list"
- if $contains '^fprintf$' libc.list >/dev/null 2>&1; then
- nm_opt='-p'
---- 264,270 ----
- eval $xrun
- else
- nm -p $* 2>/dev/null >libc.tmp
-! com="$sed -n -e 's/^.* [ADTSI] *_[_.]*//p' -e 's/^.* [ADTSI] //p'";\
- eval "<libc.tmp $com >libc.list"
- if $contains '^fprintf$' libc.list >/dev/null 2>&1; then
- nm_opt='-p'
-Index: sig_name.U
-Prereq: 3.0.1.2
-*** mcon/U/sig_name.U Wed Jun 22 01:20:22 1994
---- /home2/doughera/lib/dist/U/sig_name.U Mon Feb 27 14:54:05 1995
-***************
-*** 40,46 ****
- case "$sig_name" in
- '')
- echo "Generating a list of signal names..." >&4
-! xxx=`./findhdr signal.h`" "`./findhdr sys/signal.h`
- set X `cat $xxx 2>&1 | $awk '
- $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
- sig[$3] = substr($2,4,20)
---- 40,46 ----
- case "$sig_name" in
- '')
- echo "Generating a list of signal names..." >&4
-! xxx=`./findhdr signal.h`" "`./findhdr sys/signal.h`" "`./findhdr linux/signal.h`
- set X `cat $xxx 2>&1 | $awk '
- $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
- sig[$3] = substr($2,4,20)
-Index: usrinc.U
-Prereq: 3.0.1.1
-*** mcon/U/usrinc.U Sun May 8 22:14:36 1994
---- /home2/doughera/lib/dist/U/usrinc.U Tue Feb 21 11:00:10 1995
-***************
-*** 60,71 ****
- fi
- $rm -f usr.c usr.out
- echo "and you're compiling with the $mips_type compiler and libraries."
- else
- echo "Doesn't look like a MIPS system."
- echo "exit 1" >mips
-- chmod +x mips
-- $eunicefix mips
- fi
- echo " "
- case "$usrinc" in
- '') ;;
---- 60,72 ----
- fi
- $rm -f usr.c usr.out
- echo "and you're compiling with the $mips_type compiler and libraries."
-+ echo "exit 0" >mips
- else
- echo "Doesn't look like a MIPS system."
- echo "exit 1" >mips
- fi
-+ chmod +x mips
-+ $eunicefix mips
- echo " "
- case "$usrinc" in
- '') ;;
+++ /dev/null
-?RCS: $Id: dlsrc.U,v$
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: dlsrc.U,v $
-?RCS:
-?X: hpux support thanks to Jeff Okamoto <okamoto@hpcc101.corp.hp.com>
-?X:
-?X: To create a shared library, you must compile ALL source files in the
-?X: library with +z (or possibly +Z if the library is whopping huge),
-?X: then link the library with -b. Example:
-?X: cc -c +z module_a.c
-?X: cc -c +z module_b.c
-?X: ld -b module_a.o module_b.o -o module.sl
-?X:
-?MAKE:dlext: \
- Getfile Myread cat usedl so
-?MAKE: -pick add $@ %<
-?S:dlext:
-?S: This variable contains the extension that is to be used for the
-?S: dynamically loaded modules that perl generaties.
-?S:.
-case "$usedl" in
-$define|y|true)
- $cat << EOM
-
-On a few systems, the dynamically loaded modules that perl generates and uses
-will need a different extension then shared libs. The default will probably
-be appropriate.
-
-EOM
- case "$dlext" in
- '') dflt="$so" ;;
- *) dflt="$dlext" ;;
- esac
- rp='What is the extension of dynamically loaded modules'
- . ./myread
- dlext="$ans"
- ;;
-*)
- dlext="none"
- ;;
-esac
-
+++ /dev/null
-?RCS: $Id: dlsrc.U,v$
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: dlsrc.U,v $
-?RCS:
-?X: hpux support thanks to Jeff Okamoto <okamoto@hpcc101.corp.hp.com>
-?X:
-?X: To create a shared library, you must compile ALL source files in the
-?X: library with +z (or possibly +Z if the library is whopping huge),
-?X: then link the library with -b. Example:
-?X: cc -c +z module_a.c
-?X: cc -c +z module_b.c
-?X: ld -b module_a.o module_b.o -o module.sl
-?X:
-?MAKE:usedl dlsrc cccdlflags lddlflags ccdlflags d_shrplib shrpdir: \
- Getfile Myread test osname sed i_dld d_dlopen Findhdr Setvar \
- cc ldflags cat archlib
-?MAKE: -pick add $@ %<
-?S:usedl:
-?S: This variable indicates if the the system supports dynamic
-?S: loading of some sort. See also dlsrc and dlobj.
-?S:.
-?S:dlsrc:
-?S: This variable contains the name of the dynamic loading file that
-?S: will be used with the package.
-?S:.
-?S:cccdlflags:
-?S: This variable contains any special flags that might need to be
-?S: passed with cc -c to compile modules to be used to create a shared
-?S: library that will be used for dynamic loading. For hpux, this
-?S: should be +z. It is up to the makefile to use it.
-?S:.
-?S:lddlflags:
-?S: This variable contains any special flags that might need to be
-?S: passed to ld to create a shared library suitable for dynamic
-?S: loading. It is up to the makefile to use it. For hpux, it
-?S: should be -b. For sunos 4.1, it is empty.
-?S:.
-?S:ccdlflags:
-?S: This variable contains any special flags that might need to be
-?S: passed to cc to link with a shared library for dynamic loading.
-?S: It is up to the makefile to use it. For sunos 4.1, it should
-?S: be empty.
-?S:.
-?S:d_shrplib:
-?S: This variable indicates whether libperl should be made as a
-?S: shared library. This must be true for dynamic loading to
-?S: work on (some) System V Release 4 systems.
-?S:.
-?S:shrpdir:
-?S: This variable contains the directory where the libperl shared
-?S: library will be installed. LD_RUN_PATH is set to this when
-?S: linking with libperl (unless it is /usr/lib, the default).
-?S:.
-?C:USE_DYNAMIC_LOADING ~ %<:
-?C: This symbol, if defined, indicates that dynamic loading of
-?C: some sort is available.
-?C:.
-?H:?%<:#$usedl USE_DYNAMIC_LOADING /**/
-?H:.
-?W:%<:dlopen
-?LINT: set d_shrplib shrpdir
-?T:dldir
-: determine which dynamic loading, if any, to compile in
-echo " "
-dldir="ext/DynaLoader"
-case "$usedl" in
-$define|y|true)
- dflt='y'
- usedl="$define"
- ;;
-$undef|n|false)
- dflt='n'
- usedl="$undef"
- ;;
-*)
- dflt='n'
- case "$d_dlopen" in
- $define) dflt='y' ;;
- esac
- case "$i_dld" in
- $define) dflt='y' ;;
- esac
- : Does a dl_xxx.xs file exist for this operating system
- $test -f ../$dldir/dl_${osname}.xs && dflt='y'
- ;;
-esac
-rp="Do you wish to use dynamic loading?"
-. ./myread
-usedl="$ans"
-case "$ans" in
-y*) usedl="$define"
- case "$dlsrc" in
- '')
- if $test -f ../$dldir/dl_${osname}.xs ; then
- dflt="$dldir/dl_${osname}.xs"
- elif $test "$d_dlopen" = "$define" ; then
- dflt="$dldir/dl_dlopen.xs"
- elif $test "$i_dld" = "$define" ; then
- dflt="$dldir/dl_dld.xs"
- else
- dflt=''
- fi
- ;;
- *) dflt="$dldir/$dlsrc"
- ;;
- esac
- echo "The following dynamic loading files are available:"
- : Can not go over to $dldir because getfile has path hard-coded in.
- cd ..; ls -C $dldir/dl*.xs; cd UU
- rp="Source file to use for dynamic loading"
- fn="fne"
- . ./getfile
- usedl="$define"
- : emulate basename
- dlsrc=`echo $ans | $sed -e 's@.*/\([^/]*\)$@\1@'`
- $cat << EOM
-
-Some systems may require passing special flags to $cc -c to
-compile modules that will be used to create a shared library.
-To use no flags, say "none".
-
-EOM
- case "$cccdlflags" in
- ''|' ') case "$cc" in
- *gcc*) dflt='-fpic' ;;
- *) case "$osname" in
- hpux) dflt='+z' ;;
- next) dflt='none' ;;
- solaris) dflt='-K pic' ;;
- sunos) dflt='-pic' ;;
- svr4*|esix*) dflt='-Kpic' ;;
- *) dflt='none' ;;
- esac ;;
- esac ;;
- *) dflt="$cccdlflags" ;;
- esac
- rp="Any special flags to pass to $cc -c to compile shared library modules?"
- . ./myread
- case "$ans" in
- none) cccdlflags='' ;;
- *) cccdlflags="$ans" ;;
- esac
-
- cat << 'EOM'
-
-Some systems may require passing special flags to ld to create a
-library that can be dynamically loaded. If your ld flags include
--L/other/path options to locate libraries outside your loader's normal
-search path, you may need to specify those -L options here as well. To
-use no flags, say "none".
-
-EOM
-?X: I have received one report that NeXT requires -r here.
-?X: On SunOS 4.1.3, that makes the library no longer shared.
-?X: This stuff probably all belongs in hints files anyway.
- case "$lddlflags" in
- ''|' ') case "$osname" in
- hpux) dflt='-b' ;;
- next) dflt='none' ;;
- solaris) dflt='-G' ;;
- sunos) dflt='-assert nodefinitions' ;;
- svr4*|esix*) dflt="-G $ldflags" ;;
- *) dflt='none' ;;
- esac
- ;;
- *) dflt="$lddlflags" ;;
- esac
- rp="Any special flags to pass to ld to create a dynamically loaded library?"
- . ./myread
- case "$ans" in
- none) lddlflags='' ;;
- *) lddlflags="$ans" ;;
- esac
-
- cat <<EOM
-
-Some systems may require passing special flags to $cc to indicate that
-the resulting executable will use dynamic linking. To use no flags,
-say "none".
-
-EOM
- case "$ccdlflags" in
- ''|' ') case "$osname" in
- hpux) dflt='none' ;;
- next) dflt='none' ;;
- sunos) dflt='none' ;;
- *) dflt='none' ;;
- esac ;;
- *) dflt="$ccdlflags" ;;
- esac
- rp="Any special flags to pass to $cc to use dynamic loading?"
- . ./myread
- case "$ans" in
- none) ccdlflags='' ;;
- *) ccdlflags="$ans" ;;
- esac
- ;;
-?X: End of usedl=y section
-*) usedl="$undef"
- dlsrc='dl_none.xs'
- lddlflags=''
- ccdlflags=''
- ;;
-esac
-
-?X: Currently libperl is only created as a shared library if
-?X: using dynamic loading on a SysVR4 system. Feel free to
-?X: add prompts here to allow the user to choose a shared
-?X: libperl in other cases.
-val="$undef"
-case "$osname" in
-esix*|svr4*)
- case "$usedl" in
- $define)
- $cat <<EOM
-
-System V Release 4 systems can support dynamic loading
-only if libperl is created as a shared library.
-
-EOM
- val="$define"
- ;;
- esac ;;
-esac
-set d_shrplib; eval $setvar
-case "$d_shrplib" in
-$define)
- cat <<EOM >&4
-
-Be sure to add the perl source directory to the LD_LIBRARY_PATH
-environment variable before running make:
- LD_LIBRARY_PATH=`cd ..;pwd`; export LD_LIBRARY_PATH
-or
- setenv LD_LIBRARY_PATH `cd ..;pwd`
-
-EOM
-;;
-esac
-case "$d_shrplib" in
-$define)
- case "$shrpdir" in
- "") dflt="$archlib/CORE";;
- *) dflt="$shrpdir";;
- esac
- rp="What directory should we install the shared libperl into?"
- fn="d~"
- . ./getfile
- shrpdir="$ans"
- ;;
-*) shrpdir='none'
- ;;
-esac
-
+++ /dev/null
-?RCS: $Id: i_db.U,v 3.0.1.1 1994/08/29 16:21:50 ram Exp $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
-?RCS:
-?RCS: $Log: i_db.U,v $
-?RCS: Revision 3.0.1.1 1994/08/29 16:21:50 ram
-?RCS: patch32: created by ADO
-?RCS:
-?MAKE:i_db db_hashtype db_prefixtype: Inhdr +cc +ccflags rm contains
-?MAKE: -pick add $@ %<
-?S:i_db:
-?S: This variable conditionally defines the I_DB symbol, and indicates
-?S: whether a C program may include Berkeley's DB include file <db.h>.
-?S:.
-?S:db_hashtype:
-?S: This variable contains the type of the hash structure element
-?S: in the <db.h> header file. In older versions of DB, it was
-?S: int, while in newer ones it is u_int32_t.
-?S:.
-?S:db_prefixtype:
-?S: This variable contains the type of the prefix structure element
-?S: in the <db.h> header file. In older versions of DB, it was
-?S: int, while in newer ones it is size_t.
-?S:.
-?C:I_DB:
-?C: This symbol, if defined, indicates to the C program that it should
-?C: include Berkeley's DB include file <db.h>.
-?C:.
-?C:DB_Prefix_t:
-?C: This symbol contains the type of the prefix structure element
-?C: in the <db.h> header file. In older versions of DB, it was
-?C: int, while in newer ones it is u_int32_t.
-?C:.
-?C:DB_Hash_t:
-?C: This symbol contains the type of the prefix structure element
-?C: in the <db.h> header file. In older versions of DB, it was
-?C: int, while in newer ones it is size_t.
-?C:.
-?H:#$i_db I_DB /**/
-?H:#define DB_Hash_t $db_hashtype /**/
-?H:#define DB_Prefix_t $db_prefixtype /**/
-?H:.
-?F:!try.c !try.o
-?LINT:set i_db
-: see if this is a db.h system
-set db.h i_db
-eval $inhdr
-
-@if DB_Hash_t
-case "$i_db" in
-define)
- : Check the return type needed for hash
- echo "Checking return type needed for hash for Berkeley DB ..." >&4
- cat >try.c <<'EOCP'
-#include <sys/types.h>
-#include <db.h>
-u_int32_t
-hash_cb (ptr, size)
-const void * ptr ;
-size_t size ;
-{
-}
-HASHINFO info ;
-main()
-{
- info.hash = hash_cb ;
-}
-EOCP
- if $cc $ccflags -c try.c >try.out 2>&1 ; then
- if $contains warning try.out >>/dev/null 2>&1 ; then
- db_hashtype='int'
- else
- db_hashtype='u_int32_t'
- fi
- else
- echo "I can't seem to compile the test program." >&4
- db_hashtype=int
- fi
- $rm -f try.[co]
- echo "Your version of Berkeley DB uses $db_hashtype for hash."
- ;;
-*) db_hashtype=int
- ;;
-esac
-@end
-
-@if DB_Prefix_t
-case "$i_db" in
-define)
- : Check the return type needed for prefix
- echo "Checking return type needed for prefix for Berkeley DB ..." >&4
- cat >try.c <<'EOCP'
-#include <sys/types.h>
-#include <db.h>
-size_t
-prefix_cb (key1, key2)
-const DBT * key1 ;
-const DBT * key2 ;
-{
-}
-BTREEINFO info ;
-main()
-{
- info.prefix = prefix_cb ;
-}
-EOCP
- if $cc $ccflags -c try.c >try.out 2>&1 ; then
- if $contains warning try.out >>/dev/null 2>&1 ; then
- db_prefixtype='int'
- else
- db_prefixtype='size_t'
- fi
- else
- echo "I can't seem to compile the test program." >&4
- db_prefixtype='int'
- fi
- $rm -f try.[co]
- echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
- ;;
-*) db_prefixtype='int'
- ;;
-esac
-@end
-
+++ /dev/null
-?RCS: $Id: i_dbm.U,v 3.0 1993/08/18 12:08:19 ram Exp $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: i_dbm.U,v $
-?RCS: Revision 3.0 1993/08/18 12:08:19 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:i_dbm: Inhdr Inlibc Setvar
-?MAKE: -pick add $@ %<
-?S:i_dbm (d_odbm):
-?S: This variable conditionally defines the I_DBM symbol, which
-?S: indicates to the C program that dbm.h exists and should
-?S: be included.
-?S:.
-?C:I_DBM (HAS_ODBM ODBM):
-?C: This symbol, if defined, indicates that dbm.h exists and should
-?C: be included.
-?C:.
-?H:#$i_dbm I_DBM /**/
-?H:.
-?T: t_dbm d_dbmclose
-?LINT:set i_dbm
-: see if dbm.h is available
-?X: t_dbm is a tentative check. We might just have the header, not
-?X: the library. We look for dbmclose() rather than dbminit() because
-?X: some versions of SCO Unix have -ldbm, but are missing dbmclose().
-set dbm.h t_dbm
-eval $inhdr
-case "$t_dbm" in
-$define)
- : see if dbmclose exists
- set dbmclose d_dbmclose
- eval $inlibc
- case "$d_dbmclose" in
- $undef)
- t_dbm="$undef"
- echo "We won't be including <dbm.h>"
- ;;
- esac
- ;;
-esac
-val="$t_dbm"
-set i_dbm
-eval $setvar
-
+++ /dev/null
-?RCS: $Id: i_gdbm.U,v 3.0 1993/08/18 12:08:19 ram Exp $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: i_gdbm.U,v $
-?RCS: Revision 3.0 1993/08/18 12:08:19 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:i_gdbm: Inhdr Inlibc Setvar
-?MAKE: -pick add $@ %<
-?S:i_gdbm (d_gdbm):
-?S: This variable conditionally defines the I_GDBM symbol, which
-?S: indicates to the C program that gdbm.h exists and should
-?S: be included.
-?S:.
-?C:I_GDBM (HAS_GDBM):
-?C: This symbol, if defined, indicates that gdbm.h exists and should
-?C: be included.
-?C:.
-?H:#$i_gdbm I_GDBM /**/
-?H:.
-?T: t_gdbm d_gdbm_open
-?LINT:set i_gdbm
-: see if gdbm.h is available
-?X: t_gdbm is a tentative check. We might just have the header, not
-?X: the library.
-set gdbm.h t_gdbm
-eval $inhdr
-case "$t_gdbm" in
-$define)
- : see if gdbm_open exists
- set gdbm_open d_gdbm_open
- eval $inlibc
- case "$d_gdbm_open" in
- $undef)
- t_gdbm="$undef"
- echo "We won't be including <gdbm.h>"
- ;;
- esac
- ;;
-esac
-val="$t_gdbm"
-set i_gdbm
-eval $setvar
-
+++ /dev/null
-?RCS: $Id: i_ndbm.U,v 3.0 1993/08/18 12:08:19 ram Exp $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: i_ndbm.U,v $
-?RCS: Revision 3.0 1993/08/18 12:08:19 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:i_ndbm: Inhdr Inlibc Setvar
-?MAKE: -pick add $@ %<
-?S:i_ndbm (d_ndbm):
-?S: This variable conditionally defines the I_NDBM symbol, which
-?S: indicates to the C program that ndbm.h exists and should
-?S: be included.
-?S:.
-?C:I_NDBM (HAS_NDBM NDBM):
-?C: This symbol, if defined, indicates that ndbm.h exists and should
-?C: be included.
-?C:.
-?H:#$i_ndbm I_NDBM /**/
-?H:.
-?T: t_ndbm d_dbm_open
-?LINT:set i_ndbm
-: see if ndbm.h is available
-?X: t_ndbm is a tentative check. We might just have the header, not
-?X: the library.
-set ndbm.h t_ndbm
-eval $inhdr
-case "$t_ndbm" in
-$define)
- : see if dbm_open exists
- set dbm_open d_dbm_open
- eval $inlibc
- case "$d_dbm_open" in
- $undef)
- t_ndbm="$undef"
- echo "We won't be including <ndbm.h>"
- ;;
- esac
- ;;
-esac
-val="$t_ndbm"
-set i_ndbm
-eval $setvar
-
+++ /dev/null
-?RCS: $Id: i_sysstat.U,v $
-?RCS:
-?RCS: $Log: i_sysstat.U,v $
-?RCS:
-?MAKE:i_sysstat: Inhdr
-?MAKE: -pick add $@ %<
-?S:i_sysstat:
-?S: This variable conditionally defines the I_SYS_STAT symbol,
-?S: and indicates whether a C program should include <sys/stat.h>.
-?S:.
-?C:I_SYS_STAT (I_SYSSTAT):
-?C: This symbol, if defined, indicates to the C program that it should
-?C: include <sys/stat.h>.
-?C:.
-?H:#$i_sysstat I_SYS_STAT /**/
-?H:.
-?LINT:set i_sysstat
-: see if sys/stat.h is available
-set sys/stat.h i_sysstat
-eval $inhdr
-
+++ /dev/null
-?RCS: $Id: mallocsrc.U,v 3.0.1.1 1994/05/06 15:10:46 ram Exp $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: mallocsrc.U,v $
-?RCS: Revision 3.0.1.1 1994/05/06 15:10:46 ram
-?RCS: patch23: added support for MYMALLOC, mainly for perl5 (ADO)
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:09:12 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:mallocsrc mallocobj usemymalloc malloctype d_mymalloc \
- freetype: Myread \
- Oldconfig package Guess Setvar rm cat +cc +ccflags Findhdr \
- i_malloc i_stdlib sed libs
-?MAKE: -pick add $@ %<
-?S:usemymalloc:
-?S: This variable contains y if the malloc that comes with this package
-?S: is desired over the system's version of malloc. People often include
-?S: special versions of malloc for effiency, but such versions are often
-?S: less portable. See also mallocsrc and mallocobj.
-?S: If this is 'y', then -lmalloc is removed from $libs.
-?S:.
-?S:mallocsrc:
-?S: This variable contains the name of the malloc.c that comes with
-?S: the package, if that malloc.c is preferred over the system malloc.
-?S: Otherwise the value is null. This variable is intended for generating
-?S: Makefiles.
-?S:.
-?S:d_mymalloc:
-?S: This variable conditionally defines MYMALLOC in case other parts
-?S: of the source want to take special action if MYMALLOC is used.
-?S: This may include different sorts of profiling or error detection.
-?S:.
-?S:mallocobj:
-?S: This variable contains the name of the malloc.o that this package
-?S: generates, if that malloc.o is preferred over the system malloc.
-?S: Otherwise the value is null. This variable is intended for generating
-?S: Makefiles. See mallocsrc.
-?S:.
-?S:freetype:
-?S: This variable contains the return type of free(). It is usually
-?S: void, but occasionally int.
-?S:.
-?S:malloctype:
-?S: This variable contains the kind of ptr returned by malloc and realloc.
-?S:.
-?C:Free_t:
-?C: This variable contains the return type of free(). It is usually
-?C: void, but occasionally int.
-?C:.
-?C:Malloc_t (MALLOCPTRTYPE):
-?C: This symbol is the type of pointer returned by malloc and realloc.
-?C:.
-?H:#define Malloc_t $malloctype /**/
-?H:#define Free_t $freetype /**/
-?H:.
-?C:MYMALLOC:
-?C: This symbol, if defined, indicates that we're using our own malloc.
-?C:.
-?H:#$d_mymalloc MYMALLOC /**/
-?H:.
-?LINT:change libs
-?X: Cannot test for mallocsrc; it is the unit's name and there is a bug in
-?X: the interpreter which defines all the names, even though they are not used.
-@if mallocobj
-: determine which malloc to compile in
-echo " "
-case "$usemymalloc" in
-''|y*|true) dflt='y' ;;
-n*|false) dflt='n' ;;
-*) dflt="$usemymalloc" ;;
-esac
-rp="Do you wish to attempt to use the malloc that comes with $package?"
-. ./myread
-usemymalloc="$ans"
-case "$ans" in
-y*|true)
- usemymalloc='y'
- mallocsrc='malloc.c'
- mallocobj='malloc.o'
- d_mymalloc="$define"
-?X: Maybe libs.U should be dependent on mallocsrc.U, but then
-?X: most packages that use dist probably don't supply their own
-?X: malloc, so this is probably an o.k. comprpomise
- case "$libs" in
- *-lmalloc*)
- : Remove malloc from list of libraries to use
- echo "Removing unneeded -lmalloc from library list" >&4
- set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'`
- shift
- libs="$*"
- echo "libs = $libs" >&4
- ;;
- esac
- ;;
-*)
- usemymalloc='n'
- mallocsrc=''
- mallocobj=''
- d_mymalloc="$undef"
- ;;
-esac
-
-@end
-@if MALLOCPTRTYPE || Malloc_t || Free_t
-: compute the return types of malloc and free
-echo " "
-$cat >malloc.c <<END
-#$i_malloc I_MALLOC
-#$i_stdlib I_STDLIB
-#include <stdio.h>
-#include <sys/types.h>
-#ifdef I_MALLOC
-#include <malloc.h>
-#endif
-#ifdef I_STDLIB
-#include <stdlib.h>
-#endif
-#ifdef TRY_MALLOC
-void *malloc();
-#endif
-#ifdef TRY_FREE
-void free();
-#endif
-END
-@if MALLOCPTRTYPE || Malloc_t
-case "$malloctype" in
-'')
- if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
- malloctype='void *'
- else
- malloctype='char *'
- fi
- ;;
-esac
-echo "Your system wants malloc to return '$malloctype', it would seem." >&4
-@end
-
-@if Free_t
-case "$freetype" in
-'')
- if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
- freetype='void'
- else
- freetype='int'
- fi
- ;;
-esac
-echo "Your system uses $freetype free(), it would seem." >&4
-@end
-$rm -f malloc.[co]
-@end
#define XSRETURN(off) stack_sp = stack_base + ax + ((off) - 1); return
-#define XSRETURNNO ST(0)=sv_mortalcopy(&sv_no); XSRETURN(1)
-#define XSRETURNYES ST(0)=sv_mortalcopy(&sv_yes); XSRETURN(1)
-#define XSRETURNUNDEF ST(0)=sv_mortalcopy(&sv_undef); XSRETURN(1)
+/* Simple macros to put new mortal values onto the stack. */
+/* Typically used to return values from XS functions. */
+#define XST_mIV(i,v) ST(i)=sv_2mortal(newSViv(v));
+#define XST_mNV(i,v) ST(i)=sv_2mortal(newSVnv(v));
+#define XST_mPV(i,v) ST(i)=sv_2mortal(newSVpv(v,0));
+#define XST_mNO(i) ST(i)=sv_mortalcopy(&sv_no);
+#define XST_mYES(i) ST(i)=sv_mortalcopy(&sv_yes);
+#define XST_mUNDEF(i) ST(i)=sv_newmortal();
+
+#define XSRETURN_IV(v) XST_mIV(0,v); XSRETURN(1)
+#define XSRETURN_NV(v) XST_mNV(0,v); XSRETURN(1)
+#define XSRETURN_PV(v) XST_mPV(0,v); XSRETURN(1)
+#define XSRETURN_NO XST_mNO(0); XSRETURN(1)
+#define XSRETURN_YES XST_mYES(0); XSRETURN(1)
+#define XSRETURN_UNDEF XST_mUNDEF(0); XSRETURN(1)
AvALLOC(av) = 0;
SvPVX(av) = 0;
AvMAX(av) = AvFILL(av) = -1;
+ if (AvARYLEN(av)) {
+ SvREFCNT_dec(AvARYLEN(av));
+ AvARYLEN(av) = 0;
+ }
}
void
sub readonly { die "\%Config::Config is read-only\n" }
+sub myconfig {
+ my($output);
+
+ $output = <<'END';
+Summary of my $package (patchlevel $PATCHLEVEL) configuration:
+ Platform:
+ osname=$osname, osver=$osvers, archname=$archname
+ uname='$myuname'
+ hint=$hint
+ Compiler:
+ cc='$cc', optimize='$optimize'
+ cppflags='$cppflags'
+ ccflags ='$ccflags'
+ ldflags ='$ldflags'
+ stdchar='$stdchar', d_stdstdio=$d_stdstdio, usevfork=$usevfork
+ voidflags=$voidflags, castflags=$castflags, d_casti32=$d_casti32, d_castneg=$d_castneg
+ intsize=$intsize, alignbytes=$alignbytes, usemymalloc=$usemymalloc, randbits=$randbits
+ Libraries:
+ so=$so
+ libpth=$libpth
+ libs=$libs
+ libc=$libc
+ Dynamic Linking:
+ dlsrc=$dlsrc, dlext=$dlext, d_dlsymun=$d_dlsymun
+ cccdlflags='$cccdlflags', ccdlflags='$ccdlflags', lddlflags='$lddlflags'
+
+END
+ $output =~ s/\$(\w+)/$Config{$1}/ge;
+ $output;
+}
+
sub STORE { &readonly }
sub DELETE{ &readonly }
sub CLEAR { &readonly }
I32 old_op_type;
char * old_name;
OP * old_eval_root;
+ SV * cur_text;
};
#define PUSHEVAL(cx,n,fgv) \
cx->blk_eval.old_in_eval = in_eval; \
cx->blk_eval.old_op_type = op->op_type; \
cx->blk_eval.old_name = n; \
- cx->blk_eval.old_eval_root = eval_root;
+ cx->blk_eval.old_eval_root = eval_root; \
+ cx->blk_eval.cur_text = linestr;
#define POPEVAL(cx) \
in_eval = cx->blk_eval.old_in_eval; \
GV * xcv_filegv;
long xcv_depth; /* >= 2 indicates recursive call */
AV * xcv_padlist;
+ CV * xcv_outside;
bool xcv_oldstyle;
};
+
#define Nullcv Null(CV*)
#define CvSTASH(sv) ((XPVCV*)SvANY(sv))->xcv_stash
#define CvSTART(sv) ((XPVCV*)SvANY(sv))->xcv_start
#define CvFILEGV(sv) ((XPVCV*)SvANY(sv))->xcv_filegv
#define CvDEPTH(sv) ((XPVCV*)SvANY(sv))->xcv_depth
#define CvPADLIST(sv) ((XPVCV*)SvANY(sv))->xcv_padlist
+#define CvOUTSIDE(sv) ((XPVCV*)SvANY(sv))->xcv_outside
#define CvOLDSTYLE(sv) ((XPVCV*)SvANY(sv))->xcv_oldstyle
#include <sys/file.h>
#endif
-/* Omit -- it causes too much grief on mixed systems.
-#ifdef I_UNISTD
-#include <unistd.h>
-#endif
-*/
-
bool
do_open(gv,name,len,supplied_fp)
GV *gv;
thatio = GvIO(gv);
if (!thatio) {
#ifdef EINVAL
- errno = EINVAL;
+ SETERRNO(EINVAL,SS$_IVCHAN);
#endif
goto say_false;
}
sv_setpvn(sv,">",1);
sv_catpv(sv,oldname);
- errno = 0; /* in case sprintf set errno */
+ SETERRNO(0,0); /* in case sprintf set errno */
if (!do_open(argvoutgv,SvPVX(sv),SvCUR(sv),Nullfp)) {
warn("Can't do inplace edit on %s: %s",
oldname, Strerror(errno) );
if (!gv)
gv = argvgv;
if (!gv || SvTYPE(gv) != SVt_PVGV) {
- errno = EBADF;
+ SETERRNO(EBADF,SS$_IVCHAN);
return FALSE;
}
io = GvIO(gv);
if (IoTYPE(io) == '|') {
status = my_pclose(IoIFP(io));
retval = (status == 0);
- statusvalue = (unsigned short)status & 0xffff;
+ statusvalue = FIXSTATUS(status);
}
else if (IoTYPE(io) == '-')
retval = TRUE;
phooey:
if (dowarn)
warn("tell() on unopened file");
- errno = EBADF;
+ SETERRNO(EBADF,RMS$_IFI);
return -1L;
}
nuts:
if (dowarn)
warn("seek() on unopened file");
- errno = EBADF;
+ SETERRNO(EBADF,RMS$_IFI);
return FALSE;
}
{
dSP;
IO *io;
+ GV* tmpgv;
if (op->op_flags & OPf_REF) {
EXTEND(sp,1);
- io = GvIO(cGVOP->op_gv);
+ tmpgv = cGVOP->op_gv;
+ do_fstat:
+ io = GvIO(tmpgv);
if (io && IoIFP(io)) {
- statgv = cGVOP->op_gv;
+ statgv = tmpgv;
sv_setpv(statname,"");
laststype = OP_STAT;
return (laststatval = Fstat(fileno(IoIFP(io)), &statcache));
}
else {
- if (cGVOP->op_gv == defgv)
+ if (tmpgv == defgv)
return laststatval;
if (dowarn)
warn("Stat on unopened file <%s>",
- GvENAME(cGVOP->op_gv));
+ GvENAME(tmpgv));
statgv = Nullgv;
sv_setpv(statname,"");
return (laststatval = -1);
}
}
else {
- dPOPss;
+ SV* sv = POPs;
PUTBACK;
+ if (SvTYPE(sv) == SVt_PVGV) {
+ tmpgv = (GV*)sv;
+ goto do_fstat;
+ }
+ else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVGV) {
+ tmpgv = (GV*)SvRV(sv);
+ goto do_fstat;
+ }
+
statgv = Nullgv;
sv_setpv(statname,SvPV(sv, na));
laststype = OP_STAT;
register char *s;
char flags[10];
+ while (*cmd && isSPACE(*cmd))
+ cmd++;
+
/* save an extra exec if possible */
#ifdef CSH
/* see if there are shell metacharacters in it */
- /*SUPPRESS 530*/
+ if (*cmd == '.' && isSPACE(cmd[1]))
+ goto doshell;
+
+ if (strnEQ(cmd,"exec",4) && isSPACE(cmd[4]))
+ goto doshell;
+
for (s = cmd; *s && isALPHA(*s); s++) ; /* catch VAR=val gizmo */
if (*s == '=')
goto doshell;
+
for (s = cmd; *s; s++) {
if (*s != ' ' && !isALPHA(*s) && strchr("$&*(){}[]'\";\\|?<>~`\n",*s)) {
if (*s == '\n' && !s[1]) {
return FALSE;
}
}
+
New(402,Argv, (s - cmd) / 2 + 2, char*);
Cmd = savepvn(cmd, s-cmd);
a = Argv;
if (tainting) {
while (++mark <= sp) {
- if (SvMAGICAL(*mark) && mg_find(*mark, 't'))
+ MAGIC *mg;
+ if (SvMAGICAL(*mark) && (mg = mg_find(*mark, 't')) && mg->mg_len & 1)
tainted = TRUE;
}
mark = oldmark;
case OP_UTIME:
TAINT_PROPER("utime");
if (sp - mark > 2) {
-#ifdef I_UTIME
+#if defined(I_UTIME) || defined(VMS)
struct utimbuf utbuf;
#else
struct {
key = (key_t)SvNVx(*++mark);
n = (optype == OP_MSGGET) ? 0 : SvIVx(*++mark);
flags = SvIVx(*++mark);
- errno = 0;
+ SETERRNO(0,0);
switch (optype)
{
#ifdef HAS_MSG
I32 i = SvIV(astr);
a = (char *)i; /* ouch */
}
- errno = 0;
+ SETERRNO(0,0);
switch (optype)
{
#ifdef HAS_MSG
mbuf = SvPV(mstr, len);
if ((msize = len - sizeof(long)) < 0)
croak("Arg too short for msgsnd");
- errno = 0;
+ SETERRNO(0,0);
return msgsnd(id, (struct msgbuf *)mbuf, msize, flags);
#else
croak("msgsnd not implemented");
SvPV_force(mstr, len);
mbuf = SvGROW(mstr, sizeof(long)+msize+1);
- errno = 0;
+ SETERRNO(0,0);
ret = msgrcv(id, (struct msgbuf *)mbuf, msize, mtype, flags);
if (ret >= 0) {
SvCUR_set(mstr, sizeof(long)+ret);
opbuf = SvPV(opstr, opsize);
if (opsize < sizeof(struct sembuf)
|| (opsize % sizeof(struct sembuf)) != 0) {
- errno = EINVAL;
+ SETERRNO(EINVAL,LIB$_INVARG);
return -1;
}
- errno = 0;
+ SETERRNO(0,0);
return semop(id, (struct sembuf *)opbuf, opsize/sizeof(struct sembuf));
#else
croak("semop not implemented");
mstr = *++mark;
mpos = SvIVx(*++mark);
msize = SvIVx(*++mark);
- errno = 0;
+ SETERRNO(0,0);
if (shmctl(id, IPC_STAT, &shmds) == -1)
return -1;
if (mpos < 0 || msize < 0 || mpos + msize > shmds.shm_segsz) {
- errno = EFAULT; /* can't do as caller requested */
+ SETERRNO(EFAULT,SS$_ACCVIO); /* can't do as caller requested */
return -1;
}
shm = (Shmat_t)shmat(id, (char*)NULL, (optype == OP_SHMREAD) ? SHM_RDONLY : 0);
len++, sarg--;
xlen = strlen(xs);
break;
+ case 'n': case '*':
+ croak("Use of %c in printf format not supported", *t);
+
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
case '.': case '#': case '-': case '+': case ' ':
return;
}
s = SvPV(sv, len);
- if (len && !SvPOKp(sv))
+ if (len && !SvPOK(sv))
s = SvPV_force(sv, len);
if (s && len) {
s += --len;
(void)memzero(dc + SvCUR(sv), len - SvCUR(sv) + 1);
}
SvCUR_set(sv, len);
+ *SvEND(sv) = '\0';
(void)SvPOK_only(sv);
#ifdef LIBERAL
if (len >= sizeof(long)*4 &&
if (!hv)
RETURN;
+
+ (void)hv_iterinit(hv); /* always reset iterator regardless */
+
if (GIMME != G_ARRAY) {
dTARGET;
i = HvKEYS(hv);
else {
i = 0;
- (void)hv_iterinit(hv);
/*SUPPRESS 560*/
while (entry = hv_iternext(hv)) {
i++;
/* Guess how much room we need. hv_max may be a few too many. Oh well. */
EXTEND(sp, HvMAX(hv) * (dokeys + dovalues));
- (void)hv_iterinit(hv);
-
PUTBACK; /* hv_iternext and hv_iterval might clobber stack_sp */
while (entry = hv_iternext(hv)) {
SPAGAIN;
else
dump("TARG = %d\n", op->op_targ);
}
-#ifdef NOTDEF
+#ifdef DUMPADDR
dump("ADDR = 0x%lx => 0x%lx\n",op, op->op_next);
#endif
if (op->op_flags) {
#define coeff Perl_coeff
#define compiling Perl_compiling
#define compl_amg Perl_compl_amg
+#define compcv Perl_compcv
#define comppad Perl_comppad
#define comppad_name Perl_comppad_name
#define comppad_name_fill Perl_comppad_name_fill
#define cos_amg Perl_cos_amg
#define cryptseen Perl_cryptseen
#define cryptswitch_add Perl_cryptswitch_add
+#define cryptswitch_fp Perl_cryptswitch_fp
#define cshlen Perl_cshlen
#define cshname Perl_cshname
#define curcop Perl_curcop
#define hv_iterinit Perl_hv_iterinit
#define hv_iterkey Perl_hv_iterkey
#define hv_iternext Perl_hv_iternext
+#define hv_iternextsv Perl_hv_iternextsv
#define hv_iterval Perl_hv_iterval
#define hv_magic Perl_hv_magic
#define hv_store Perl_hv_store
#define defoutgv (curinterp->Idefoutgv)
#define defstash (curinterp->Idefstash)
#define delaymagic (curinterp->Idelaymagic)
+#define diehook (curinterp->Idiehook)
#define dirty (curinterp->Idirty)
#define dlevel (curinterp->Idlevel)
#define dlmax (curinterp->Idlmax)
#define leftgv (curinterp->Ileftgv)
#define lineary (curinterp->Ilineary)
#define localizing (curinterp->Ilocalizing)
+#define main_cv (curinterp->Imain_cv)
#define main_root (curinterp->Imain_root)
#define main_start (curinterp->Imain_start)
#define mainstack (curinterp->Imainstack)
#define orslen (curinterp->Iorslen)
#define pad (curinterp->Ipad)
#define padname (curinterp->Ipadname)
+#define parsehook (curinterp->Iparsehook)
#define patchlevel (curinterp->Ipatchlevel)
#define perldb (curinterp->Iperldb)
+#define perl_destruct_level (curinterp->Iperl_destruct_level)
#define pidstatus (curinterp->Ipidstatus)
#define preambled (curinterp->Ipreambled)
#define preprocess (curinterp->Ipreprocess)
#define top_env (curinterp->Itop_env)
#define toptarget (curinterp->Itoptarget)
#define unsafe (curinterp->Iunsafe)
+#define warnhook (curinterp->Iwarnhook)
#else /* not multiple, so translate interpreter symbols the other way... */
#define Idefoutgv defoutgv
#define Idefstash defstash
#define Idelaymagic delaymagic
+#define Idiehook diehook
#define Idirty dirty
#define Idlevel dlevel
#define Idlmax dlmax
#define Ileftgv leftgv
#define Ilineary lineary
#define Ilocalizing localizing
+#define Imain_cv main_cv
#define Imain_root main_root
#define Imain_start main_start
#define Imainstack mainstack
#define Iorslen orslen
#define Ipad pad
#define Ipadname padname
+#define Iparsehook parsehook
#define Ipatchlevel patchlevel
#define Iperldb perldb
+#define Iperl_destruct_level perl_destruct_level
#define Ipidstatus pidstatus
#define Ipreambled preambled
#define Ipreprocess preprocess
#define Itop_env top_env
#define Itoptarget toptarget
#define Iunsafe unsafe
+#define Iwarnhook warnhook
#endif /* MULTIPLICITY */
#!/bin/sh
+rm -f embed.h
cat <<'END' >embed.h
/* This file is derived from global.sym and interp.sym */
);
sub AUTOLOAD {
- if (@_ > 1) {
- $AutoLoader::AUTOLOAD = $AUTOLOAD;
- goto &AutoLoader::AUTOLOAD;
- }
local($constname);
($constname = $AUTOLOAD) =~ s/.*:://;
$val = constant($constname, @_ ? $_[0] : 0);
*
* Platform: OpenVMS, VAX or AXP
* Author: Charles Bailey bailey@genetics.upenn.edu
- * Revised: 4-Sep-1994
+ * Revised: 12-Dec-1994
*
* Implementation Note
* This section is added as an aid to users and DynaLoader developers, in
#include <lib$routines.h>
#include <rms.h>
#include <ssdef.h>
+#include <starlet.h>
typedef unsigned long int vmssts;
struct dsc$descriptor_s * msg;
vmssts unused;
{
- if (*(msg->dsc$a_pointer) = '%') { /* first line */
+ if (*(msg->dsc$a_pointer) == '%') { /* first line */
if (LastError)
strncpy((LastError = saferealloc(LastError,msg->dsc$w_length)),
msg->dsc$a_pointer, msg->dsc$w_length);
vmssts sts;
vmssts stv;
{
- vmssts vec[3],pmsts;
+ vmssts vec[3];
vec[0] = stv ? 2 : 1;
vec[1] = sts; vec[2] = stv;
- if (!(pmsts = sys$putmsg(vec,copy_errmsg,0,0)) & 1)
- croak("Fatal $PUTMSG error: %d",pmsts);
+ _ckvmssts(sys$putmsg(vec,copy_errmsg,0,0));
}
static void
BOOT:
(void)dl_private_init();
-SV *
+void
dl_expandspec(filespec)
char * filespec
CODE:
}
else {
/* Now set up a default spec - everything but the name */
- deflen = dlnam.nam$l_type - dlesa;
+ deflen = dlnam.nam$l_name - dlesa;
memcpy(defspec,dlesa,deflen);
memcpy(defspec+deflen,dlnam.nam$l_type,
dlnam.nam$b_type + dlnam.nam$b_ver);
deflen += dlnam.nam$b_type + dlnam.nam$b_ver;
memcpy(vmsspec,dlnam.nam$l_name,dlnam.nam$b_name);
DLDEBUG(2,fprintf(stderr,"\tsplit filespec: name = %.*s, default = %.*s\n",
- dlnam.nam$b_name,vmsspec,defspec,deflen));
+ dlnam.nam$b_name,vmsspec,deflen,defspec));
/* . . . and go back to expand it */
dlnam.nam$b_nop = 0;
dlfab.fab$l_dna = defspec;
}
}
-void *
+void
dl_load_file(filespec)
char * filespec
CODE:
unsigned short int len;
unsigned short int code;
char *string;
- } namlst[2] = {0,FSCN$_NAME,0, 0,0,0};
+ } namlst[2] = {{0,FSCN$_NAME,0},{0,0,0}};
struct libref *dlptr;
vmssts sts, failed = 0;
void *entry;
specdsc.dsc$w_length = strlen(specdsc.dsc$a_pointer);
DLDEBUG(2,fprintf(stderr,"\tVMS-ified filespec is %s\n",
specdsc.dsc$a_pointer));
- dlptr = safemalloc(sizeof(struct libref));
+ New(7901,dlptr,1,struct libref);
dlptr->name.dsc$b_dtype = dlptr->defspec.dsc$b_dtype = DSC$K_DTYPE_T;
dlptr->name.dsc$b_class = dlptr->defspec.dsc$b_class = DSC$K_CLASS_S;
sts = sys$filescan(&specdsc,namlst,0);
ST(0) = &sv_undef;
}
else {
- ST(0) = sv_2mortal(newSViv(dlptr));
+ ST(0) = sv_2mortal(newSViv((IV) dlptr));
}
-void *
+void
dl_find_symbol(librefptr,symname)
void * librefptr
SV * symname
dl_set_error(sts,0);
ST(0) = &sv_undef;
}
- else ST(0) = sv_2mortal(newSViv(entry));
+ else ST(0) = sv_2mortal(newSViv((IV) entry));
void
);
sub AUTOLOAD {
- if (@_ > 1) {
- $AutoLoader::AUTOLOAD = $AUTOLOAD;
- goto &AutoLoader::AUTOLOAD;
- }
local($constname);
($constname = $AUTOLOAD) =~ s/.*:://;
$val = constant($constname, @_ ? $_[0] : 0);
);
sub AUTOLOAD {
- if (@_ > 1) {
- $AutoLoader::AUTOLOAD = $AUTOLOAD;
- goto &AutoLoader::AUTOLOAD;
- }
local($constname);
($constname = $AUTOLOAD) =~ s/.*:://;
$val = constant($constname, @_ ? $_[0] : 0);
if (RETVAL) {
if (RETVAL < 0 && errno == EPERM)
croak("No write permission to gdbm file");
- warn("gdbm store returned %d, errno %d, key \"%.*s\"",
+ croak("gdbm store returned %d, errno %d, key \"%.*s\"",
RETVAL,errno,key.dsize,key.dptr);
/* gdbm_clearerr(db); */
}
if (RETVAL) {
if (RETVAL < 0 && errno == EPERM)
croak("No write permission to ndbm file");
- warn("ndbm store returned %d, errno %d, key \"%s\"",
+ croak("ndbm store returned %d, errno %d, key \"%s\"",
RETVAL,errno,key.dptr);
dbm_clearerr(db);
}
if (RETVAL) {
if (RETVAL < 0 && errno == EPERM)
croak("No write permission to odbm file");
- warn("odbm store returned %d, errno %d, key \"%s\"",
+ croak("odbm store returned %d, errno %d, key \"%s\"",
RETVAL,errno,key.dptr);
}
require Config;
@ISA = qw(Exporter DynaLoader);
-$H{assert_h} = [qw(assert NDEBUG)];
+%EXPORT_TAGS = (
-$H{ctype_h} = [qw(isalnum isalpha iscntrl isdigit isgraph islower
- isprint ispunct isspace isupper isxdigit tolower toupper)];
+ assert_h => [qw(assert NDEBUG)],
-$H{dirent_h} = [qw()];
+ ctype_h => [qw(isalnum isalpha iscntrl isdigit isgraph islower
+ isprint ispunct isspace isupper isxdigit tolower toupper)],
-$H{errno_h} = [qw(E2BIG EACCES EAGAIN EBADF EBUSY ECHILD EDEADLK EDOM
+ dirent_h => [qw()],
+
+ errno_h => [qw(E2BIG EACCES EAGAIN EBADF EBUSY ECHILD EDEADLK EDOM
EEXIST EFAULT EFBIG EINTR EINVAL EIO EISDIR EMFILE
EMLINK ENAMETOOLONG ENFILE ENODEV ENOENT ENOEXEC ENOLCK
ENOMEM ENOSPC ENOSYS ENOTDIR ENOTEMPTY ENOTTY ENXIO
- EPERM EPIPE ERANGE EROFS ESPIPE ESRCH EXDEV errno)];
+ EPERM EPIPE ERANGE EROFS ESPIPE ESRCH EXDEV errno)],
-$H{fcntl_h} = [qw(FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_RDLCK
+ fcntl_h => [qw(FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_RDLCK
F_SETFD F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK
O_ACCMODE O_APPEND O_CREAT O_EXCL O_NOCTTY O_NONBLOCK
O_RDONLY O_RDWR O_TRUNC O_WRONLY
SEEK_CUR SEEK_END SEEK_SET
S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU
S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISGID S_ISREG S_ISUID
- S_IWGRP S_IWOTH S_IWUSR)];
+ S_IWGRP S_IWOTH S_IWUSR)],
-$H{float_h} = [qw(DBL_DIG DBL_EPSILON DBL_MANT_DIG
+ float_h => [qw(DBL_DIG DBL_EPSILON DBL_MANT_DIG
DBL_MAX DBL_MAX_10_EXP DBL_MAX_EXP
DBL_MIN DBL_MIN_10_EXP DBL_MIN_EXP
FLT_DIG FLT_EPSILON FLT_MANT_DIG
FLT_RADIX FLT_ROUNDS
LDBL_DIG LDBL_EPSILON LDBL_MANT_DIG
LDBL_MAX LDBL_MAX_10_EXP LDBL_MAX_EXP
- LDBL_MIN LDBL_MIN_10_EXP LDBL_MIN_EXP)];
+ LDBL_MIN LDBL_MIN_10_EXP LDBL_MIN_EXP)],
-$H{grp_h} = [qw()];
+ grp_h => [qw()],
-$H{limits_h} = [qw( ARG_MAX CHAR_BIT CHAR_MAX CHAR_MIN CHILD_MAX
+ limits_h => [qw( ARG_MAX CHAR_BIT CHAR_MAX CHAR_MIN CHILD_MAX
INT_MAX INT_MIN LINK_MAX LONG_MAX LONG_MIN MAX_CANON
MAX_INPUT MB_LEN_MAX NAME_MAX NGROUPS_MAX OPEN_MAX
PATH_MAX PIPE_BUF SCHAR_MAX SCHAR_MIN SHRT_MAX SHRT_MIN
_POSIX_LINK_MAX _POSIX_MAX_CANON _POSIX_MAX_INPUT
_POSIX_NAME_MAX _POSIX_NGROUPS_MAX _POSIX_OPEN_MAX
_POSIX_PATH_MAX _POSIX_PIPE_BUF _POSIX_SSIZE_MAX
- _POSIX_STREADM_MAX _POSIX_TZNAME_MAX)];
+ _POSIX_STREADM_MAX _POSIX_TZNAME_MAX)],
-$H{locale_h} = [qw(LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC
- LC_TIME NULL localeconv setlocale)];
+ locale_h => [qw(LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC
+ LC_TIME NULL localeconv setlocale)],
-$H{math_h} = [qw(HUGE_VAL acos asin atan ceil cosh fabs floor fmod
- frexp ldexp log10 modf pow sinh tanh)];
+ math_h => [qw(HUGE_VAL acos asin atan ceil cosh fabs floor fmod
+ frexp ldexp log10 modf pow sinh tanh)],
-$H{pwd_h} = [qw()];
+ pwd_h => [qw()],
-$H{setjmp_h} = [qw(longjmp setjmp siglongjmp sigsetjmp)];
+ setjmp_h => [qw(longjmp setjmp siglongjmp sigsetjmp)],
-$H{signal_h} = [qw(SA_NOCLDSTOP SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE
+ signal_h => [qw(SA_NOCLDSTOP SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE
SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV
SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU SIGUSR1 SIGUSR2
SIG_BLOCK SIG_DFL SIG_ERR SIG_IGN SIG_SETMASK SIG_UNBLOCK
raise sigaction signal sigpending sigprocmask
- sigsuspend)];
+ sigsuspend)],
-$H{stdarg_h} = [qw()];
+ stdarg_h => [qw()],
-$H{stddef_h} = [qw(NULL offsetof)];
+ stddef_h => [qw(NULL offsetof)],
-$H{stdio_h} = [qw(BUFSIZ EOF FILENAME_MAX L_ctermid L_cuserid
+ stdio_h => [qw(BUFSIZ EOF FILENAME_MAX L_ctermid L_cuserid
L_tmpname NULL SEEK_CUR SEEK_END SEEK_SET STREAM_MAX
TMP_MAX stderr stdin stdout _IOFBF _IOLBF _IONBF
clearerr fclose fdopen feof ferror fflush fgetc fgetpos
fscanf fseek fsetpos ftell fwrite getchar gets
perror putc putchar puts remove rewind
scanf setbuf setvbuf sscanf tmpfile tmpnam
- ungetc vfprintf vprintf vsprintf)];
+ ungetc vfprintf vprintf vsprintf)],
-$H{stdlib_h} = [qw(EXIT_FAILURE EXIT_SUCCESS MB_CUR_MAX NULL RAND_MAX
+ stdlib_h => [qw(EXIT_FAILURE EXIT_SUCCESS MB_CUR_MAX NULL RAND_MAX
abort atexit atof atoi atol bsearch calloc div
free getenv labs ldiv malloc mblen mbstowcs mbtowc
- qsort realloc strtod strtol stroul wcstombs wctomb)];
+ qsort realloc strtod strtol stroul wcstombs wctomb)],
-$H{string_h} = [qw(NULL memchr memcmp memcpy memmove memset strcat
+ string_h => [qw(NULL memchr memcmp memcpy memmove memset strcat
strchr strcmp strcoll strcpy strcspn strerror strlen
strncat strncmp strncpy strpbrk strrchr strspn strstr
- strtok strxfrm)];
+ strtok strxfrm)],
-$H{sys_stat_h} = [qw(S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU
+ sys_stat_h => [qw(S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU
S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISGID S_ISREG
S_ISUID S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR
- fstat mkfifo)];
+ fstat mkfifo)],
-$H{sys_times_h} = [qw()];
+ sys_times_h => [qw()],
-$H{sys_types_h} = [qw()];
+ sys_types_h => [qw()],
-$H{sys_utsname_h} = [qw(uname)];
+ sys_utsname_h => [qw(uname)],
-$H{sys_wait_h} = [qw(WEXITSTATUS WIFEXITED WIFSIGNALED WIFSTOPPED
- WNOHANG WSTOPSIG WTERMSIG WUNTRACED)];
+ sys_wait_h => [qw(WEXITSTATUS WIFEXITED WIFSIGNALED WIFSTOPPED
+ WNOHANG WSTOPSIG WTERMSIG WUNTRACED)],
-$H{termios_h} = [qw( B0 B110 B1200 B134 B150 B1800 B19200 B200 B2400
+ termios_h => [qw( B0 B110 B1200 B134 B150 B1800 B19200 B200 B2400
B300 B38400 B4800 B50 B600 B75 B9600 BRKINT CLOCAL
CREAD CS5 CS6 CS7 CS8 CSIZE CSTOPB ECHO ECHOE ECHOK
ECHONL HUPCL ICANON ICRNL IEXTEN IGNBRK IGNCR IGNPAR
TOSTOP VEOF VEOL VERASE VINTR VKILL VMIN VQUIT VSTART
VSTOP VSUSP VTIME
cfgetispeed cfgetospeed cfsetispeed cfsetospeed tcdrain
- tcflow tcflush tcgetattr tcsendbreak tcsetattr )];
+ tcflow tcflush tcgetattr tcsendbreak tcsetattr )],
-$H{time_h} = [qw(CLK_TCK CLOCKS_PER_SEC NULL asctime clock ctime
- difftime mktime strftime tzset tzname)];
+ time_h => [qw(CLK_TCK CLOCKS_PER_SEC NULL asctime clock ctime
+ difftime mktime strftime tzset tzname)],
-$H{unistd_h} = [qw(F_OK NULL R_OK SEEK_CUR SEEK_END SEEK_SET
+ unistd_h => [qw(F_OK NULL R_OK SEEK_CUR SEEK_END SEEK_SET
STRERR_FILENO STDIN_FILENO STDOUT_FILENO W_OK X_OK
_PC_CHOWN_RESTRICTED _PC_LINK_MAX _PC_MAX_CANON
_PC_MAX_INPUT _PC_NAME_MAX _PC_NO_TRUNC _PC_PATH_MAX
dup2 dup execl execle execlp execv execve execvp
fpathconf getcwd getegid geteuid getgid getgroups
getpid getuid isatty lseek pathconf pause setgid setpgid
- setsid setuid sysconf tcgetpgrp tcsetpgrp ttyname)];
+ setsid setuid sysconf tcgetpgrp tcsetpgrp ttyname)],
-$H{utime_h} = [qw()];
+ utime_h => [qw()],
-sub expand {
- local (@mylist);
- foreach $entry (@_) {
- if ($H{$entry}) {
- push(@mylist, @{$H{$entry}});
- }
- else {
- push(@mylist, $entry);
- }
- }
- @mylist;
-}
+);
-@EXPORT = expand qw(assert_h ctype_h dirent_h errno_h fcntl_h float_h
- grp_h limits_h locale_h math_h pwd_h setjmp_h signal_h
- stdarg_h stddef_h stdio_h stdlib_h string_h sys_stat_h
- sys_times_h sys_types_h sys_utsname_h sys_wait_h
- termios_h time_h unistd_h utime_h);
+Exporter::export_tags();
@EXPORT_OK = qw(
closedir opendir readdir rewinddir
utime
);
+# Grandfather old foo_h form to new :foo_h form
sub import {
my $this = shift;
- my @list = expand @_;
+ my @list = map { m/^\w+_h$/ ? ":$_" : $_ } @_;
local $Exporter::ExportLevel = 1;
Exporter::import($this,@list);
}
sub ungensym {
local($x) = shift;
$x =~ s/.*:://;
- delete $::_POSIX{$x};
+ delete $POSIX::{$x};
}
############################
$mode =~ s/a.*/>>/ ||
$mode =~ s/w.*/>/ ||
($mode = '<');
- open($glob, "$mode $filename");
+ open($glob, "$mode $filename") and
bless \$glob;
}
$mode =~ s/a.*/>>/ ||
$mode =~ s/w.*/>/ ||
($mode = '<');
- open($glob, "$mode&=$fd");
+ open($glob, "$mode&=$fd") and
bless \$glob;
}
sub close {
POSIX::usage "close(filehandle)" if @_ != 1;
close($_[0]);
+}
+
+sub DESTROY {
+ close($_[0]);
ungensym($_[0]);
}
RETVAL
OutputStream
-new_tmpfile()
+new_tmpfile(packname = "FileHandle")
+ char * packname
CODE:
RETVAL = tmpfile();
OUTPUT:
char * filename
int flags
Mode_t mode
+ CODE:
+ if (flags & (O_APPEND|O_CREAT|O_TRUNC|O_RDWR|O_WRONLY|O_EXCL))
+ TAINT_PROPER("open");
+ RETVAL = open(filename, flags, mode);
+ OUTPUT:
+ RETVAL
+
HV *
localeconv()
STRLEN dstlen;
char *p = SvPV(src,srclen);
srclen++;
- ST(0) = sv_2mortal(newSV(srclen));
+ ST(0) = sv_2mortal(NEWSV(800,srclen));
dstlen = strxfrm(SvPVX(ST(0)), p, (size_t)srclen);
if (dstlen > srclen) {
dstlen++;
mkfifo(filename, mode)
char * filename
Mode_t mode
+ CODE:
+ TAINT_PROPER("mkfifo");
+ RETVAL = mkfifo(filename, mode);
+ OUTPUT:
+ RETVAL
SysRet
tcdrain(fd)
char *
ctime(time)
- Time_t * time
+ Time_t &time
double
difftime(time1, time2)
if (RETVAL) {
if (RETVAL < 0 && errno == EPERM)
croak("No write permission to sdbm file");
- warn("sdbm store returned %d, errno %d, key \"%s\"",
+ croak("sdbm store returned %d, errno %d, key \"%s\"",
RETVAL,errno,key.dptr);
sdbm_clearerr(db);
}
);
sub AUTOLOAD {
- if (@_ > 1) {
- $AutoLoader::AUTOLOAD = $AUTOLOAD;
- goto &AutoLoader::AUTOLOAD;
- }
local($constname);
($constname = $AUTOLOAD) =~ s/.*:://;
$val = constant($constname, @_ ? $_[0] : 0);
goto &$AUTOLOAD;
}
+
+# pack a sockaddr_in structure for use in bind() calls.
+# (here to hide the 'S n C4 x8' magic from applications)
+sub sockaddr_in{
+ my($af, $port, @quad) = @_;
+ my $pack = 'S n C4 x8'; # lookup $pack from hash using $af?
+ pack($pack, $af, $port, @quad);
+}
+
+
bootstrap Socket;
# Preloaded methods go here. Autoload methods go after __END__, and are
coeff
compiling
compl_amg
+compcv
comppad
comppad_name
comppad_name_fill
cos_amg
cryptseen
cryptswitch_add
+cryptswitch_fp
cshlen
cshname
curcop
hv_iterinit
hv_iterkey
hv_iternext
+hv_iternextsv
hv_iterval
hv_magic
hv_store
GV* gv;
GV** gvp;
HV* lastchance;
+ CV* cv;
if (!stash)
return 0;
if (SvTYPE(topgv) != SVt_PVGV)
gv_init(topgv, stash, name, len, TRUE);
- if (GvCV(topgv)) {
- if (!GvCVGEN(topgv) || GvCVGEN(topgv) >= sub_generation)
- return topgv;
+ if (cv=GvCV(topgv)) {
+ if (GvCVGEN(topgv) >= sub_generation)
+ return topgv; /* valid cached inheritance */
+ if (!GvCVGEN(topgv)) { /* not an inheritance cache */
+ if (CvROOT(cv) || CvXSUB(cv))
+ return topgv; /* real definition */
+ /* a simple undef -- save the slot for possible re-use */
+ }
+ else {
+ /* stale cached entry, just junk it */
+ GvCV(topgv) = cv = 0;
+ GvCVGEN(topgv) = 0;
+ }
}
+ /* if cv is still set, we have to free it if we find something to cache */
gvp = (GV**)hv_fetch(stash,"ISA",3,FALSE);
if (gvp && (gv = *gvp) != (GV*)&sv_undef && (av = GvAV(gv))) {
}
gv = gv_fetchmeth(basestash, name, len, level + 1);
if (gv) {
+ if (cv) { /* junk old undef */
+ assert(SvREFCNT(topgv) > 1);
+ SvREFCNT_dec(topgv);
+ SvREFCNT_dec(cv);
+ }
GvCV(topgv) = GvCV(gv); /* cache the CV */
GvCVGEN(topgv) = sub_generation; /* valid for now */
return gv;
if (!level) {
if (lastchance = gv_stashpv("UNIVERSAL", FALSE)) {
if (gv = gv_fetchmeth(lastchance, name, len, level + 1)) {
+ if (cv) { /* junk old undef */
+ assert(SvREFCNT(topgv) > 1);
+ SvREFCNT_dec(topgv);
+ SvREFCNT_dec(cv);
+ }
GvCV(topgv) = GvCV(gv); /* cache the CV */
GvCVGEN(topgv) = sub_generation; /* valid for now */
return gv;
else if (strNE(name, "AUTOLOAD")) {
gv = gv_fetchmeth(stash, "AUTOLOAD", 8, 0);
if (gv && (cv = GvCV(gv))) { /* One more chance... */
- SV *tmpstr = sv_newmortal();
- sv_catpv(tmpstr,HvNAME(stash));
+ SV *tmpstr = sv_2mortal(newSVpv(HvNAME(stash),0));
sv_catpvn(tmpstr,"::", 2);
sv_catpvn(tmpstr, name, nend - name);
sv_setsv(GvSV(CvGV(cv)), tmpstr);
stash = defstash;
else if ((COP*)curcop == &compiling) {
stash = curstash;
- if (add && (hints & HINT_STRICT_VARS) && sv_type != SVt_PVCV) {
- if (stash && !hv_fetch(stash,name,len,0))
+ if (add && (hints & HINT_STRICT_VARS) &&
+ sv_type != SVt_PVCV &&
+ sv_type != SVt_PVGV &&
+ sv_type != SVt_PVIO)
+ {
stash = 0;
}
}
case '\\':
case '/':
case '|':
+ case '\001':
case '\004':
+ case '\006':
case '\010':
case '\t':
case '\020':
case '\024':
case '\027':
- case '\006':
if (len > 1)
break;
goto magicalize;
GV *gv;
{
GV* egv = GvEGV(gv);
- HV *hv = GvSTASH(egv);
-
+ HV *hv;
+
+ if (!egv)
+ egv = gv;
+ hv = GvSTASH(egv);
if (!hv)
return;
+
sv_setpv(sv, sv == (SV*)gv ? "*" : "");
sv_catpv(sv,HvNAME(hv));
sv_catpvn(sv,"::", 2);
warn("Attempt to free unreferenced glob pointers");
return;
}
- if (--gp->gp_refcnt > 0)
+ if (--gp->gp_refcnt > 0) {
+ if (gp->gp_egv == gv)
+ gp->gp_egv = 0;
return;
+ }
SvREFCNT_dec(gp->gp_sv);
SvREFCNT_dec(gp->gp_av);
}
if ((cv = gp->gp_cv) && !GvCVGEN(gv))
SvREFCNT_dec(cv);
+ SvREFCNT_dec(gp->gp_form);
+
Safefree(gp);
GvGP(gv) = 0;
}
GV* gv;
CV* cv;
MAGIC* mg=mg_find((SV*)stash,'c');
- AMT *amtp;
+ AMT *amtp=mg ? (AMT*)mg->mg_ptr: NULL;
if (mg && (amtp=((AMT*)(mg->mg_ptr)))->was_ok_am == amagic_generation &&
amtp->was_ok_sub == sub_generation)
return HV_AMAGIC(stash)? TRUE: FALSE;
gvp=(GV**)hv_fetch(stash,"OVERLOAD",8,FALSE);
+ if (amtp && amtp->table) {
+ int i;
+ for (i=1;i<NofAMmeth*2;i++) {
+ if (amtp->table[i]) {
+ SvREFCNT_dec(amtp->table[i]);
+ }
+ }
+ }
sv_unmagic((SV*)stash, 'c');
DEBUG_o( deb("Recalcing overload magic in package %s\n",HvNAME(stash)) );
default:
if (!SvROK(sv)) {
if (!SvOK(sv)) break;
- gv = gv_fetchmethod(curcop->cop_stash, SvPV(sv, na));
+ gv = gv_fetchmethod(stash, SvPV(sv, na));
if (gv) cv = GvCV(gv);
break;
}
}
if (cv) filled=1;
else {
- die("Method for operation %s not found in package %s during blessing\n",
+ die("Method for operation %s not found in package %.200s during blessing\n",
cp,HvNAME(stash));
return FALSE;
}
}
}
- amt.table[i]=cv;
+ amt.table[i]=(CV*)SvREFCNT_inc(cv);
}
sv_magic((SV*)stash, 0, 'c', (char*)&amt, sizeof(amt));
if (filled) {
CV **cvp=NULL, **ocvp=NULL;
AMT *amtp, *oamtp;
int fl=0, off, off1, lr=0, assign=AMGf_assign & flags, notfound=0;
- int postpr=0;
+ int postpr=0, inc_dec_ass=0, assignshift=assign?1:0;
HV* stash;
if (!(AMGf_noleft & flags) && SvAMAGIC(left)
&& (mg = mg_find((SV*)(stash=SvSTASH(SvRV(left))),'c'))
&& (ocvp = cvp = ((oamtp=amtp=(AMT*)mg->mg_ptr)->table))
- && (assign ?
- ((cv = cvp[off=method+1])
- || ( amtp->fallback > AMGfallNEVER && /* fallback to
- * usual method */
- (fl = 1, cv = cvp[off=method]))):
- (1 && (cv = cvp[off=method])) )) {
+ && ((cv = cvp[off=method+assignshift])
+ || (assign && amtp->fallback > AMGfallNEVER && /* fallback to
+ * usual method */
+ (fl = 1, cv = cvp[off=method])))) {
lr = -1; /* Call method for left argument */
} else {
if (cvp && amtp->fallback > AMGfallNEVER && flags & AMGf_unary) {
/* look for substituted methods */
switch (method) {
case inc_amg:
- if ((cv = cvp[off=add_ass_amg])
+ if (((cv = cvp[off=add_ass_amg]) && (inc_dec_ass=1))
|| ((cv = cvp[off=add_amg]) && (postpr=1))) {
right = &sv_yes; lr = -1; assign = 1;
}
break;
case dec_amg:
- if ((cv = cvp[off=subtr_ass_amg])
+ if (((cv = cvp[off=subtr_ass_amg]) && (inc_dec_ass=1))
|| ((cv = cvp[off=subtr_amg]) && (postpr=1))) {
right = &sv_yes; lr = -1; assign = 1;
}
case string_amg:
(void)((cv = cvp[off=numer_amg]) || (cv = cvp[off=bool__amg]));
break;
+ case copy_amg:
+ {
+ SV* ref=SvRV(left);
+ if (!SvROK(ref) && SvTYPE(ref) <= SVt_PVMG) { /* Just to be
+ * extra
+ * causious,
+ * maybe in some
+ * additional
+ * cases sv_setsv
+ * is safe too */
+ SV* newref = newSVsv(ref);
+ SvOBJECT_on(newref);
+ SvSTASH(newref) = (HV*)SvREFCNT_inc(SvSTASH(ref));
+ return newref;
+ }
+ }
+ break;
case abs_amg:
- if ((cvp[off1=lt_amg] || cvp[off1=lt_amg])
+ if ((cvp[off1=lt_amg] || cvp[off1=ncmp_amg])
&& ((cv = cvp[off=neg_amg]) || (cv = cvp[off=subtr_amg]))) {
+ SV* nullsv=sv_2mortal(newSViv(0));
if (off1==lt_amg) {
- SV* lessp = amagic_call(left,
- sv_2mortal(newSViv(0)),
+ SV* lessp = amagic_call(left,nullsv,
lt_amg,AMGf_noright);
logic = SvTRUE(lessp);
} else {
- SV* lessp = amagic_call(left,
- sv_2mortal(newSViv(0)),
+ SV* lessp = amagic_call(left,nullsv,
ncmp_amg,AMGf_noright);
logic = (SvNV(lessp) < 0);
}
if (logic) {
if (off==subtr_amg) {
right = left;
- left = sv_2mortal(newSViv(0));
+ left = nullsv;
lr = 1;
}
} else {
&& (cv = cvp[off=method])) { /* Method for right
* argument found */
lr=1;
- } else if (((ocvp && oamtp->fallback > AMGfallNEVER && (cvp=ocvp))
+ } else if (((ocvp && oamtp->fallback > AMGfallNEVER
+ && (cvp=ocvp) && (lr=-1))
|| (cvp && amtp->fallback > AMGfallNEVER && (lr=1)))
&& !(flags & AMGf_unary)) {
/* We look for substitution for
notfound = 1; lr = 1;
} else {
char tmpstr[512];
- sprintf(tmpstr,"Operation `%s': no method found,\n\tleft argument %s%200s,\n\tright argument %s%200s",
+ if (off==-1) off=method;
+ sprintf(tmpstr,"Operation `%s': no method found,\n\tleft argument %s%.200s,\n\tright argument %s%.200s",
((char**)AMG_names)[off],
SvAMAGIC(left)?
"in overloaded package ":
}
}
if (!notfound) {
- DEBUG_o( deb("Operation `%s': method for %s argument found in package %s%s\n",
+ DEBUG_o( deb("Overloaded operator `%s'%s%s%s:\n\tmethod%s found%s in package %.200s%s\n",
((char**)AMG_names)[off],
- (lr? "right": "left"),
+ method+assignshift==off? "" :
+ " (initially `",
+ method+assignshift==off? "" :
+ ((char**)AMG_names)[method+assignshift],
+ method+assignshift==off? "" : "')",
+ flags & AMGf_unary? "" :
+ lr==1 ? " for right argument": " for left argument",
+ flags & AMGf_unary? " for argument" : "",
HvNAME(stash),
fl? ",\n\tassignment variant used": "") );
- /* Since we use shallow copy, we need to dublicate the contents,
- probably we need also to use user-supplied version of coping?
- */
- if (assign || method==inc_amg || method==dec_amg) RvDEEPCP(left);
+ /* Since we use shallow copy during assignment, we need
+ * to dublicate the contents, probably calling user-supplied
+ * version of copy operator
+ */
+ if ((method+assignshift==off
+ && (assign || method==inc_amg || method==dec_amg))
+ || inc_dec_ass) RvDEEPCP(left);
}
{
dSP;
SvSetSV(left,res); return res; break;
}
return ans? &sv_yes: &sv_no;
+ } else if (method==copy_amg) {
+ if (!SvROK(res)) {
+ die("Copy method did not return a reference");
+ }
+ return SvREFCNT_inc(SvRV(res));
} else {
return res;
}
#define GvGP(gv) (GvXPVGV(gv)->xgv_gp)
#define GvNAME(gv) (GvXPVGV(gv)->xgv_name)
#define GvNAMELEN(gv) (GvXPVGV(gv)->xgv_namelen)
-#define GvENAME(gv) GvNAME(GvEGV(gv))
+#define GvENAME(gv) GvNAME(GvEGV(gv) ? GvEGV(gv) : gv)
#define GvSTASH(gv) (GvXPVGV(gv)->xgv_stash)
-#define GvESTASH(gv) GvSTASH(GvEGV(gv))
+#define GvESTASH(gv) GvSTASH(GvEGV(gv) ? GvEGV(gv) : gv)
#define Nullgv Null(GV*)
END
@isatype{@isatype} = (1) x @isatype;
+$inif = 0;
@ARGV = ('-') unless @ARGV;
}
elsif (s/^if\s+//) {
$new = '';
+ $inif = 1;
do expr();
+ $inif = 0;
print OUT $t,"if ($new) {\n";
$tab += 4;
$t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
}
elsif (s/^elif\s+//) {
$new = '';
+ $inif = 1;
do expr();
+ $inif = 0;
$tab -= 4;
$t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
print OUT $t,"}\n${t}elsif ($new) {\n";
}
}
else {
- $new .= ' &' . $id;
+ if ($inif && $new !~ /defined\($/) {
+ $new .= '(defined(&' . $id . ') ? &' . $id . ' : 0)';
+ } else {
+ $new .= ' &' . $id;
+ }
}
next;
};
\@EXPORT = qw(
@const_names
);
-# Other items we are prepared to export if requested
-\@EXPORT_OK = qw(
-);
-
END
print PM <<"END" unless $opt_c;
# XS function. If a constant is not found then control is passed
# to the AUTOLOAD in AutoLoader.
- # NOTE: THIS AUTOLOAD FUNCTION IS FLAWED (but is the best we can do for now).
- # Avoid old-style ``&CONST'' usage. Either remove the ``&'' or add ``()''.
- if (\@_ > 0) {
- \$AutoLoader::AUTOLOAD = \$AUTOLOAD;
- goto &AutoLoader::AUTOLOAD;
- }
local(\$constname);
(\$constname = \$AUTOLOAD) =~ s/.*:://;
\$val = constant(\$constname, \@_ ? \$_[0] : 0);
}
SV *
-hv_delete(hv,key,klen)
+hv_delete(hv,key,klen,flags)
HV *hv;
char *key;
U32 klen;
+I32 flags;
{
register XPVHV* xhv;
register char *s;
*oentry = entry->hent_next;
if (i && !*oentry)
xhv->xhv_fill--;
- sv = sv_mortalcopy(entry->hent_val);
+ if (flags & G_DISCARD)
+ sv = Nullsv;
+ else
+ sv = sv_mortalcopy(entry->hent_val);
if (entry == xhv->xhv_eiter)
entry->hent_klen = -1;
else
}
close CONFIG;
-$ver = sprintf("%5.3f", $] + 0);
+$ver = $];
$release = substr($ver,0,3);
$patchlevel = substr($ver,3,2);
+die "Patchlevel of perl ($patchlevel)",
+ "and patchlevel of config.sh ($PATCHLEVEL) don't match\n"
+ if $patchlevel != $PATCHLEVEL;
# Do some quick sanity checks.
}
# HP-UX (at least) needs to maintain execute permissions
# on dynamically-loaded libraries.
- &chmod(0644, "$installlib/$name")
- unless (/\.$so$/ || /\.$dlext$/);
+ if ($name =~ /\.(so|$dlext)$/o) {
+ &chmod(0555, "$installlib/$name");
+ }
+ else {
+ &chmod(0444, "$installlib/$name");
+ }
}
} elsif (-d $_) {
&makedir("$installlib/$name");
defoutgv
defstash
delaymagic
+diehook
dirty
dlevel
dlmax
leftgv
lineary
localizing
+main_cv
main_root
main_start
mainstack
orslen
pad
padname
+parsehook
patchlevel
perldb
+perl_destruct_level
pidstatus
preambled
preprocess
top_env
toptarget
unsafe
+warnhook
if ($name =~ s/(\w{12,})\.al$/substr($1,0,11).".al"/e){
eval {require $name};
}
+ elsif ($AUTOLOAD =~ /::DESTROY$/) {
+ eval "sub $AUTOLOAD {}";
+ }
if ($@){
$@ =~ s/ at .*\n//;
croak $@;
# This package implements handy routines for modules that wish to throw
# exceptions outside of the current package.
+$CarpLevel = 0; # How many extra package levels to skip on carp.
+
require Exporter;
@ISA = Exporter;
@EXPORT = qw(confess croak carp);
sub longmess {
my $error = shift;
my $mess = "";
- my $i = 2;
+ my $i = 1 + $CarpLevel;
my ($pack,$file,$line,$sub);
while (($pack,$file,$line,$sub) = caller($i++)) {
$mess .= "\t$sub " if $error eq "called";
$mess || $error;
}
-sub shortmess {
- my $error = shift;
+sub shortmess { # Short-circuit &longmess if called via multiple packages
+ my $error = $_[0]; # Instead of "shift"
my ($curpack) = caller(1);
+ my $extra = $CarpLevel;
my $i = 2;
my ($pack,$file,$line,$sub);
while (($pack,$file,$line,$sub) = caller($i++)) {
- return "$error at $file line $line\n" if $pack ne $curpack;
+ if ($pack ne $curpack) {
+ if ($extra-- > 0) {
+ $curpack = $pack;
+ }
+ else {
+ return "$error at $file line $line\n";
+ }
+ }
}
- longmess $error;
+ goto &longmess;
}
sub confess { die longmess @_; }
sub croak { die shortmess @_; }
sub carp { warn shortmess @_; }
+1;
package Cwd;
require 5.000;
require Exporter;
+use Config;
@ISA = qw(Exporter);
@EXPORT = qw(getcwd fastcwd);
@EXPORT_OK = qw(chdir);
+# VMS: $ENV{'DEFAULT'} points to default directory at all times
+# 08-Dec-1994 Charles Bailey bailey@genetics.upenn.edu
+# Note: Use of Cwd::getcwd() or Cwd::chdir() (but not Cwd::fastcwd())
+# causes the logical name PWD to be defined in the process
+# logical name table as the default device and directory
+# seen by Perl. This may not be the same as the default device
+# and directory seen by DCL after Perl exits, since the effects
+# the CRTL chdir() function persist only until Perl exits.
+
# By Brandon S. Allbery
#
# Usage: $cwd = getcwd();
sub getcwd
{
+ if($Config{'osname'} eq 'VMS') { return $ENV{'PWD'} = $ENV{'DEFAULT'} }
+
my($dotdots, $cwd, @pst, @cst, $dir, @tst);
unless (@cst = stat('.'))
# you might chdir out of a directory that you can't chdir back into.
sub fastcwd {
+ if($Config{'osname'} eq 'VMS') { return $ENV{'DEFAULT'} }
+
my($odev, $oino, $cdev, $cino, $tdev, $tino);
my(@path, $path);
local(*DIR);
sub chdir {
my($newdir) = shift;
+ $newdir =~ s|/{2,}|/|g;
chdir_init() unless $chdir_init;
return 0 unless (CORE::chdir $newdir);
+ if ($Config{'osname'} eq 'VMS') { return $ENV{PWD} = $ENV{DEFAULT} }
+
if ($newdir =~ m#^/#) {
$ENV{'PWD'} = $newdir;
}else{
require Exporter;
@ISA = (Exporter);
-local($^W) = 0;
+local $^W = 0;
+
+# Grandfather $NAME import
+sub import {
+ my $this = shift;
+ my @list = @_;
+ local $Exporter::ExportLevel = 1;
+ Exporter::import($this,grep {s/^\$/*/} @list);
+}
@EXPORT = qw(
*ARG
- $MATCH
- $PREMATCH
- $POSTMATCH
- $LAST_PAREN_MATCH
- $INPUT_LINE_NUMBER
- $NR
- $INPUT_RECORD_SEPARATOR
- $RS
- $OUTPUT_AUTOFLUSH
- $OUTPUT_FIELD_SEPARATOR
- $OFS
- $OUTPUT_RECORD_SEPARATOR
- $ORS
- $LIST_SEPARATOR
- $SUBSCRIPT_SEPARATOR
- $SUBSEP
- $FORMAT_PAGE_NUMBER
- $FORMAT_LINES_PER_PAGE
- $FORMAT_LINES_LEFT
- $FORMAT_NAME
- $FORMAT_TOP_NAME
- $FORMAT_LINE_BREAK_CHARACTERS
- $FORMAT_FORMFEED
- $CHILD_ERROR
- $OS_ERROR
- $ERRNO
- $EVAL_ERROR
- $PROCESS_ID
- $PID
- $REAL_USER_ID
- $UID
- $EFFECTIVE_USER_ID
- $EUID
- $REAL_GROUP_ID
- $GID
- $EFFECTIVE_GROUP_ID
- $EGID
- $PROGRAM_NAME
- $PERL_VERSION
- $DEBUGGING
- $SYSTEM_FD_MAX
- $INPLACE_EDIT
- $PERLDB
- $BASETIME
- $WARNING
- $EXECUTABLE_NAME
- $ARRAY_BASE
- $OFMT
- $MULTILINE_MATCHING
+ *MATCH
+ *PREMATCH
+ *POSTMATCH
+ *LAST_PAREN_MATCH
+ *INPUT_LINE_NUMBER
+ *NR
+ *INPUT_RECORD_SEPARATOR
+ *RS
+ *OUTPUT_AUTOFLUSH
+ *OUTPUT_FIELD_SEPARATOR
+ *OFS
+ *OUTPUT_RECORD_SEPARATOR
+ *ORS
+ *LIST_SEPARATOR
+ *SUBSCRIPT_SEPARATOR
+ *SUBSEP
+ *FORMAT_PAGE_NUMBER
+ *FORMAT_LINES_PER_PAGE
+ *FORMAT_LINES_LEFT
+ *FORMAT_NAME
+ *FORMAT_TOP_NAME
+ *FORMAT_LINE_BREAK_CHARACTERS
+ *FORMAT_FORMFEED
+ *CHILD_ERROR
+ *OS_ERROR
+ *ERRNO
+ *EVAL_ERROR
+ *PROCESS_ID
+ *PID
+ *REAL_USER_ID
+ *UID
+ *EFFECTIVE_USER_ID
+ *EUID
+ *REAL_GROUP_ID
+ *GID
+ *EFFECTIVE_GROUP_ID
+ *EGID
+ *PROGRAM_NAME
+ *PERL_VERSION
+ *ACCUMULATOR
+ *DEBUGGING
+ *SYSTEM_FD_MAX
+ *INPLACE_EDIT
+ *PERLDB
+ *BASETIME
+ *WARNING
+ *EXECUTABLE_NAME
);
# The ground of all being.
# Matching.
- *MATCH = \$& ;
- *PREMATCH = \$` ;
- *POSTMATCH = \$' ;
- *LAST_PAREN_MATCH = \$+ ;
+ *MATCH = *& ;
+ *PREMATCH = *` ;
+ *POSTMATCH = *' ;
+ *LAST_PAREN_MATCH = *+ ;
# Input.
- *INPUT_LINE_NUMBER = \$. ;
- *NR = \$. ;
- *INPUT_RECORD_SEPARATOR = \$/ ;
- *RS = \$/ ;
+ *INPUT_LINE_NUMBER = *. ;
+ *NR = *. ;
+ *INPUT_RECORD_SEPARATOR = */ ;
+ *RS = */ ;
# Output.
- *OUTPUT_AUTOFLUSH = \$| ;
- *OUTPUT_FIELD_SEPARATOR = \$, ;
- *OFS = \$, ;
- *OUTPUT_RECORD_SEPARATOR = \$\ ;
- *ORS = \$\ ;
+ *OUTPUT_AUTOFLUSH = *| ;
+ *OUTPUT_FIELD_SEPARATOR = *, ;
+ *OFS = *, ;
+ *OUTPUT_RECORD_SEPARATOR = *\ ;
+ *ORS = *\ ;
# Interpolation "constants".
- *LIST_SEPARATOR = \$" ;
- *SUBSCRIPT_SEPARATOR = \$; ;
- *SUBSEP = \$; ;
+ *LIST_SEPARATOR = *" ;
+ *SUBSCRIPT_SEPARATOR = *; ;
+ *SUBSEP = *; ;
# Formats
- *FORMAT_PAGE_NUMBER = \$% ;
- *FORMAT_LINES_PER_PAGE = \$= ;
- *FORMAT_LINES_LEFT = \$- ;
- *FORMAT_NAME = \$~ ;
- *FORMAT_TOP_NAME = \$^ ;
- *FORMAT_LINE_BREAK_CHARACTERS = \$: ;
- *FORMAT_FORMFEED = \$^L ;
+ *FORMAT_PAGE_NUMBER = *% ;
+ *FORMAT_LINES_PER_PAGE = *= ;
+ *FORMAT_LINES_LEFT = *- ;
+ *FORMAT_NAME = *~ ;
+ *FORMAT_TOP_NAME = *^ ;
+ *FORMAT_LINE_BREAK_CHARACTERS = *: ;
+ *FORMAT_FORMFEED = *^L ;
# Error status.
- *CHILD_ERROR = \$? ;
- *OS_ERROR = \$! ;
- *ERRNO = \$! ;
- *EVAL_ERROR = \$@ ;
+ *CHILD_ERROR = *? ;
+ *OS_ERROR = *! ;
+ *ERRNO = *! ;
+ *EVAL_ERROR = *@ ;
# Process info.
- *PROCESS_ID = \$$ ;
- *PID = \$$ ;
- *REAL_USER_ID = \$< ;
- *UID = \$< ;
- *EFFECTIVE_USER_ID = \$> ;
- *EUID = \$> ;
- *REAL_GROUP_ID = \$( ;
- *GID = \$( ;
- *EFFECTIVE_GROUP_ID = \$) ;
- *EGID = \$) ;
- *PROGRAM_NAME = \$0 ;
+ *PROCESS_ID = *$ ;
+ *PID = *$ ;
+ *REAL_USER_ID = *< ;
+ *UID = *< ;
+ *EFFECTIVE_USER_ID = *> ;
+ *EUID = *> ;
+ *REAL_GROUP_ID = *( ;
+ *GID = *( ;
+ *EFFECTIVE_GROUP_ID = *) ;
+ *EGID = *) ;
+ *PROGRAM_NAME = *0 ;
# Internals.
- *PERL_VERSION = \$] ;
- *ACCUMULATOR = \$^A ;
- *DEBUGGING = \$^D ;
- *SYSTEM_FD_MAX = \$^F ;
- *INPLACE_EDIT = \$^I ;
- *PERLDB = \$^P ;
- *BASETIME = \$^T ;
- *WARNING = \$^W ;
- *EXECUTABLE_NAME = \$^X ;
+ *PERL_VERSION = *] ;
+ *ACCUMULATOR = *^A ;
+ *DEBUGGING = *^D ;
+ *SYSTEM_FD_MAX = *^F ;
+ *INPLACE_EDIT = *^I ;
+ *PERLDB = *^P ;
+ *BASETIME = *^T ;
+ *WARNING = *^W ;
+ *EXECUTABLE_NAME = *^X ;
# Deprecated.
-# *ARRAY_BASE = \$[ ;
-# *OFMT = \$# ;
-# *MULTILINE_MATCHING = \$* ;
+# *ARRAY_BASE = *[ ;
+# *OFMT = *# ;
+# *MULTILINE_MATCHING = ** ;
1;
package Exporter;
-require 5.000;
+=head1 Comments
+
+If the first entry in an import list begins with /, ! or : then
+treat the list as a series of specifications which either add to
+or delete from the list of names to import. They are processed
+left to right. Specifications are in the form:
+
+ [!]/pattern/ All names in @EXPORT and @EXPORT_OK which match
+ [!]name This name only
+ [!]:tag All names in $EXPORT_TAGS{":tag"}
+ [!]:DEFAULT All names in @EXPORT
+
+e.g., Foo.pm defines:
+
+ @EXPORT = qw(A1 A2 A3 A4 A5);
+ @EXPORT_OK = qw(B1 B2 B3 B4 B5);
+ %EXPORT_TAGS = (':T1' => [qw(A1 A2 B1 B2)], ':T2' => [qw(A1 A2 B3 B4)]);
+
+ Note that you cannot use tags in @EXPORT or @EXPORT_OK.
+ Names in EXPORT_TAGS must also appear in @EXPORT or @EXPORT_OK.
+
+Application says:
+
+ use Module qw(:T2 !B3 A3);
+ use Socket qw(!/^[AP]F_/ !SOMAXCONN !SOL_SOCKET);
+ use POSIX qw(/^S_/ acos asin atan /^E/ !/^EXIT/);
+
+=cut
+
+require 5.001;
$ExportLevel = 0;
+$Verbose = 0;
+
+require Carp;
sub export {
- my $pack = shift;
- my $callpack = shift;
+
+ # First make import warnings look like they're coming from the "use".
+ local $SIG{__WARN__} = sub {
+ my $text = shift;
+ $text =~ s/ at \S*Exporter.pm line \d+.\n//;
+ local $Carp::CarpLevel = 1; # ignore package calling us too.
+ Carp::carp($text);
+ };
+
+ my $pkg = shift;
+ my $callpkg = shift;
my @imports = @_;
- *exports = \@{"${pack}::EXPORT"};
+ my($type, $sym);
+ *exports = \@{"${pkg}::EXPORT"};
if (@imports) {
my $oops;
- my $type;
- *exports = \%{"${pack}::EXPORT"};
+ *exports = \%{"${pkg}::EXPORT"};
if (!%exports) {
grep(s/^&//, @exports);
@exports{@exports} = (1) x @exports;
- foreach $extra (@{"${pack}::EXPORT_OK"}) {
+ foreach $extra (@{"${pkg}::EXPORT_OK"}) {
$exports{$extra} = 1;
}
}
+
+ if ($imports[0] =~ m#^[/!:]#){
+ my(@allexports) = keys %exports;
+ my $tagsref = \%{"${pkg}::EXPORT_TAGS"};
+ my $tagdata;
+ my %imports;
+ # negated first item implies starting with default set:
+ unshift(@imports, ':DEFAULT') if $imports[0] =~ m/^!/;
+ foreach (@imports){
+ my(@names);
+ my($mode,$spec) = m/^(!)?(.*)/;
+ $mode = '+' unless defined $mode;
+
+ @names = ($spec); # default, maybe overridden below
+
+ if ($spec =~ m:^/(.*)/$:){
+ my $patn = $1;
+ @names = grep(/$patn/, @allexports); # XXX anchor by default?
+ }
+ elsif ($spec =~ m#^:(.*)# and $tagsref){
+ if ($1 eq 'DEFAULT'){
+ @names = @exports;
+ }
+ elsif ($tagsref and $tagdata = $tagsref->{$1}) {
+ @names = @$tagdata;
+ }
+ }
+
+ warn "Import Mode $mode, Spec $spec, Names @names\n" if $Verbose;
+ if ($mode eq '!') {
+ map {delete $imports{$_}} @names; # delete @imports{@names} would be handy :-)
+ }
+ else {
+ @imports{@names} = (1) x @names;
+ }
+ }
+ @imports = keys %imports;
+ }
+
foreach $sym (@imports) {
if (!$exports{$sym}) {
if ($sym !~ s/^&// || !$exports{$sym}) {
- warn qq["$sym" is not exported by the $pack module ],
+ warn qq["$sym" is not exported by the $pkg module ],
"at $callfile line $callline\n";
$oops++;
next;
else {
@imports = @exports;
}
+ warn "Importing from $pkg into $callpkg: ",
+ join(", ",@imports),"\n" if ($Verbose && @imports);
foreach $sym (@imports) {
$type = '&';
$type = $1 if $sym =~ s/^(\W)//;
- *{"${callpack}::$sym"} =
- $type eq '&' ? \&{"${pack}::$sym"} :
- $type eq '$' ? \${"${pack}::$sym"} :
- $type eq '@' ? \@{"${pack}::$sym"} :
- $type eq '%' ? \%{"${pack}::$sym"} :
- $type eq '*' ? *{"${pack}::$sym"} :
+ *{"${callpkg}::$sym"} =
+ $type eq '&' ? \&{"${pkg}::$sym"} :
+ $type eq '$' ? \${"${pkg}::$sym"} :
+ $type eq '@' ? \@{"${pkg}::$sym"} :
+ $type eq '%' ? \%{"${pkg}::$sym"} :
+ $type eq '*' ? *{"${pkg}::$sym"} :
warn "Can't export symbol: $type$sym\n";
}
};
sub import {
- local ($callpack, $callfile, $callline) = caller($ExportLevel);
- my $pack = shift;
- export $pack, $callpack, @_;
+ local ($callpkg, $callfile, $callline) = caller($ExportLevel);
+ my $pkg = shift;
+ export $pkg, $callpkg, @_;
+}
+
+sub export_tags {
+ my ($pkg) = caller;
+ *tags = \%{"${pkg}::EXPORT_TAGS"};
+ push(@{"${pkg}::EXPORT"},
+ map {$tags{$_} ? @{$tags{$_}} : $_} @_ ? @_ : keys %tags);
}
1;
$hint=(reverse sort @goodhints)[0];
# execute the hintsfile:
- eval `cat hints/$hint.pl`;
+ open HINTS, "hints/$hint.pl";
+ @goodhints = <HINTS>;
+ close HINTS;
+ eval join('',@goodhints);
}
# Setup dummy package:
@Other_Att_Keys{qw(EXTRALIBS BSLOADLIBS LDLOADLIBS)} = (1) x 3;
if ($Is_VMS = $Config{'osname'} eq 'VMS') {
- require File::VMSspec;
- import File::VMSspec 'vmsify';
+ require VMS::Filespec;
+ import VMS::Filespec 'vmsify';
}
}
$att{INST_EXE} = "./blib" unless $att{INST_EXE};
$att{MAP_TARGET} = "perl" unless $att{MAP_TARGET};
- $att{LIBPERL_A} = 'libperl.a' unless $att{LIBPERL_A};
+ $att{LIBPERL_A} = $Is_VMS ? 'libperl.olb' : 'libperl.a'
+ unless $att{LIBPERL_A};
}
# make a few simple checks
foreach $dir (@$dirs){
next unless defined $dir; # $att{PERL_SRC} may be undefined
foreach $name (@$names){
- print "checking $dir/$name" if ($trace >= 2);
+ print "Checking $dir/$name " if ($trace >= 2);
if ($Is_VMS) {
$name .= ".exe" unless -x "$dir/$name";
}
if (@fullname=<${thispth}/lib${thislib}.${so}.[0-9]*>){
$fullname=$fullname[-1]; #ATTN: 10 looses against 9!
} elsif (-f ($fullname="$thispth/lib$thislib.$so")
- && (($Config{'dlsrc'} ne "dl_dld") || ($thislib eq "m"))){
+ && (($Config{'dlsrc'} ne "dl_dld.xs") || ($thislib eq "m"))){
} elsif (-f ($fullname="$thispth/lib${thislib}_s.a")
&& ($thislib .= "_s") ){ # we must explicitly ask for _s version
} elsif (-f ($fullname="$thispth/lib$thislib.a")){
}
@ARGV == 1 or die $usage;
chop($pwd = `pwd`);
+# Check for error message from VMS
+if ($pwd =~ /unrecognized command verb/) { $Is_VMS = 1; $pwd = $ENV{DEFAULT} }
($dir, $filename) = @ARGV[0] =~ m#(.*)/(.*)#
or ($dir, $filename) = @ARGV[0] =~ m#(.*[>\]])(.*)#
or ($dir, $filename) = ('.', $ARGV[0]);
foreach $typemap (@tm) {
die "Can't find $typemap in $pwd\n" unless -r $typemap;
}
-unshift @tm, qw(../../../typemap ../../typemap ../typemap typemap);
+unshift @tm, qw(../../../../lib/ExtUtils/typemap ../../../lib/ExtUtils/typemap
+ ../../lib/ExtUtils/typemap ../../../typemap ../../typemap
+ ../typemap typemap);
foreach $typemap (@tm) {
open(TYPEMAP, $typemap) || next;
$mode = Typemap;
$_ = shift(@line);
last if /^\s*NOT_IMPLEMENTED_YET/;
last if /^\s*(PPCODE|CODE|OUTPUT|CLEANUP|CASE)\s*:/;
- # Catch common error. Much more error checking required here.
- blurt("Error: no tab in $pname argument declaration '$_'\n")
- unless (m/\S+\s*\t\s*\S+/);
($var_type, $var_name, $var_init) =
/\s*([^\t]+)\s*([^\s=]+)\s*(=.*)?/;
+ # Catch common errors. More error checking required here.
+ blurt("Error: no tab in $pname argument declaration '$_'\n")
+ unless (m/\S+\s*\t\s*\S+/);
+ # catch C style argument declaration (this could be made alowable syntax)
+ warn("Warning: ignored semicolon in $pname argument declaration '$_'\n")
+ if ($var_name =~ s/;//g); # eg SV *<tab>name;
+ # catch many errors similar to: SV<tab>* name
+ blurt("Error: invalid $pname argument name '$var_name' (type '$var_type')\n")
+ unless ($var_name =~ m/^&?\w+$/);
if ($var_name =~ /^&/) {
$var_name =~ s/^&//;
$var_addr{$var_name} = 1;
local($ntype);
local($tk);
- blurt("$type not in typemap"), return unless defined($type_kind{$type});
+ blurt("'$type' not in typemap"), return unless defined($type_kind{$type});
($ntype = $type) =~ s/\s*\*/Ptr/g;
$subtype = $ntype;
$subtype =~ s/Ptr$//;
if ($type =~ /^array\(([^,]*),(.*)\)/) {
print "\tsv_setpvn($arg, (char *)$var, $2 * sizeof($1)), XFree((char *)$var);\n";
} else {
- blurt("$type not in typemap"), return
+ blurt("'$type' not in typemap"), return
unless defined($type_kind{$type});
($ntype = $type) =~ s/\s*\*/Ptr/g;
$ntype =~ s/\(\)//g;
}
}
-exit $errors;
+# If this is VMS, the exit status has meaning to the shell, so we
+# use a predictable value (SS$_Abort) rather than an arbitrary
+# number.
+exit $Is_VMS ? 44 : $errors;
use Config;
require Exporter;
@ISA = qw(Exporter);
-@EXPORT = qw(fileparse set_fileparse_fstype basename dirname);
+@EXPORT = qw(fileparse fileparse_set_fstype basename dirname);
# fileparse_set_fstype() - specify OS-based rules used in future
# calls to routines in this package
# Any other name uses Unix-style rules
sub fileparse_set_fstype {
- $Fileparse_fstype = $_[0];
+ my($old) = $Fileparse_fstype;
+ $Fileparse_fstype = $_[0] if $_[0];
+ $old;
}
# fileparse() - parse file specification
# ($base,$path,$type) = fileparse('/virgil/aeneid/draft.book7',
# '\.book\d+');
# would yield $base == 'draft',
-# $path == '/virgil/aeneid', and
+# $path == '/virgil/aeneid/' (note trailing slash)
# $tail == '.book7'.
# Similarly, on a system running VMS,
# ($name,$dir,$type) = fileparse('Doc_Root:[Help]Rhetoric.Rnh','\..*');
if ($fullname =~ m#/#) { $fstype = '' } # We're doing Unix emulation
else {
($dirpath,$basename) = ($fullname =~ /(.*[:>\]])?(.*)/);
- $dirpath = $ENV{'PATH'} unless $dirpath;
+ $dirpath = $ENV{'DEFAULT'} unless $dirpath;
}
}
if ($fstype =~ /^MSDOS/i) {
elsif ($fstype =~ /^MAC/i) {
($dirpath,$basename) = ($fullname =~ /(.*:)?(.*)/);
}
- else { # default to Unix
+ elsif ($fstype !~ /^VMS/i) { # default to Unix
($dirpath,$basename) = ($fullname =~ m#(.*/)?(.*)#);
$dirpath = '.' unless $dirpath;
}
}
}
- ($basename,$dirpath,$tail);
+ wantarray ? ($basename,$dirpath,$tail) : $basename;
}
# basename() - returns first element of list returned by fileparse()
sub basename {
- (fileparse(@_))[0];
+ my($name) = shift;
+ (fileparse($name, map("\Q$_\E",@_)))[0];
}
# dirname() - returns device and directory portion of file specification
# Behavior matches that of Unix dirname(1) exactly for Unix and MSDOS
-# filespecs. This differs from the second element of the list returned
+# filespecs except for names ending with a separator, e.g., "/xx/yy/".
+# This differs from the second element of the list returned
# by fileparse() in that the trailing '/' (Unix) or '\' (MSDOS) (and
# the last directory name if the filespec ends in a '/' or '\'), is lost.
my($fstype) = $Fileparse_fstype;
if ($fstype =~ /VMS/i) {
- if (m#/#) { $fstype = '' }
+ if ($_[0] =~ m#/#) { $fstype = '' }
else { return $dirname }
}
if ($fstype =~ /MacOS/i) { return $dirname }
elsif ($fstype =~ /MSDOS/i) {
if ( $dirname =~ /:\\$/) { return $dirname }
chop $dirname;
- $dirname =~ s:[^/]+$:: unless $basename;
+ $dirname =~ s:[^\\]+$:: unless $basename;
$dirname = '.' unless $dirname;
}
else {
$mess =~ s/ does not / should not / ||
$mess =~ s/ not / /;
}
- print stderr $mess,"\n";
+ print STDERR $mess,"\n";
}
else {
$this =~ s/\$file/'$file'/g;
- print stderr "Can't do $this.\n";
+ print STDERR "Can't do $this.\n";
}
if ($disposition eq 'die') { exit 1; }
++$warnings;
package File::Find;
require 5.000;
require Exporter;
+use Config;
+use Cwd;
+use File::Basename;
@ISA = qw(Exporter);
-@EXPORT = qw(find finddepth);
+@EXPORT = qw(find finddepth $name $dir);
# Usage:
# use File::Find;
sub find {
my $wanted = shift;
- chop($cwd = `pwd`);
+ my $cwd = fastcwd();
foreach $topdir (@_) {
(($topdev,$topino,$topmode,$topnlink) = stat($topdir))
|| (warn("Can't stat $topdir: $!\n"), next);
$name = $topdir;
&$wanted;
($fixtopdir = $topdir) =~ s,/$,, ;
+ $fixtopdir =~ s/\.dir$// if $Is_VMS; ;
&finddir($wanted,$fixtopdir,$topnlink);
}
else {
}
}
else {
- unless (($dir,$_) = $topdir =~ m#^(.*/)(.*)$#) {
+ unless (($dir,$_) = fileparse($topdir)) {
($dir,$_) = ('.', $topdir);
}
$name = $topdir;
# Get link count and check for directoriness.
- ($dev,$ino,$mode,$nlink) = lstat($_) unless $nlink;
+ ($dev,$ino,$mode,$nlink) = ($Is_VMS ? stat($_) : lstat($_))
+ unless ($nlink || $dont_use_nlink);
if (-d _) {
# It really is a directory, so do it recursively.
if (!$prune && chdir $_) {
+ $name =~ s/\.dir$// if $Is_VMS;
&finddir($wanted,$name,$nlink);
chdir '..';
}
sub finddepth {
my $wanted = shift;
- chop($cwd = `pwd`);
+ $cwd = fastcwd();;
foreach $topdir (@_) {
(($topdev,$topino,$topmode,$topnlink) = stat($topdir))
|| (warn("Can't stat $topdir: $!\n"), next);
if (-d _) {
if (chdir($topdir)) {
($fixtopdir = $topdir) =~ s,/$,, ;
+ $fixtopdir =~ s/\.dir$// if $Is_VMS;
&finddepthdir($wanted,$fixtopdir,$topnlink);
($dir,$_) = ($fixtopdir,'.');
$name = $fixtopdir;
}
}
else {
- unless (($dir,$_) = $topdir =~ m#^(.*/)(.*)$#) {
+ unless (($dir,$_) = fileparse($topdir)) {
($dir,$_) = ('.', $topdir);
}
chdir $dir && &$wanted;
my(@filenames) = readdir(DIR);
closedir(DIR);
- if ($nlink == 2) { # This dir has no subdirectories.
+ if ($nlink == 2 && !$dont_use_nlink) { # This dir has no subdirectories.
for (@filenames) {
next if $_ eq '.';
next if $_ eq '..';
next if $_ eq '..';
$nlink = $prune = 0;
$name = "$dir/$_";
- if ($subcount > 0) { # Seen all the subdirs?
+ if ($subcount > 0 || $dont_use_nlink) { # Seen all the subdirs?
# Get link count and check for directoriness.
- ($dev,$ino,$mode,$nlink) = lstat($_) unless $nlink;
+ ($dev,$ino,$mode,$nlink) = ($Is_VMS ? stat($_) : lstat($_));
if (-d _) {
# It really is a directory, so do it recursively.
if (!$prune && chdir $_) {
+ $name =~ s/\.dir$// if $Is_VMS;
&finddepthdir($wanted,$name,$nlink);
chdir '..';
}
}
}
+if ($Config{'osname'} eq 'VMS') {
+ $Is_VMS = 1;
+ $dont_use_nlink = 1;
+}
+
1;
=item *
a boolean value, which if TRUE will cause C<rmtree> to
-print a message each time it tries to delete a file,
-giving the name of the file, and indicating whether
-it's using C<rmdir> or C<unlink> to remove it.
+print a message each time it examines a file, giving the
+name of the file, and indicating whether it's using C<rmdir>
+or C<unlink> to remove it, or that it's skipping it.
(defaults to FALSE)
=item *
a boolean value, which if TRUE will cause C<rmtree> to
-skip any files to which you do not have write access.
-This will change in the future when a criterion for
-'delete permission' is settled. (defaults to FALSE)
+skip any files to which you do not have delete access
+(if running under VMS) or write access (if running
+under another OS). This will change in the future when
+a criterion for 'delete permission' under OSs other
+than VMS is settled. (defaults to FALSE)
=back
=head1 REVISION
-This document was last revised 29-Jan-1995, for perl 5.001
+This document was last revised 08-Mar-1995, for perl 5.001
=cut
@ISA = qw( Exporter );
@EXPORT = qw( mkpath rmtree );
+$Is_VMS = $Config{'osname'} eq 'VMS';
+
sub mkpath{
my($paths, $verbose, $mode) = @_;
# $paths -- either a path string or ref to list of paths
$paths = [$paths] unless ref $paths;
my(@created);
foreach $path (@$paths){
- next if -d $path;
+ next if -d $path;
my(@p);
foreach(split(/\//, $path)){
push(@p, $_);
$root =~ s#/$##;
if (-d $root) {
opendir(D,$root);
+ $root =~ s#\.dir$## if $Is_VMS;
@files = map("$root/$_", grep $_!~/^\.{1,2}$/, readdir(D));
closedir(D);
$count += rmtree(\@files,$verbose,$safe);
- next if ($safe && !(-w $root));
+ if ($safe &&
+ ($Is_VMS ? !&VMS::Filespec::candelete($root) : !-w $root)) {
+ print "skipped $root\n" if $verbose;
+ next;
+ }
print "rmdir $root\n" if $verbose;
(rmdir $root && ++$count) or carp "Can't remove directory $root: $!";
}
else {
- next if ($safe && !(-w $root));
+ if ($safe &&
+ ($Is_VMS ? !&VMS::Filespec::candelete($root) : !-w $root)) {
+ print "skipped $root\n" if $verbose;
+ next;
+ }
print "unlink $root\n" if $verbose;
(unlink($root) && ++$count) or carp "Can't unlink file $root: $!";
}
%OVERLOAD = (
# Anonymous subroutines:
-'+' => sub {new BigInt &badd},
-'-' => sub {new BigInt
+'+' => sub {new Math::BigInt &badd},
+'-' => sub {new Math::BigInt
$_[2]? bsub($_[1],${$_[0]}) : bsub(${$_[0]},$_[1])},
-'<=>' => sub {new BigInt
+'<=>' => sub {new Math::BigInt
$_[2]? bcmp($_[1],${$_[0]}) : bcmp(${$_[0]},$_[1])},
-'cmp' => sub {new BigInt
+'cmp' => sub {new Math::BigInt
$_[2]? ($_[1] cmp ${$_[0]}) : (${$_[0]} cmp $_[1])},
-'*' => sub {new BigInt &bmul},
-'/' => sub {new BigInt
+'*' => sub {new Math::BigInt &bmul},
+'/' => sub {new Math::BigInt
$_[2]? scalar bdiv($_[1],${$_[0]}) :
scalar bdiv(${$_[0]},$_[1])},
-'%' => sub {new BigInt
+'%' => sub {new Math::BigInt
$_[2]? bmod($_[1],${$_[0]}) : bmod(${$_[0]},$_[1])},
-'**' => sub {new BigInt
+'**' => sub {new Math::BigInt
$_[2]? bpow($_[1],${$_[0]}) : bpow(${$_[0]},$_[1])},
-'neg' => sub {new BigInt &bneg},
-'abs' => sub {new BigInt &babs},
+'neg' => sub {new Math::BigInt &bneg},
+'abs' => sub {new Math::BigInt &babs},
qw(
"" stringify
0+ numify) # Order of arguments unsignificant
);
+$NaNOK=1;
+
sub new {
my $foo = bnorm($_[1]);
- die "Not a number initialized to BigInt" if $foo eq "NaN";
+ die "Not a number initialized to Math::BigInt" if !$NaNOK && $foo eq "NaN";
bless \$foo;
}
sub stringify { "${$_[0]}" }
--- /dev/null
+package SubstrHash;
+use Carp;
+
+sub TIEHASH {
+ my $pack = shift;
+ my ($klen, $vlen, $tsize) = @_;
+ my $rlen = 1 + $klen + $vlen;
+ $tsize = findprime($tsize * 1.1); # Allow 10% empty.
+ $self = bless ["\0", $klen, $vlen, $tsize, $rlen, 0, -1];
+ $$self[0] x= $rlen * $tsize;
+ $self;
+}
+
+sub FETCH {
+ local($self,$key) = @_;
+ local($klen, $vlen, $tsize, $rlen) = @$self[1..4];
+ &hashkey;
+ for (;;) {
+ $offset = $hash * $rlen;
+ $record = substr($$self[0], $offset, $rlen);
+ if (ord($record) == 0) {
+ return undef;
+ }
+ elsif (ord($record) == 1) {
+ }
+ elsif (substr($record, 1, $klen) eq $key) {
+ return substr($record, 1+$klen, $vlen);
+ }
+ &rehash;
+ }
+}
+
+sub STORE {
+ local($self,$key,$val) = @_;
+ local($klen, $vlen, $tsize, $rlen) = @$self[1..4];
+ croak("Table is full") if $self[5] == $tsize;
+ croak(qq/Value "$val" is not $vlen characters long./)
+ if length($val) != $vlen;
+ my $writeoffset;
+
+ &hashkey;
+ for (;;) {
+ $offset = $hash * $rlen;
+ $record = substr($$self[0], $offset, $rlen);
+ if (ord($record) == 0) {
+ $record = "\2". $key . $val;
+ die "panic" unless length($record) == $rlen;
+ $writeoffset = $offset unless defined $writeoffset;
+ substr($$self[0], $writeoffset, $rlen) = $record;
+ ++$$self[5];
+ return;
+ }
+ elsif (ord($record) == 1) {
+ $writeoffset = $offset unless defined $writeoffset;
+ }
+ elsif (substr($record, 1, $klen) eq $key) {
+ $record = "\2". $key . $val;
+ die "panic" unless length($record) == $rlen;
+ substr($$self[0], $offset, $rlen) = $record;
+ return;
+ }
+ &rehash;
+ }
+}
+
+sub DELETE {
+ local($self,$key) = @_;
+ local($klen, $vlen, $tsize, $rlen) = @$self[1..4];
+ &hashkey;
+ for (;;) {
+ $offset = $hash * $rlen;
+ $record = substr($$self[0], $offset, $rlen);
+ if (ord($record) == 0) {
+ return undef;
+ }
+ elsif (ord($record) == 1) {
+ }
+ elsif (substr($record, 1, $klen) eq $key) {
+ substr($$self[0], $offset, 1) = "\1";
+ return substr($record, 1+$klen, $vlen);
+ --$$self[5];
+ }
+ &rehash;
+ }
+}
+
+sub FIRSTKEY {
+ local($self) = @_;
+ $$self[6] = -1;
+ &NEXTKEY;
+}
+
+sub NEXTKEY {
+ local($self) = @_;
+ local($klen, $vlen, $tsize, $rlen, $entries, $iterix) = @$self[1..6];
+ for (++$iterix; $iterix < $tsize; ++$iterix) {
+ next unless substr($$self[0], $iterix * $rlen, 1) eq "\2";
+ $$self[6] = $iterix;
+ return substr($$self[0], $iterix * $rlen + 1, $klen);
+ }
+ $$self[6] = -1;
+ undef;
+}
+
+sub hashkey {
+ croak(qq/Key "$key" is not $klen characters long.\n/)
+ if length($key) != $klen;
+ $hash = 2;
+ for (unpack('C*', $key)) {
+ $hash = $hash * 33 + $_;
+ }
+ $hash = $hash - int($hash / $tsize) * $tsize
+ if $hash >= $tsize;
+ $hash = 1 unless $hash;
+ $hashbase = $hash;
+}
+
+sub rehash {
+ $hash += $hashbase;
+ $hash -= $tsize if $hash >= $tsize;
+}
+
+sub findprime {
+ use integer;
+
+ my $num = shift;
+ $num++ unless $num % 2;
+
+ $max = int sqrt $num;
+
+ NUM:
+ for (;; $num += 2) {
+ for ($i = 3; $i <= $max; $i += 2) {
+ next NUM unless $num % $i;
+ }
+ return $num;
+ }
+}
+
+1;
local($name) = @_;
$name =~ y/a-z/A-Z/;
$name = "LOG_$name" unless $name =~ /^LOG_/;
- $name = "syslog'$name";
+ $name = "Sys::Syslog::$name";
eval(&$name) || -1;
}
+# Term::Cap.pm -- Termcap interface routines
package Term::Cap;
-require 5.000;
-require Exporter;
-use Carp;
-@ISA = qw(Exporter);
-@EXPORT = qw(&Tgetent &Tputs &Tgoto $ispeed $ospeed %TC);
-
-# $RCSfile: termcap.pl,v $$Revision: 4.1 $$Date: 92/08/07 18:24:16 $
+# Converted to package on 25 Feb 1994 <sanders@bsdi.com>
#
# Usage:
# require 'ioctl.pl';
-# ioctl(TTY,$TIOCGETP,$foo);
-# ($ispeed,$ospeed) = unpack('cc',$foo);
-# use Termcap;
-# &Tgetent('vt100'); # sets $TC{'cm'}, etc.
-# &Tputs(&Tgoto($TC{'cm'},$col,$row), 0, 'FILEHANDLE');
-# &Tputs($TC{'dl'},$affcnt,'FILEHANDLE');
+# ioctl(TTY,$TIOCGETP,$sgtty);
+# ($ispeed,$ospeed) = unpack('cc',$sgtty);
+#
+# require Term::Cap;
+#
+# $term = Tgetent Term::Cap { TERM => undef, OSPEED => $ospeed };
+# sets $term->{'_cm'}, etc.
+# $this->Trequire(qw/ce ku kd/);
+# die unless entries are defined for the terminal
+# $term->Tgoto('cm', $col, $row, $FH);
+# $term->Tputs('dl', $cnt = 1, $FH);
+# $this->Tpad($string, $cnt = 1, $FH);
+# processes a termcap string and adds padding if needed
+# if $FH is undefined these just return the string
+#
+# CHANGES:
+# Converted to package
+# Allows :tc=...: in $ENV{'TERMCAP'} (flows to default termcap file)
+# Now die's properly if it can't open $TERMCAP or if the eval $loop fails
+# Tputs() results are cached (use Tgoto or Tpad to avoid)
+# Tgoto() will do output if $FH is passed (like Tputs without caching)
+# Supports POSIX termios speeds and old style speeds
+# Searches termcaps properly (TERMPATH, etc)
+# The output routines are optimized for cached Tputs().
+# $this->{_xx} is the raw termcap data and $this->{xx} is a
+# cached and padded string for count == 1.
#
-sub Tgetent {
- local($TERM) = @_;
- local($TERMCAP,$_,$entry,$loop,$field);
- warn "Tgetent: no ospeed set" unless $ospeed;
- foreach $key (keys(%TC)) {
- delete $TC{$key};
+# internal routines
+sub getenv { defined $ENV{$_[0]} ? $ENV{$_[0]} : ''; }
+sub termcap_path {
+ local @termcap_path = ('/etc/termcap', '/usr/share/misc/termcap');
+ local $v;
+ if ($v = getenv(TERMPATH)) {
+ # user specified path
+ @termcap_path = split(':', $v);
+ } else {
+ # default path
+ @termcap_path = ('/etc/termcap', '/usr/share/misc/termcap');
+ $v = getenv(HOME);
+ unshift(@termcap_path, $v . '/.termcap') if $v;
}
- $TERM = $ENV{'TERM'} unless $TERM;
- $TERM =~ s/(\W)/\\$1/g;
- $TERMCAP = $ENV{'TERMCAP'};
- $TERMCAP = '/etc/termcap' unless $TERMCAP;
- if ($TERMCAP !~ m:^/:) {
- if ($TERMCAP !~ /(^|\|)$TERM[:\|]/) {
- $TERMCAP = '/etc/termcap';
- }
- }
- if ($TERMCAP =~ m:^/:) {
- $entry = '';
+ # we always search TERMCAP first
+ $v = getenv(TERMCAP);
+ unshift(@termcap_path, $v) if $v =~ /^\//;
+ grep(-f, @termcap_path);
+}
+
+sub Tgetent {
+ local($type) = shift;
+ local($this) = @_;
+ local($TERM,$TERMCAP,$term,$entry,$cap,$loop,$field,$entry,$_);
+
+ warn "Tgetent: no ospeed set\n" unless $this->{OSPEED} > 0;
+ $this->{DECR} = 10000 / $this->{OSPEED} if $this->{OSPEED} > 50;
+ $term = $TERM = $this->{TERM} =
+ $this->{TERM} || getenv(TERM) || die "Tgetent: TERM not set\n";
+
+ $TERMCAP = getenv(TERMCAP);
+ $TERMCAP = '' if $TERMCAP =~ m:^/: || $TERMCAP !~ /(^|\|)$TERM[:\|]/;
+ local @termcap_path = &termcap_path;
+ die "Tgetent: Can't find a valid termcap file\n"
+ unless @termcap_path || $TERMCAP;
+
+ # handle environment TERMCAP, setup for continuation if needed
+ $entry = $TERMCAP;
+ $entry =~ s/:tc=([^:]+):/:/ && ($TERM = $1);
+ if ($TERMCAP eq '' || $1) { # the search goes on
+ local $first = $TERMCAP eq '' ? 1 : 0; # make it pretty
+ local $max = 32; # max :tc=...:'s
+ local $state = 1; # 0 == finished
+ # 1 == next file
+ # 2 == search again
do {
+ if ($state == 1) {
+ $TERMCAP = shift @termcap_path
+ || die "Tgetent: failed lookup on $TERM\n";
+ } else {
+ $max-- || die "Tgetent: termcap loop at $TERM\n";
+ $state = 1; # back to default state
+ }
+
+ open(TERMCAP,"< $TERMCAP\0") || die "Tgetent: $TERMCAP: $!\n";
+ # print STDERR "Trying... $TERMCAP\n";
$loop = "
- open(TERMCAP,'<$TERMCAP') || croak \"Can't open $TERMCAP\";
- while (<TERMCAP>) {
- next if /^#/;
- next if /^\t/;
- if (/(^|\\|)${TERM}[:\\|]/) {
- chop;
- while (chop eq '\\\\') {
- \$_ .= <TERMCAP>;
+ while (<TERMCAP>) {
+ next if /^\t/;
+ next if /^#/;
+ if (/(^|\\|)${TERM}[:\\|]/) {
chop;
+ s/^[^:]*:// unless \$first++;
+ \$state = 0;
+ while (chop eq '\\\\') {
+ \$_ .= <TERMCAP>;
+ chop;
+ }
+ \$_ .= ':';
+ last;
}
- \$_ .= ':';
- last;
}
- }
- close TERMCAP;
- \$entry .= \$_;
+ \$entry .= \$_;
";
eval $loop;
- } while s/:tc=([^:]+):/:/ && ($TERM = $1);
- $TERMCAP = $entry;
+ die $@ if $@;
+ #print STDERR "$TERM: $_\n--------\n"; # DEBUG
+ close TERMCAP;
+ # If :tc=...: found then search this file again
+ $entry =~ s/:tc=([^:]+):/:/ && ($TERM = $1, $state = 2);
+ } while $state != 0;
}
+ die "Tgetent: Can't find $term\n" unless $entry ne '';
+ $entry =~ s/:\s+:/:/g;
+ $this->{TERMCAP} = $entry;
+ #print STDERR $entry, "\n"; # DEBUG
- foreach $field (split(/:[\s:\\]*/,$TERMCAP)) {
+ # Precompile $entry into the object
+ foreach $field (split(/:[\s:\\]*/,$entry)) {
if ($field =~ /^\w\w$/) {
- $TC{$field} = 1;
+ $this->{'_' . $field} = 1 unless defined $this->{'_' . $1};
+ }
+ elsif ($field =~ /^(\w\w)\@/) {
+ $this->{'_' . $1} = "";
}
elsif ($field =~ /^(\w\w)#(.*)/) {
- $TC{$1} = $2 unless defined $TC{$1};
+ $this->{'_' . $1} = $2 unless defined $this->{'_' . $1};
}
elsif ($field =~ /^(\w\w)=(.*)/) {
- $entry = $1;
+ next if defined $this->{'_' . ($cap = $1)};
$_ = $2;
s/\\E/\033/g;
s/\\(\d\d\d)/pack('c',oct($1) & 0177)/eg;
s/\^(.)/pack('c',ord($1) & 31)/eg;
s/\\(.)/$1/g;
s/\377/^/g;
- $TC{$entry} = $_ unless defined $TC{$entry};
+ $this->{'_' . $cap} = $_;
}
+ # else { warn "Tgetent: junk in $term: $field\n"; }
}
- $TC{'pc'} = "\0" unless defined $TC{'pc'};
- $TC{'bc'} = "\b" unless defined $TC{'bc'};
+ $this->{'_pc'} = "\0" unless defined $this->{'_pc'};
+ $this->{'_bc'} = "\b" unless defined $this->{'_bc'};
+ $this;
}
-@Tputs = (0,200,133.3,90.9,74.3,66.7,50,33.3,16.7,8.3,5.5,4.1,2,1,.5,.2);
+# delays for old style speeds
+@Tpad = (0,200,133.3,90.9,74.3,66.7,50,33.3,16.7,8.3,5.5,4.1,2,1,.5,.2);
+
+# $term->Tpad($string, $cnt, $FH);
+sub Tpad {
+ local($this, $string, $cnt, $FH) = @_;
+ local($decr, $ms);
-sub Tputs {
- local($string,$affcnt,$FH) = @_;
- local($ms);
if ($string =~ /(^[\d.]+)(\*?)(.*)$/) {
$ms = $1;
- $ms *= $affcnt if $2;
+ $ms *= $cnt if $2;
$string = $3;
- $decr = $Tputs[$ospeed];
+ $decr = $this->{OSPEED} < 50 ? $Tpad[$this->{OSPEED}] : $this->{DECR};
if ($decr > .1) {
$ms += $decr / 2;
- $string .= $TC{'pc'} x ($ms / $decr);
+ $string .= $this->{'_pc'} x ($ms / $decr);
}
}
print $FH $string if $FH;
$string;
}
+# $term->Tputs($cap, $cnt, $FH);
+sub Tputs {
+ local($this, $cap, $cnt, $FH) = @_;
+ local $string;
+
+ if ($cnt > 1) {
+ $string = Tpad($this, $this->{'_' . $cap}, $cnt);
+ } else {
+ $string = defined $this->{$cap} ? $this->{$cap} :
+ ($this->{$cap} = Tpad($this, $this->{'_' . $cap}, 1));
+ }
+ print $FH $string if $FH;
+ $string;
+}
+
+# %% output `%'
+# %d output value as in printf %d
+# %2 output value as in printf %2d
+# %3 output value as in printf %3d
+# %. output value as in printf %c
+# %+x add x to value, then do %.
+#
+# %>xy if value > x then add y, no output
+# %r reverse order of two parameters, no output
+# %i increment by one, no output
+# %B BCD (16*(value/10)) + (value%10), no output
+#
+# %n exclusive-or all parameters with 0140 (Datamedia 2500)
+# %D Reverse coding (value - 2*(value%16)), no output (Delta Data)
+#
+# $term->Tgoto($cap, $col, $row, $FH);
sub Tgoto {
- local($string) = shift(@_);
- local($result) = '';
- local($after) = '';
- local($code,$tmp) = @_;
- local(@tmp);
- @tmp = ($tmp,$code);
- local($online) = 0;
+ local($this, $cap, $code, $tmp, $FH) = @_;
+ local $string = $this->{'_' . $cap};
+ local $result = '';
+ local $after = '';
+ local $online = 0;
+ local @tmp = ($tmp,$code);
+ local $cnt = $code;
+
while ($string =~ /^([^%]*)%(.)(.*)/) {
$result .= $1;
$code = $2;
$tmp = shift(@tmp);
if ($tmp == 0 || $tmp == 4 || $tmp == 10) {
if ($online) {
- ++$tmp, $after .= $TC{'up'} if $TC{'up'};
+ ++$tmp, $after .= $this->{'_up'} if $this->{'_up'};
}
else {
- ++$tmp, $after .= $TC{'bc'};
+ ++$tmp, $after .= $this->{'_bc'};
}
}
$result .= sprintf("%c",$tmp);
return "OOPS";
}
}
- $result . $string . $after;
+ $string = Tpad($this, $result . $string . $after, $cnt);
+ print $FH $string if $FH;
+ $string;
+}
+
+# $this->Trequire($cap1, $cap2, ...);
+sub Trequire {
+ local $this = shift;
+ local $_;
+ foreach (@_) {
+ die "Trequire: Terminal does not support: $_\n"
+ unless defined $this->{'_' . $_} && $this->{'_' . $_};
+ }
}
1;
}
}
+# The TieHash::Std package implements standard perl hash behaviour.
+# It exists to act as a base class for classes which only wish to
+# alter some parts of their behaviour.
+
+package TieHash::Std;
+@ISA = qw(TieHash);
+
+sub TIEHASH { bless {}, $_[0] }
+sub STORE { $_[0]->{$_[1]} = $_[2] }
+sub FETCH { $_[0]->{$_[1]} }
+sub FIRSTKEY { my $a = scalar keys %{$_[0]}; each %{$_[0]} }
+sub NEXTKEY { each %{$_[0]} }
+sub EXISTS { exists $_[0]->{$_[1]} }
+sub DELETE { delete $_[0]->{$_[1]} }
+sub CLEAR { %{$_[0]} = () }
+
1;
}
sub panic {
+ package DB;
+
select(STDERR);
print "\npanic: @_\n";
# stack traceback gratefully borrowed from perl debugger
- local($i,$_);
- local($p,$f,$l,$s,$h,$a,@a,@sub);
+ local $_;
+ my $i;
+ my ($p,$f,$l,$s,$h,$a,@a,@frames);
for ($i = 0; ($p,$f,$l,$s,$h,$w) = caller($i); $i++) {
- @a = @DB'args;
+ @a = @args;
for (@a) {
if (/^StB\000/ && length($_) == length($_main{'_main'})) {
$_ = sprintf("%s",$_);
}
$w = $w ? '@ = ' : '$ = ';
$a = $h ? '(' . join(', ', @a) . ')' : '';
- push(@sub, "$w&$s$a from file $f line $l\n");
+ push(@frames, "$w&$s$a from file $f line $l\n");
}
- for ($i=0; $i <= $#sub; $i++) {
- print $sub[$i];
+ for ($i=0; $i <= $#frames; $i++) {
+ print $frames[$i];
}
exit 1;
}