platform/upstream/perl.git
11 years agoOn Win32 run autodoc.pl and pod/perlmodlib.PL using miniperl, not perl.
Nicholas Clark [Tue, 24 Apr 2012 20:48:38 +0000 (22:48 +0200)]
On Win32 run autodoc.pl and pod/perlmodlib.PL using miniperl, not perl.

*nix and VMS both use miniperl to run these two build scripts. This makes
Win32 consistent.

This eliminates the last two uses of the ICWD macro, so eliminate it too.

11 years ago[perl #116975] perlfunc require: fix example subroutine
David Golden [Tue, 9 Jul 2013 01:45:42 +0000 (11:45 +1000)]
[perl #116975] perlfunc require: fix example subroutine

11 years ago[perl #117033] wrong .packlist creation at installation on Cygwin with destdir
Tony Cook [Tue, 9 Jul 2013 00:37:32 +0000 (10:37 +1000)]
[perl #117033] wrong .packlist creation at installation on Cygwin with destdir

11 years agoperldelta template: consistent spaces after dots
Father Chrysostomos [Mon, 8 Jul 2013 20:52:30 +0000 (13:52 -0700)]
perldelta template: consistent spaces after dots

(pod2man or nroff [whichever] treats a dot at the end of a line
as a dot followed by two spaces.)

11 years agoperldelta: consistent spaces after dots
Father Chrysostomos [Mon, 8 Jul 2013 20:51:04 +0000 (13:51 -0700)]
perldelta: consistent spaces after dots

11 years ago[perl #113932] UNIVERSAL::can with globs and globrefs
Father Chrysostomos [Sun, 7 Jul 2013 19:31:00 +0000 (12:31 -0700)]
[perl #113932] UNIVERSAL::can with globs and globrefs

(Also perl #118105.)

This allows *ARGV->can("print") to work as long as IO::Handle is
loaded.  This translates into UNIVERSAL::can(\*ARGV,"print").  This
commit also changes UNIVERSAL::can to accept a plain *ARGV as well.

UNIVERSAL::can("ARGV",...) is left as it is (ARGV is treated as a pack-
age name), because changing that requires a bigger patch, and I don’t
know when I will get to it.

11 years agoperldelta for b2b69a966b47abd2cb4c320da60619b27c6c8abf
Chris 'BinGOs' Williams [Mon, 8 Jul 2013 19:46:08 +0000 (20:46 +0100)]
perldelta for b2b69a966b47abd2cb4c320da60619b27c6c8abf

11 years agoperldelta: Verbatim lines into 79 columns
Karl Williamson [Mon, 8 Jul 2013 19:00:39 +0000 (13:00 -0600)]
perldelta: Verbatim lines into 79 columns

11 years agoperllocale.pod: Fix misstatements, and some nits
Karl Williamson [Mon, 8 Jul 2013 18:48:28 +0000 (12:48 -0600)]
perllocale.pod: Fix misstatements, and some nits

"$!" (stringified) is always subject to the current locale, even outside
'use locale'.  The motiviation, I believe, for this is that these are
operating system messages that are generally of most value to the
end-user, and so should be expressed in terms that are understandable to
the end-user, regardless of what the Perl programmer did or didn't do.

11 years agoPATCH: [perl #115808]: POSIX::setlocale returns bizarre value on failure
Karl Williamson [Mon, 8 Jul 2013 04:42:43 +0000 (22:42 -0600)]
PATCH: [perl #115808]: POSIX::setlocale returns bizarre value on failure

It turns out that this bug is caused by a more general one, covered by
[perl #118693].  But in the meantime, this commit fixes the problem for
setlocale(), and makes the code slightly cleaner besides.

11 years agoperlexperiment: linux abstract domains sockets
Ricardo Signes [Mon, 8 Jul 2013 15:07:29 +0000 (11:07 -0400)]
perlexperiment: linux abstract domains sockets

...now they are upstream-cpan and supported

11 years agoperlexperiment: MLDBM is not part of core
Ricardo Signes [Mon, 8 Jul 2013 13:35:08 +0000 (09:35 -0400)]
perlexperiment: MLDBM is not part of core

11 years agoAdd block to exercise case of very large buffer in lib/File/Copy.pm.
James E Keenan [Fri, 5 Jul 2013 01:09:04 +0000 (03:09 +0200)]
Add block to exercise case of very large buffer in lib/File/Copy.pm.

11 years agoAdd tests for two previously unexercised sections of lib/Symbol.pm.
James E Keenan [Thu, 4 Jul 2013 13:33:40 +0000 (15:33 +0200)]
Add tests for two previously unexercised sections of lib/Symbol.pm.

11 years agoRemove trailing dots in t/porting/readme.t on VMS.
Craig A. Berry [Sun, 7 Jul 2013 19:28:21 +0000 (14:28 -0500)]
Remove trailing dots in t/porting/readme.t on VMS.

Because on VMS a zero-length extension still has a dot.

11 years agoRestore $(ARCHDIR)vmspipe.com to VMS build after 2d11a7e9678.
Craig A. Berry [Sun, 7 Jul 2013 19:03:33 +0000 (14:03 -0500)]
Restore $(ARCHDIR)vmspipe.com to VMS build after 2d11a7e9678.

That commit moved VMS::Filespec from vms/ext to ext/, but it also
deleted the vmspipe.com dependency from the LIBPREREQ target in
vms/descrip_mms.template.  (vmspipe.com has nothing to do with
VMS::Filespec.)  Which meant vmspipe.com was not availabe for
building extensions or running tests, and -- worse yet -- would
not get installed.  So every pipe creation would involve creating
a temporary version of this file using fallback code in vms/vms.c,
thus making the very pokey pipe implementation even more expensive.

11 years agoperl.c: Use Strerror instead of strerror
Karl Williamson [Thu, 20 Jun 2013 19:17:13 +0000 (13:17 -0600)]
perl.c: Use Strerror instead of strerror

The former works on more systems.

11 years agopp_sys.c: Use macro instead of reinventing it
Karl Williamson [Thu, 20 Jun 2013 19:13:40 +0000 (13:13 -0600)]
pp_sys.c: Use macro instead of reinventing it

The Strerror macro is defined properly to handle either case here.

11 years agoutil.c: Avoid unnecessary setlocale() calls
Karl Williamson [Thu, 20 Jun 2013 18:28:12 +0000 (12:28 -0600)]
util.c: Avoid unnecessary setlocale() calls

This code sets the locale to C around its work.  This is unnecessary if
the locale is already C, and there is an existing global that indicates
this, that can be tested to avoid the sets.

11 years agoPATCH: [perl #118197] Cope with non-ASCII decimal separators
Karl Williamson [Sat, 22 Jun 2013 18:49:01 +0000 (12:49 -0600)]
PATCH: [perl #118197] Cope with non-ASCII decimal separators

This patch causes the radix string to be examined upon a new numeric
locale being set.  If the string isn't ASCII, and the new locale is
UTF-8, it turns on the UTF-8 flag in the scalar that holds the radix.
When a floating point number is formatted in Perl_sv_vcatpvfn_flags(),
and the flag is on, the result's flag will be set on too.

11 years agoProperly determine if in locale for NV stringification
Karl Williamson [Fri, 28 Jun 2013 21:43:54 +0000 (15:43 -0600)]
Properly determine if in locale for NV stringification

Commit 68e8f474bc686a86c064b695b9c7400313d7af65 used the wrong macro to
determine if the operation is within the scope of 'use locale'.  It also
has to operate under 'use locale 'not_characters'.

Tests for this are coming in the patch for [perl #118197].

11 years agoUpdate DB_File to CPAN version 1.829
Chris 'BinGOs' Williams [Sun, 7 Jul 2013 18:42:27 +0000 (19:42 +0100)]
Update DB_File to CPAN version 1.829

  [DELTA]

  1.829 7 July 2013

   * make realclean: removing all files
     RT #68214

   * Documented the issue where the error below

        BDB0588 At least one secondary cursor must be specified to DB->join

   * DB_File installs to wrong place for CPAN version
     RT #70420
     Makefile.PL prevents INSTALLDIRS on command line.
     RT #68287: Makefile.PL prevents INSTALLDIRS on command line.

   * typo fix
     RT #85335

11 years agoExtUtils::Miniperl: Remove pod repeated phrase
Karl Williamson [Sun, 7 Jul 2013 12:16:11 +0000 (06:16 -0600)]
ExtUtils::Miniperl: Remove pod repeated phrase

11 years agoFix MidnightBSD hints file for 0.4-RELEASE
Chris 'BinGOs' Williams [Sun, 7 Jul 2013 12:55:29 +0000 (13:55 +0100)]
Fix MidnightBSD hints file for 0.4-RELEASE

0.4 has no /usr/bin/objformat, so the hints file was
falling through to configure for aout with fatal consequences.

Confirmed that the objformat in 0.3 warns that it is deprecated.

Have switched around the logic of the checks so that it will always
configure for elf, using aout is explicitly detected.

11 years agoMerge the refactoring of ExtUtils::Miniperl and {mini,}perlmain.c generation.
Nicholas Clark [Sun, 7 Jul 2013 11:36:09 +0000 (13:36 +0200)]
Merge the refactoring of ExtUtils::Miniperl and {mini,}perlmain.c generation.

11 years agoMove the "editor block" from miniperlmain.c to ExtUtils::Miniperl
Nicholas Clark [Sat, 6 Jul 2013 14:21:40 +0000 (16:21 +0200)]
Move the "editor block" from miniperlmain.c to ExtUtils::Miniperl

As miniperlmain.c is now generated by ExtUtils::Miniperl (and not the other
way round), there's no reason to have an editor block in the generated file,
as it's not intended to be edited. Instead, add the "generated from" and
read-only headers to miniperlmain.c

11 years agoClean up ExtUtils::Miniperl
Nicholas Clark [Fri, 5 Jul 2013 22:28:50 +0000 (00:28 +0200)]
Clean up ExtUtils::Miniperl

Give it a $VERSION.
Bring the joy of strict (and warnings) to it.
Inline the C code into writemain() instead of using $head, $tail and a regex
to split the $tail into $tail1, $tail2 and $tail3.
Tweak the NAME section so that ABSTRACT_FROM parses it.
Document the updated functionality of writemain().

11 years agoInvert the build logic for miniperlmain.c and ExtUtils::Miniperl
Nicholas Clark [Fri, 5 Jul 2013 21:16:12 +0000 (23:16 +0200)]
Invert the build logic for miniperlmain.c and ExtUtils::Miniperl

Now ExtUtils::Miniperl has the master version of {mini,}perlmain.c and is
checked into the repository. miniperlmain.c is now generated by a script
in regen/ which uses ExtUtils::Miniperl.

Tweak ExtUtils::Miniperl::writemain() to take an optional first argument,
a reference to a file handle. This permits the regen script to use the
regen_lib.pl functions for file opening/closing/renaming and TAP generation.

For now check in ExtUtils::Miniperl minimally modified from the version
generated by the former minimod.pl. The next commit will tidy it up.

11 years agoMove generation of ExtUtils::Miniperl to ext/ExtUtils-Miniperl from minimod.pl
Nicholas Clark [Thu, 4 Jul 2013 09:28:53 +0000 (11:28 +0200)]
Move generation of ExtUtils::Miniperl to ext/ExtUtils-Miniperl from minimod.pl

It does increase the lines of code slightly but it replaces a bunch of
platform specific special case code in the Makefiles for *nix, Win32 and VMS
with one unified implementation. And in Perl, rather than 3+ different
languages.

This feels like the right maintainability trade-off.

11 years agoMerge the branch which builds utils/Makefile from utils/Makefile.PL
Nicholas Clark [Sun, 7 Jul 2013 10:50:13 +0000 (12:50 +0200)]
Merge the branch which builds utils/Makefile from utils/Makefile.PL

11 years agoGenerate utils/Makefile from utils/Makefile.PL, and remove it at clean time.
Nicholas Clark [Wed, 3 Jul 2013 20:50:08 +0000 (22:50 +0200)]
Generate utils/Makefile from utils/Makefile.PL, and remove it at clean time.

Add rules to the Win32 Makefiles to call utils/Makefile.PL to generate
utils/Makefile, and rules to both them and the *nix Makefile to delete
the generated file as part of the cleanup targets.

VMS continues to do its own thing, rather than using utils/Makefile.

11 years agoReplace utils/Makefile.SH with utils/Makefile.PL
Nicholas Clark [Wed, 3 Jul 2013 16:31:02 +0000 (18:31 +0200)]
Replace utils/Makefile.SH with utils/Makefile.PL

This shares all the existing deficiencies of utils/Makefile.SH, and
generates a byte-for-byte identical utils/Makefile, including boilerplate
that claims it was generated by utils/Makefile.SH

utils/Makefile remains as a file checked into the repository, and is not (yet)
deleted, because as-was only *nix platforms could run utils/Makefile.SH to
generate utils/Makefile. This messy state of affairs means that if you build
with static linking, the checked-out utils/Makefile is modified
('../miniperl' is replaced with '../perl')

The next commit will resolve just these bugs.

In turn, it seems that the pre-generated utils/Makefile is only used by
Win32, as VMS contains rules in descrip_mms.template to build the
utilities. Probably the next thing to unpick is the build on VMS, but it
seems better to reduce the size of the "problem" in both utils/Makefile.PL
and vms/descrip_mms.template by attempting to move the work from them to
the extension directories and ExtUtils::MakeMaker.

11 years agoAdd an "always update" parameter to regen_lib's open_new().
Nicholas Clark [Wed, 3 Jul 2013 13:23:33 +0000 (15:23 +0200)]
Add an "always update" parameter to regen_lib's open_new().

By default the code in regen_lib compares the newly written file it has just
closed with the (assumed) existing file, and only overwrites the existing
file if the new file differs. This is a useful behaviour for regeneration
scripts. However, it's not ideal for build scripts called from the Makefile,
as make assumes that targets will be regenerated (and the timestamp touched).

So add an "always update" parameter for the use of Makefile invoked scripts,
such as autodoc.pl. If set, delete any existing file early (so that fatal
errors during the generation don't confuse the build by leaving an existing
stale file around), skip the comparison and skip the diagnostic output
listing the changed files.

Change autodoc.pl to set this parameter.

Correct a typo in an error message in regen_lib's open_new().

11 years agoRefactor the Text::Wrap::wrap() logic in regen/regen_lib.pl
Nicholas Clark [Wed, 3 Jul 2013 13:51:16 +0000 (15:51 +0200)]
Refactor the Text::Wrap::wrap() logic in regen/regen_lib.pl

Provide a local subroutine wrap(). Pass columns as its first parameter and
set $Text::Wrap::columns, as all uses of Text::Wrap::wrap() were setting
this variable.

11 years agoAdd cpan/Text-Tabs/lib to buildcustomize.pl and hence miniperl's @INC.
Nicholas Clark [Wed, 3 Jul 2013 20:28:50 +0000 (22:28 +0200)]
Add cpan/Text-Tabs/lib to buildcustomize.pl and hence miniperl's @INC.

autodoc.pl already needs Text::Wrap, and soon other early-stage build scripts
will too.

11 years agoRefactor regen_lib.pl to reduce verbosity.
Nicholas Clark [Wed, 3 Jul 2013 13:40:47 +0000 (15:40 +0200)]
Refactor regen_lib.pl to reduce verbosity.

Use hash slices to avoid repeated typeglob dereferences on $fh.
In read_only_top() use a lexical to avoid repeated $args{lang} lookups.

11 years agoto-do tests for #113932 (UNIVERSAL::can and handles)
Father Chrysostomos [Sun, 7 Jul 2013 05:32:53 +0000 (22:32 -0700)]
to-do tests for #113932 (UNIVERSAL::can and handles)

11 years agoStop using IV in pmop; remove workaround
Father Chrysostomos [Sun, 7 Jul 2013 01:00:34 +0000 (18:00 -0700)]
Stop using IV in pmop; remove workaround

See ticket #118055 for all the detail.  On systems where IV is bigger
than a pointer, the slab allocator messes things up because it only
provides pointer alignment.  If pmops have an IV field, we cannot
allocate them via slab on such systems.  Pmops actually don’t need
an IV, just a PADOFFSET.  So we can change them and remove the
workaround.

This is obviously not suitable for maint.

11 years agoSuppress dep warnings in DD’s indent.t
Father Chrysostomos [Sun, 7 Jul 2013 00:58:31 +0000 (17:58 -0700)]
Suppress dep warnings in DD’s indent.t

I considered changing the code to suppress the warning, but:

• The warning only occurs before 5.12; the code is fine in
  later versions.
• By not changing the code I avoid the risk of sabotaging the test.
• By suppressing the warning conditionally based on perl version, we
  will still see future deprecations.

So this seems the least intrusive fix.

11 years agosmall improvements to documentation of IO::Socket
Ricardo Signes [Sat, 6 Jul 2013 19:26:01 +0000 (15:26 -0400)]
small improvements to documentation of IO::Socket

IO::Socket::INET's documentation for its Listen parameter was
somewhat misleading, and the documentation for IO::Socket::Unix
even more so.

See [perl #118713]

11 years agofix SIGZZERO typo in perldoc -f kill
Lukas Mai [Sat, 6 Jul 2013 16:38:50 +0000 (18:38 +0200)]
fix SIGZZERO typo in perldoc -f kill

11 years agoUpdate Time-Piece to CPAN version 1.21
Chris 'BinGOs' Williams [Sat, 6 Jul 2013 18:40:50 +0000 (19:40 +0100)]
Update Time-Piece to CPAN version 1.21

  [DELTA]

  1.21    2013-07-06
          - fix installation target; now installs to site in v5.12 and later
          - make Time::Seconds match its VERSION to Time::Piece
          - numerous portability fixes imported from perl core distribution

11 years agoignore lib/File/Find.pm
Ricardo Signes [Sat, 6 Jul 2013 16:01:07 +0000 (12:01 -0400)]
ignore lib/File/Find.pm

This is a bit of cleanup in the wake of
6de85bb45a5ea25528026a26cac854ee4dcdcd45.

11 years ago[perl #117917] /(?{ m|...| }) (?{ $1 })/
Father Chrysostomos [Sat, 6 Jul 2013 06:59:46 +0000 (23:59 -0700)]
[perl #117917] /(?{ m|...| }) (?{ $1 })/

A regular expression invoked inside a regular expression code block
can cause other code blocks in the same outer regular expression to
see the wrong values in $1.

PL_curpm holds a pointer to the match operator from which $1, $2, etc.
get their values.

Normally PL_curpm is set at the end of a match.

When code blocks are embedded inside a regular expression, PL_curpm
is set during a match to point to PL_reg_curpm, which is a dummy op
pointing to the current regular expression.

S_setup_eval_state is called at the beginning of regexp execution.
It is responsible for setting up PL_regcurpm and making PL_curpm
point to it.

Code blocks are executed using the multicall API.  PUSH_MULTICALL
records the value of PL_curpm and POP_MULTICALL makes sure that the
previous value of PL_curpm is restored.

Executing a code block can cause PL_curpm to point to something else.
Since we don’t necessarily do POP_MULTICALL between code block calls
within a single regular expression (sometimes we do, depending on
backtracking), PL_curpm may not have been restored when a second code
block fires.  So we have to restore it to point to PL_reg_curpm manu-
ally after calling a code block.

11 years agoPATCH: [perl #112208]: Set utf8 flag on $! appropriately
Karl Williamson [Thu, 20 Jun 2013 03:00:53 +0000 (21:00 -0600)]
PATCH: [perl #112208]: Set utf8 flag on $! appropriately

This patch sets the utf8 flag on $! if the error string passes utf8
validity tests and has some bytes with the upper bit set.  (If none
have that bit set, is an ASCII string, and whether or not it is UTF-8 is
irrelevant.)  This is a heuristic that could fail, but as the reference
in the comments points out this is unlikely.

One can reasonably assume that a UTF-8 locale will return a UTF-8
result.  So another approach would be to look at that (but we wouldn't
want to turn the flag on for a purely ASCII string anyway, as that could
change the semantics from existing behavior by making the string follow
Unicode rules, whereas it didn't necessarily before.)  To do this, we
could keep track of the utf8ness of the LC_MESSAGES locale.  But until
the heuristic in this patch is shown to not be good enough, I don't see
the need to do this extra work.

11 years agoAdd new -V output to Config-Perl-V
H.Merijn Brand [Wed, 3 Jul 2013 13:53:11 +0000 (15:53 +0200)]
Add new -V output to Config-Perl-V

11 years agolocale.c: Further checks for utf8ness of a locale
Karl Williamson [Tue, 2 Jul 2013 16:49:04 +0000 (10:49 -0600)]
locale.c: Further checks for utf8ness of a locale

In reality, the return value of setlocale() is documented to be opaque,
so using it to determine if a locale is UTF-8 or not may not work.  It
is a char*, which we treat as a name.  We can safely assume that if the
name contains UTF-8 (or slight variations thereof), that it is a UTF-8
locale.  But if the name doesn't contain that, it still could be one.
In fact there are currently many locales on our dromedary machine that
fall into this category.  Similarly, something containing 8859 is not
going to be UTF-8.

This commit adds another test for cases where there is no nl_langinfo(),
and the locale name isn't helpful.  It looks at the currency symbol,
which typically will be in the locale's script.  If that is illegal
UTF-8, we know for sure that the locale isn't UTF-8 (or is corrupted).
If it is legal UTF-8 (but not ASCII) we can be pretty sure that the
locale is UTF-8.  If it is ASCII, we still don't know one way or the
other, so we err on it not being UTF-8.

Originally, I was going to use the locale's error message strings,
returned from strerror(), the source for $!, to check for this.
These are supposed to be in terms of the  LC_MESSAGES locale.  Chances
are vanishingly small that the locale is not UTF-8 if all the messages
pass a utf8ness test, provided that the messages aren't just ASCII.
However, on dromedary, the messages for many of the exotic locales
haven't been translated, and are still in English, which doesn't help at
all.  I figure that this is quite likely to be the case generally, and
the currency symbol is much more likely to have been translated.
I left the code in though, commented out for possible future use.

Note that this test will run only on systems that don't have
nl_langinfo().  The test can also be turned off by setting a C compiler
flag -DNO_LOCALE_MONETARY, (and -DNO_LOCALE_MESSAGES for the
commented-out part), corresponding to the way the other categories can
be turned off (none of which is documented).

11 years agolocale.c: Extract out, fix, expand fcn to see if a locale is utf8
Karl Williamson [Mon, 24 Jun 2013 23:21:49 +0000 (17:21 -0600)]
locale.c: Extract out, fix, expand fcn to see if a locale is utf8

There was buggy code to see if the start-up locale is UTF-8.  This
commit extracts it into a separate function.

The bugs involved looking at the name of the locale to see if that
implies a UTF-8 name.  Prior to this commit, it looked at the
beginning of the locale name, whereas in reality, it is at the end, as
in "fr_FR.UTF8".

Also, it didn't look for the documented Windows name for UTF-8 locales
on those platforms.

The function is expanded to have an input category to find the utf8ness
of.  Thus it now works on any non-LC_ALL category, not just LC_CTYPE.

It is possible for categories to be in different locales, so that
LC_CTYPE is in a UTF-8 locale, and LC_NUMERIC isn't.  For the purposes
of PERL_UNICODE, the most applicable category is LC_CTYPE, so that is
the one used in its currently only call.

11 years agolocale.c: Compare apples to apples
Karl Williamson [Thu, 27 Jun 2013 20:25:43 +0000 (14:25 -0600)]
locale.c: Compare apples to apples

Prior to this patch, one parameter to strNE would have been through a
standardizing function, while the other had not.  By standardizing both
before doing the compare, we avoid false positives.

11 years agoperl.h, locale.c: White space only
Karl Williamson [Thu, 27 Jun 2013 20:01:01 +0000 (14:01 -0600)]
perl.h, locale.c: White space only

This indents some nested #if's to clarify the program structure.

11 years agolocale.c: Add comments
Karl Williamson [Thu, 27 Jun 2013 19:57:19 +0000 (13:57 -0600)]
locale.c: Add comments

11 years ago[perl #117727] Document B::PADLIST
Father Chrysostomos [Fri, 5 Jul 2013 20:24:12 +0000 (13:24 -0700)]
[perl #117727] Document B::PADLIST

I neglected this when I added that class in perl 5.17.4

11 years agoMove File::Find from lib/ to ext/
Nicholas Clark [Wed, 3 Jul 2013 09:11:06 +0000 (11:11 +0200)]
Move File::Find from lib/ to ext/

11 years agoChange File::Find's tests to look for taint.t instead of commonsense.t
Nicholas Clark [Wed, 3 Jul 2013 08:57:28 +0000 (10:57 +0200)]
Change File::Find's tests to look for taint.t instead of commonsense.t

This passes whether the tests are in lib/ (and hence run with the CWD as t/)
or in ext/File-Find (and hence run with that as the CWD) because they find
t/op/taint.t or ext/File-Find/t/taint.t respectively.

Change taint.t to count the number of times it finds a file named taint.t,
and fail if the count isn't 1. find.t was already testing a count.

11 years agoImprove the BEGIN-time setup code for File::Find's tests.
Nicholas Clark [Wed, 3 Jul 2013 08:41:29 +0000 (10:41 +0200)]
Improve the BEGIN-time setup code for File::Find's tests.

In find.t merge the two BEGIN blocks and eliminate the redundant
C<use File::Spec;>
In both, don't attempt to change directory to t/ (which will be unhelpful
once File::Find is moved to ext/)
Only make paths in @INC absolute if $ENV{PERL_CORE} is set (which will ease
making File::Find dual-life, if we want to this.)

11 years agoAdd Olivier Mengué to AUTHORS
Father Chrysostomos [Fri, 5 Jul 2013 15:13:39 +0000 (08:13 -0700)]
Add Olivier Mengué to AUTHORS

11 years agoIncrease $subs::VERSION to 1.02
Father Chrysostomos [Fri, 5 Jul 2013 15:12:47 +0000 (08:12 -0700)]
Increase $subs::VERSION to 1.02

11 years agosubs.pm: fix variable leak into global scope
Olivier Mengué [Sat, 13 Apr 2013 09:48:40 +0000 (11:48 +0200)]
subs.pm: fix variable leak into global scope

11 years agoUpdate MIME-Base64 to CPAN version 3.14
Chris 'BinGOs' Williams [Fri, 5 Jul 2013 14:21:07 +0000 (15:21 +0100)]
Update MIME-Base64 to CPAN version 3.14

  [DELTA]

  2013-07-02   Gisle Aas <gisle@ActiveState.com>

   Release 3.14

   Install to 'site' instead of 'perl' when perl version is 5.12+

11 years agoUpdate Digest-MD5 to CPAN version 2.53
Chris 'BinGOs' Williams [Fri, 5 Jul 2013 14:20:03 +0000 (15:20 +0100)]
Update Digest-MD5 to CPAN version 2.53

  [DELTA]

  2013-07-02   Gisle Aas <gisle@ActiveState.com>

   Release 2.53

   Drop File::Spec dependency and don't override installation location
   for perl-5.12++

   Documentation tweaks.

11 years agoignore build products from the newly dist/ed Exporter
Tony Cook [Fri, 5 Jul 2013 07:20:57 +0000 (17:20 +1000)]
ignore build products from the newly dist/ed Exporter

11 years agoIntroduce validate_proto / stop stripping spaces
Peter Martini [Mon, 1 Jul 2013 22:13:42 +0000 (18:13 -0400)]
Introduce validate_proto / stop stripping spaces

The code to do warnings on invalid prototypes was a chunk
of 70 or so lines inside the core lexer.  It also had the
side effect of removing spaces from the prototype as part
of its check for warnings.

This validation code is now just a validation, printing
out warnings if and only if warnings are enabled,
and leaving the source SV untouched.

11 years agominor clean up of the refactoring of d6a4f4b531
Tony Cook [Fri, 5 Jul 2013 06:01:06 +0000 (16:01 +1000)]
minor clean up of the refactoring of d6a4f4b531

- the values assigned to format_name are unused under PERL_MAD, hence
  format_name is unused

- and PL_madskills is #defined to 0 when not under PERL_MAD

11 years agoRevert "regcomp.c: Add a constant 0 element before inversion lists"
Karl Williamson [Fri, 5 Jul 2013 04:01:05 +0000 (22:01 -0600)]
Revert "regcomp.c: Add a constant 0 element before inversion lists"

This reverts commit 533c4e2f08b42d977e5004e823d4849f7473d2d0.
This continues the backing out of this topic branch.  A bisect shows
that the first commit exhibiting an error is the first one in the
branch.

11 years agoRevert "regcomp.c: Make inversion lists SVt_PVLV"
Karl Williamson [Fri, 5 Jul 2013 04:00:58 +0000 (22:00 -0600)]
Revert "regcomp.c: Make inversion lists SVt_PVLV"

This reverts commit 2c3365de8c1168f115576a4976d067e3b911c490.
This continues the backing out of this topic branch.  A bisect shows
that the first commit exhibiting an error is the first one in the
branch.

11 years agoRevert "regcomp.c: Remove unused data structure field"
Karl Williamson [Fri, 5 Jul 2013 04:00:53 +0000 (22:00 -0600)]
Revert "regcomp.c: Remove unused data structure field"

This reverts commit 4b98096221966ea01c046f4f61b2dc4f60b534b9.
This continues the backing out of this topic branch.  A bisect shows
that the first commit exhibiting an error is the first one in the
branch.

11 years agoRevert "regcomp.c: Move 2 hdr inversion fields to SV hdr"
Karl Williamson [Fri, 5 Jul 2013 04:00:48 +0000 (22:00 -0600)]
Revert "regcomp.c: Move 2 hdr inversion fields to SV hdr"

This reverts commit 4fdeca7844470c929f35857f49078db1fd124dbc.
This continues the backing out of this topic branch.  A bisect shows
that the first commit exhibiting an error is the first one in the
branch.

11 years agoRevert "regcomp.c: Change, variable, fcn name"
Karl Williamson [Fri, 5 Jul 2013 04:00:43 +0000 (22:00 -0600)]
Revert "regcomp.c: Change, variable, fcn name"

This reverts commit 875c4e2c5193b5245da578b222e9c93aad31d93b.
This continues the backing out of this topic branch.  A bisect shows
that the first commit exhibiting an error is the first one in the
branch.

11 years agoRevert "regcomp.c: Move inversion list hdr field to SV hdr"
Karl Williamson [Fri, 5 Jul 2013 04:00:36 +0000 (22:00 -0600)]
Revert "regcomp.c: Move inversion list hdr field to SV hdr"

This reverts commit d913fb457b732da4c31d0d1b8c085989a7ecd12d.
This continues the backing out of this topic branch.  A bisect shows
that the first commit exhibiting an error is the first one in the
branch.

11 years agoRevert "regcomp.c: Make C-array inversion lists const"
Karl Williamson [Fri, 5 Jul 2013 03:59:03 +0000 (21:59 -0600)]
Revert "regcomp.c: Make C-array inversion lists const"

This reverts commit 241136e0ed70738cccd6c4b20ce12b26231f30e5.
This continues the backing out of this topic branch.  A bisect shows
that the first commit exhibiting an error is the first one in the
branch.

11 years agoConsistent spaces after dots in perlhack.pod
Father Chrysostomos [Fri, 5 Jul 2013 01:30:56 +0000 (18:30 -0700)]
Consistent spaces after dots in perlhack.pod

11 years agoUse tabs consistently in AUTHORS
Father Chrysostomos [Fri, 5 Jul 2013 01:25:30 +0000 (18:25 -0700)]
Use tabs consistently in AUTHORS

11 years agoREADME.ko: remove blank line
Father Chrysostomos [Fri, 5 Jul 2013 01:25:16 +0000 (18:25 -0700)]
README.ko: remove blank line

This fixes a completely bogus failure from podcheck.t, something about
a verbatim section under NAME.

11 years agoAdd Keedi Kim to AUTHORS
Father Chrysostomos [Thu, 4 Jul 2013 20:22:39 +0000 (13:22 -0700)]
Add Keedi Kim to AUTHORS

11 years agoUpdate brand-new README.ko
Keedi Kim [Thu, 4 Jul 2013 17:11:12 +0000 (02:11 +0900)]
Update brand-new README.ko

11 years agoRevert "regcomp.c: Move some #defines to only file that uses them"
Karl Williamson [Fri, 5 Jul 2013 00:57:55 +0000 (18:57 -0600)]
Revert "regcomp.c: Move some #defines to only file that uses them"

This reverts commit 05944450e0fc82eb8fc1fb5a4bf63f23785262a0.
Blead won't compile with address sanitizer;  commit
7cb47964955167736b2923b008cc8023a9b035e8 reverting an earlier commit
failed to fix that.  I'm trying two more reversions to get it back
working.  This is one of those

11 years agoRevert "Create SVt_INVLIST"
Karl Williamson [Fri, 5 Jul 2013 00:55:11 +0000 (18:55 -0600)]
Revert "Create SVt_INVLIST"

This reverts commit e045dbedc7da04e20cc8cfccec8a2e3ccc62cc8b.
Blead won't compile with address sanitizer;  commit
7cb47964955167736b2923b008cc8023a9b035e8 reverting an earlier commit
failed to fix that.  I'm trying two more reversions to get it back
working.  This is one of those

11 years agoop.c: White-space only
Karl Williamson [Thu, 4 Jul 2013 22:08:05 +0000 (16:08 -0600)]
op.c: White-space only

Outdent to correspond with removed block

11 years agoPATCH: [perl #114178] di/ds/ig exempt from warnings in void context
Karl Williamson [Thu, 4 Jul 2013 22:00:45 +0000 (16:00 -0600)]
PATCH: [perl #114178] di/ds/ig exempt from warnings in void context

11 years agoRevert "Use new Svt_INVLIST for inversion lists."
Karl Williamson [Thu, 4 Jul 2013 21:19:48 +0000 (15:19 -0600)]
Revert "Use new Svt_INVLIST for inversion lists."

This reverts commit e0ce103ae532f9576f54a5938a24d1ee98dfb928.
This commit is failing compilations with address sanitizer, and we don't
know why.  This reverts it while we work that out.

11 years agoAdd non-XS extensions to known_extensions in configure.com.
Craig A. Berry [Thu, 4 Jul 2013 17:25:55 +0000 (12:25 -0500)]
Add non-XS extensions to known_extensions in configure.com.

Follow-up to f7b3892b9e45c6994.

For now we're not re-sorting known_extensions after combining the
XS and non-XS extensions into one list.  It would be pretty arduous
to do that in DCL and probably doesn't matter.

We special-case VMS::Filespec because (at least on VMS) it's an XS
extension so clearly doesn't belong in nonxs_ext.  Technically it's
static because it's XS bits live in vms/vms.c, but it's not clear
that it belongs in static_ext as those would normally be things
that require an extra link step (if such static linking even
works, which we don't know as it hasn't been tested in a long
time.)

11 years agoFix ext/VMS-Filespec/t/filespec.t after move in 2d11a7e9678a88.
Craig A. Berry [Thu, 4 Jul 2013 17:17:39 +0000 (12:17 -0500)]
Fix ext/VMS-Filespec/t/filespec.t after move in 2d11a7e9678a88.

Moving it caused it to fail because it expected test.pl to exist
in the directory it's being run from, but that isn't the case
anymore.  We can now just depend on the test infrastructure to
control @INC and don't need any special handling of library
directories.

11 years agorarest is only used under -DDEBUGGING
Tony Cook [Thu, 4 Jul 2013 06:20:40 +0000 (16:20 +1000)]
rarest is only used under -DDEBUGGING

This was warning under gcc 4.7.2

11 years agot/lib/warnings/utf8: Fix improper TODO test
Karl Williamson [Wed, 3 Jul 2013 04:05:31 +0000 (22:05 -0600)]
t/lib/warnings/utf8: Fix improper TODO test

This had the wrong syntax, but it wasn't caught because it is TODO
anyway.

11 years agoFix perlguts and comments for how sv_chop() works
Karl Williamson [Fri, 14 Jun 2013 03:52:14 +0000 (21:52 -0600)]
Fix perlguts and comments for how sv_chop() works

There is no 'integer' part of a SVt_PV, contrary to what perlguts said.
I also added a couple of comments to sv_chop() as I learned how it
really works.

11 years agoAdd test for undefined first argument to fileparse().
James E Keenan [Wed, 3 Jul 2013 00:03:53 +0000 (02:03 +0200)]
Add test for undefined first argument to fileparse().

11 years agoMerge branch 'const_posix_invlists' into blead
Karl Williamson [Thu, 4 Jul 2013 01:51:45 +0000 (19:51 -0600)]
Merge branch 'const_posix_invlists' into blead

What characters certain POSIX classes match, like [[:xdigit:]] are
compiled into a C header file, thus avoiding the necessity of reading
them in from disk at run-time.  This merge makes those fully const, so
that they can get loaded as part of a read-only text segment.  The sv's
that contain these are set so that SvLEN is 0; this means (from my
looking at the code without any experience in this area) that copies are
not made when they are dup'd, such as when threads are created.

A new svtype is created for inversion lists, using the single
available slot, renumbering them.

The first few commits instead use an existing svtype, repurposing
some of its fields for use by inversion lists.  This was done so that
this could be done in a maintenance release, if necessary.  (Their not
being fully const can interfere with -DPERL_GLOBAL_STRUCT_PRIVATE.)
And also, should it become necessary to create an svtype for some other
purpose, we can revert to that point in the branch.

11 years agoUse new Svt_INVLIST for inversion lists.
Karl Williamson [Tue, 2 Jul 2013 19:16:45 +0000 (13:16 -0600)]
Use new Svt_INVLIST for inversion lists.

This converts inversion lists to use their own scalar type.

11 years agoCreate SVt_INVLIST
Karl Williamson [Tue, 11 Jun 2013 22:57:22 +0000 (16:57 -0600)]
Create SVt_INVLIST

This reshuffles the svtype enum to remove the dummy slot created in a
previous commit, and add the new SVt_INVLIST type in its proper order.
It still is unused, but since it is an extension of SVt_PV, it must be
greater than that type's enum value.  Since it can't be upgraded to any
other PV type, it comes right after SVt_PV.

Affected tables in the core are updated.

11 years agoregcomp.c: Move some #defines to only file that uses them
Karl Williamson [Thu, 14 Feb 2013 00:21:18 +0000 (17:21 -0700)]
regcomp.c: Move some #defines to only file that uses them

These were used in a header file to provide synchronization between
files.  However, the only other file that would need them is a .pl file
which doesn't have access to them.  So simplify things so that the
variables are either removed entirely if only used in a single place, or
are #defined in the area where they are used

11 years agoregcomp.c: Make C-array inversion lists const
Karl Williamson [Wed, 13 Feb 2013 23:41:44 +0000 (16:41 -0700)]
regcomp.c: Make C-array inversion lists const

The inversion lists that are compiled into a C header are now const.

11 years agoregcomp.c: Move inversion list hdr field to SV hdr
Karl Williamson [Wed, 13 Feb 2013 23:33:09 +0000 (16:33 -0700)]
regcomp.c: Move inversion list hdr field to SV hdr

This moves the final field that can vary from the inversion list data
structure into the header of the SV that contains it.  With this commit,
the body of an inversion list is now const.

The field is converted to a U8, to correspond with the header field in
the SV type that we currently use to hold inversion lists.

11 years agoregcomp.c: Change, variable, fcn name
Karl Williamson [Tue, 12 Feb 2013 16:20:44 +0000 (09:20 -0700)]
regcomp.c: Change, variable, fcn name

These have always been slightly misnamed, but a recent commit made them
more so.  The old name contained "zero", but now there is a new element
which always has zero.  This element indicates whether the inversion
list is offset, that is if the beginning is the zero element, or if the
beginning is the next element beyond the zero element.

11 years agoregcomp.c: Move 2 hdr inversion fields to SV hdr
Karl Williamson [Tue, 12 Feb 2013 06:08:00 +0000 (23:08 -0700)]
regcomp.c: Move 2 hdr inversion fields to SV hdr

This commit continues the process of separating the header area of
inversion lists from the body.  2 more fields are moved out of the
header portion of the inversion list, and into the header portion of the
SV that contains it.

11 years agoregcomp.c: Remove unused data structure field
Karl Williamson [Wed, 13 Feb 2013 22:13:04 +0000 (15:13 -0700)]
regcomp.c: Remove unused data structure field

This removes a field that is set in the inversion list data structure
and examined just once.  And that sole examiner is the function that
calls the function that does the set.  In other words X calls Y passing
it data D.  Y puts D into a structure.  Upon return from Y, X looks for
D in the structure.  No one else looks at D.  X might just as well have
looked at D directly, without involving Y, and without the structure
needing a space for D.

11 years agoregcomp.c: Make inversion lists SVt_PVLV
Karl Williamson [Mon, 11 Feb 2013 22:23:40 +0000 (15:23 -0700)]
regcomp.c: Make inversion lists SVt_PVLV

This is the 2nd step in separating the inversion list body from header.
This commit gives inversion lists the header from a SVt_PVLV, and
repurposes one of its fields into being the length of the inversion
list.

This is a temporary measure, in case binary compatibility is an issue.
Future commits will create a new SV type just for inversion lists.
This SV type was chosen because it has a sufficient number of fields to
accommodate all the header fields from inversion lists.

11 years agoregcomp.c: Add a constant 0 element before inversion lists
Karl Williamson [Mon, 11 Feb 2013 19:07:00 +0000 (12:07 -0700)]
regcomp.c: Add a constant 0 element before inversion lists

This commit is the first step to separating the header from the body of
inversion lists.  Doing so will allow the compiled-in inversion lists to
be fully read-only.

To invert an inversion list, one simply unshifts a 0 to the front of it
if one is not there, and shifts off the 0 if it does have one.

The current data structure reserves an element at the beginning of each
inversion list that is either 0 or 1.  If 0, it means the inversion list
begins there; if 1, it means the inversion list starts at the next
element.  Inverting involves flipping this bit.

This commit changes the structure so that there is an additional element
just after the element that flips.  This new element is always 0, and
the flipping element now says whether the inversion list begins at the
constant 0 element, or the one after that.

Doing this allows the flipping element to be separated in later commits
from the body of the inversion list, which will always begin with the
constant 0 element.  That means that the body of the inversion list can
be const.

11 years agoRemove duplicate entry
H.Merijn Brand [Wed, 3 Jul 2013 14:32:08 +0000 (16:32 +0200)]
Remove duplicate entry

PERL_NEW_COPY_ON_WRITE was defined in both perl.h and perl.c
6617f9f1f8da06f5163a7942df475e7387d371cf removed the first

11 years agoMove Exporter from lib/ to dist/Exporter/
Nicholas Clark [Tue, 2 Jul 2013 15:15:01 +0000 (17:15 +0200)]
Move Exporter from lib/ to dist/Exporter/

Exporter has been considered dual life, upstream blead, since commit
6295adb525682844 (Sep 2006), but it was not moved to dist/ in 2009 with
the other dual-life modules because it was not possible to disentangle it
from the early stages of the build bootstrapping.

The build bootstrapping is now sufficiently simplified that it's possible
to move it to dist/

11 years agoDelete superfluous lines; clarify identifier parsing.
James E Keenan [Tue, 2 Jul 2013 23:20:23 +0000 (01:20 +0200)]
Delete superfluous lines; clarify identifier parsing.

Grammar correction suggested by Father Chrysostomos.
For RT #118723.