3 months agoregcomp.c: Move some #defines to only file that uses them smoke-me/khw-readonly_invlists
Karl Williamson [Thu, 14 Feb 2013 00:21:18 +0000]
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

3 months agoregcomp.c: Make C-array inversion lists const
Karl Williamson [Wed, 13 Feb 2013 23:41:44 +0000]
regcomp.c: Make C-array inversion lists const

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

3 months agoregcomp.c: Move inversion list hdr field to SV hdr
Karl Williamson [Wed, 13 Feb 2013 23:33:09 +0000]
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.

3 months agoregcomp.c: Change, variable, fcn name
Karl Williamson [Tue, 12 Feb 2013 16:20:44 +0000]
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.

3 months agoregcomp.c: Move 2 hdr inversion fields to SV hdr
Karl Williamson [Tue, 12 Feb 2013 06:08:00 +0000]
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.

3 months agoregcomp.c: Remove unused data structure field
Karl Williamson [Wed, 13 Feb 2013 22:13:04 +0000]
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.

3 months agoregcomp.c: Make inversion lists SVt_PVLV
Karl Williamson [Mon, 11 Feb 2013 22:23:40 +0000]
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 SV type was chosen because it has a sufficient number of fields to
accommodate all the header fields from inversion lists.

3 months agoregcomp.c: Add a constant 0 element before inversion lists
Karl Williamson [Mon, 11 Feb 2013 19:07:00 +0000]
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.

3 months agoregcomp.c: Fully parenthesize macro expansions formal parameter
Karl Williamson [Mon, 11 Feb 2013 19:07:35 +0000]
regcomp.c: Fully parenthesize macro expansions formal parameter

3 months agoinline_invlist.c, regcomp.c: Comments-onlys, white-space
Karl Williamson [Mon, 11 Feb 2013 18:31:16 +0000]
inline_invlist.c, regcomp.c: Comments-onlys, white-space

inline_invlist.c had comments that are from a different file.  Update
them.  Also corrects the name in a #error line in regcomp.c

3 months agodiag.t: Validate severity of ck warn routines better
Father Chrysostomos [Sun, 10 Feb 2013 22:30:20 +0000]
diag.t: Validate severity of ck warn routines better

In the case of Perl_ck_warner and other _ck_ functions, we can tell
whether it is a severe/default warning or no by the _d suffix (or the
presence of ‘dep’ in the name for regcomp.c’s ckWARN* functions).

This caught one incorrect severity in perldiag.pod, which is also cor-
rected here.

3 months agoSync Config-Perl-V version in Maintainers.pl with CPAN
Chris 'BinGOs' Williams [Sun, 10 Feb 2013 20:30:12 +0000]
Sync Config-Perl-V version in Maintainers.pl with CPAN

3 months agoDeal with spaces in patch descriptions
H.Merijn Brand [Sun, 10 Feb 2013 20:06:45 +0000]
Deal with spaces in patch descriptions

To be sure, I also allowed "Compile time options" to have spaces
Using \0 as a new separator seems a sane choice, as the values returned
from internal functions are pure C strings, so they end with \0

patches can have spaces:
#          $got->{build}{patches}[0] = 'SAVEARGV0'
#     $expected->{build}{patches}[0] = 'SAVEARGV0 - disable magic open in <ARGV>'
#          $got->{build}{patches}[0] = 'ActivePerl'
#     $expected->{build}{patches}[0] = 'ActivePerl Build 1602 [296513]'
#          $got->{build}{patches}[0] = 'DEBPKG:debian/arm_thread_stress_timeout'
#     $expected->{build}{patches}[0] = 'DEBPKG:debian/arm_thread_stress_timeout - http://bugs.debian.org/501970 Raise the timeout of ext/threads/shared/t/stress.t to accommodate slower build hosts'
#          $got->{build}{patches}[0] = 'Bug#55162'
#     $expected->{build}{patches}[0] = 'Bug#55162 File::Spec::case_tolerant performance'

3 months agoRT-116192 - If a directory in @INC already has a trailing '/', don't add another.
Matthew Horsfall (alh) [Thu, 27 Dec 2012 15:38:08 +0000]
RT-116192 - If a directory in @INC already has a trailing '/', don't add another.

3 months agoMention inclusion of both META files, in perldelta
Chris 'BinGOs' Williams [Sun, 10 Feb 2013 19:55:17 +0000]
Mention inclusion of both META files, in perldelta

3 months agoperl.pod: Squash double space
Father Chrysostomos [Sun, 3 Feb 2013 21:42:18 +0000]
perl.pod: Squash double space

inadventently (presumably :) added in commit c1264fa8ede.

3 months agoperldiag.pod: Remove regexp cat from \b{ \B{ message
Father Chrysostomos [Sun, 3 Feb 2013 20:35:56 +0000]
perldiag.pod: Remove regexp cat from \b{ \B{ message

It is no longer in that category as of 147508a29c9.

3 months agopp.c: White-space only
Karl Williamson [Tue, 5 Feb 2013 17:36:56 +0000]
pp.c: White-space only

This moves some things so lines fit in an 80 column window

3 months agoEnable perl core tests to pass when locale support is not available.
Jess Robinson [Fri, 8 Feb 2013 12:30:05 +0000]
Enable perl core tests to pass when locale support is not available.

use locale - this will now die if $Config{d_setlocale} is not true.
All tests that use locale will skip if $Config{d_setlocale} is not true.
This enables us to pass tests on Android which uses ICU instead of locales.

The committer removed trailing white space

3 months agoAdd Jess Robinson to AUTHORS
Karl Williamson [Sun, 10 Feb 2013 03:07:38 +0000]
Add Jess Robinson to AUTHORS

3 months agoDocument corelist change in perldelta
Chris 'BinGOs' Williams [Sat, 9 Feb 2013 21:06:52 +0000]
Document corelist change in perldelta

3 months agoMake corelist --feature a >= v5.9.5 option
Chris 'BinGOs' Williams [Sat, 9 Feb 2013 20:22:14 +0000]
Make corelist --feature a >= v5.9.5 option

3 months agoReport feature availability via corelist -f
Thomas Sibley [Sat, 9 Feb 2013 19:44:13 +0000]
Report feature availability via corelist -f

> regen/feature.pl contains the data below, which could be used to add
> information to Module::CoreList to show what feature was available
> since what perl version
>
> $ corelist -f switch
> Data for 2013-01-20
> feature switch was first released with perl v5.9.5
>
> Any takers?

I reached for this the other day and was sad it didn't already exist.
Patch attached.

As suggested by H.Merijn Brand.

Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>

3 months agoUpdate Archive-Extract to CPAN version 0.66
Chris 'BinGOs' Williams [Sat, 9 Feb 2013 18:58:03 +0000]
Update Archive-Extract to CPAN version 0.66

  [DELTA]

  Changes for 0.66    Sat Feb  9 18:21:52 2013
  ============================================
  * Treat midnightbsd the same as freebsd for
    the purposes of finding Info-ZIP unzip

3 months agoStandardize removal of escapes in unixify.
Craig A. Berry [Sat, 9 Feb 2013 15:23:09 +0000]
Standardize removal of escapes in unixify.

When converting VMS format file specification to Unix format, we
need to translate sequences escaped with a caret in the VMS format
name into an unescaped form in the resulting Unix name.  We have
a function to do just that, but weren't using it in three of the
most important places that need it.  Using the function gets us
handling more cases than the simple versions we had inline.

3 months agoChange pods to not refer to av_len()
Karl Williamson [Sat, 2 Feb 2013 17:18:45 +0000]
Change pods to not refer to av_len()

This name for the function is misleading; don't encourage its use.

3 months agoAdd av_tindex() synonym for av_top_index()
Karl Williamson [Fri, 8 Feb 2013 21:27:57 +0000]
Add av_tindex() synonym for av_top_index()

The latter is a somewhat less clumsy name.  The old one is provided a a
very clear name; the new one as a somewhat slangy version

3 months agoInline av_top_index()
Karl Williamson [Thu, 7 Feb 2013 19:06:43 +0000]
Inline av_top_index()

This function is just an assert and a macro call.  Avoid the function
call overhead by making it inline.

3 months agoChange name 'av_top' to 'av_top_index'
Karl Williamson [Thu, 7 Feb 2013 18:43:02 +0000]
Change name 'av_top' to 'av_top_index'

 In using the av_top() function created in a recent commit, I found
 myself being confused, and thinking it meant the top element of the
 array, whereas it really means the index of the top element of that
 array.  Since the new name has not appeared in a stable release, it can
 be changed, without remorse, to include 'index' in it.

3 months agomakedef.pl: Don't export inline fcns
Karl Williamson [Fri, 8 Feb 2013 21:00:09 +0000]
makedef.pl: Don't export inline fcns

An inline function is static to the file it is defined in.  But they can
be part of the public API if they are in #included header files and
defined in embed.fnc.  Normally such functions are written to the export
list on platforms that have this, but since they are static, you get a
linkage error.  This commit suppresses the writing of inline functions

3 months agoregen/embed.pl: Extract out duplicate code into a fcn
Karl Williamson [Thu, 7 Feb 2013 17:45:14 +0000]
regen/embed.pl: Extract out duplicate code into a fcn

3 months agoregen/embed.pl: Warn if have > 1 i, p, and s flags
Karl Williamson [Thu, 7 Feb 2013 17:31:22 +0000]
regen/embed.pl: Warn if have > 1 i, p, and s flags

These should be mutually exclusive

3 months agoembed.fnc: Remove inappropriate 'p' flags
Karl Williamson [Thu, 7 Feb 2013 17:26:54 +0000]
embed.fnc: Remove inappropriate 'p' flags

These functions do not begin with 'Perl_'; currently this flag is
ignored here.

3 months agoUpdated File::Temp from 0.22 to 0.22_90
David Golden [Fri, 8 Feb 2013 04:16:14 +0000]
Updated File::Temp from 0.22 to 0.22_90

3 months agoUpdate Text-Soundex to CPAN version 3.04
Chris 'BinGOs' Williams [Thu, 7 Feb 2013 21:16:32 +0000]
Update Text-Soundex to CPAN version 3.04

  [DELTA]

  3.04  Thu Feb  7 15:53:09 EST 2013 <rjbs@cpan.org>

  The module is going to be removed from the core distribution of perl, and will
  now warn (under warnings) if loaded from its installed-to-core location.

3 months agoUpdate File-CheckTree to CPAN version 4.42
Chris 'BinGOs' Williams [Thu, 7 Feb 2013 21:24:35 +0000]
Update File-CheckTree to CPAN version 4.42

  [DELTA]

  4.42  Thu Feb  7 15:51:35 EST 2013
    * add warning (for core-installed copy only) indicating File::CheckTree
      will be removed from core in 5.20.0

3 months agoadd example of warning categorization to perldiag
David Golden [Thu, 7 Feb 2013 19:41:06 +0000]
add example of warning categorization to perldiag

3 months agoreword release announcement template
David Golden [Thu, 7 Feb 2013 14:45:59 +0000]
reword release announcement template

3 months agoBenchmark iteration warnings should warn, not print
David Golden [Wed, 6 Feb 2013 03:23:37 +0000]
Benchmark iteration warnings should warn, not print

3 months agoRemove unused feature setting from vms/vms.c.
Craig A. Berry [Wed, 6 Feb 2013 03:23:42 +0000]
Remove unused feature setting from vms/vms.c.

This feature was apparently intended to enable workarounds for
handling filespec translations on paths with no directory component.
Many (most?) of the problems with such paths have now been fixed,
and the feature itself was never actually used, so we're better
off without it.

3 months agoPass-through handling (again) in tovmsspec.
Craig A. Berry [Wed, 6 Feb 2013 03:05:55 +0000]
Pass-through handling (again) in tovmsspec.

This is a partial retreat from b3efb2487fa7, where we started
passing through all ambiguous filespecs without modification. We
can now process the majority of cases that aren't macros, following
59247333b91 and various other commits that improved the escaping
of dots.  So for now we'll attempt to process these and pass
through macros only.

3 months agoMake vmsify support files with no directory component.
Craig A. Berry [Wed, 6 Feb 2013 01:04:23 +0000]
Make vmsify support files with no directory component.

We've been assuming there is always a directory portion to a path
being converted to VMS format, and it's true that translating
directory delimiters and such is the most noticeable aspect of
such conversions.  But we also depend on the conversion to add
caret escapes to characters in the path that are only valid when
using Extended Filename Syntax (EFS), but weren't doing that
for paths with no directory component.

I.e., this was working:

/disk/dir/foo%bar --> disk:[dir]foo^%bar

but this was not (until now):

foo%bar --> foo^%bar

Since we're now working on a pointer that has not necessarily
been incremented while adding directory syntax, we also add
a number of guards to make sure we don't peek beyond the
beginning of the result string.

N.B.  There will be a separate commit following shortly that
prevents paths with no directory component from being passed
through as-is -- here we just provide the infrastructure to
make that possible.

3 months agoUpdate Pod-Parser to CPAN version 1.60
Chris 'BinGOs' Williams [Tue, 5 Feb 2013 22:45:57 +0000]
Update Pod-Parser to CPAN version 1.60

  [DELTA]

  [Pod-Parser]

  31-Jan-2013           Marek Rouchal                        <marekr@cpan.org>
  -----------------------------------------------------------------------------
  Version 1.60
  + removed Pod::Checker and Pod::Usage from this distribution - they are now
    separate distros and are subjects to be refactored, to be based upon
    Pod::Simple. Thanks to rjbs for reminding me of this.

Add Pod-Checker and Pod-Usage to cpan/

These have been split out of Pod-Parser

  [Pod-Checker]

  27-Jan-2013           Marek Rouchal                        <marekr@cpan.org>
  -----------------------------------------------------------------------------
  Version 1.60
  + preparation of changing this module to use Pod::Simple
    refactored the Pod-Parser distribution and moved all things Pod::Checker
    to this new distribution package
  + CPAN RT#79535: Pod::Checker synopsis for podchecker is opposite
    corrected the POD synopsis
  + factored this distribution out of Pod-Parser-1.51

  [Pod-Usage]

  1.61 (marekr)
  - fix empty META.yml (CPAN RT#83118: META.yml is empty)
  - update outdated test expected data (CPAN RT#83111: fails test)
 
  1.60 (marekr)
  - moved POD behind __END__ for slighlty quicker loading
  - CPAN RT#81387: 2 suggestions for module Pod::Usage
    added example of how to use FindBin to locate the script;
    added $Pod::Usage::Formatter to allow a different base class
  - CPAN RT#75598: [PATCH] Don't use perldoc if it is missing
    implemented as suggested in the RT ticket
  - factored Pod::Usageout of the Pod-Parser distribution into a separate one,
    in order to prepare the rewrite based upon Pod::Simple
  - thanks to rjbs for driving this

3 months agoMake makemeta more cognisant and easier to use
Chris 'BinGOs' Williams [Tue, 5 Feb 2013 21:24:34 +0000]
Make makemeta more cognisant and easier to use

Provide -y and -j switches to produce yml or json
files, respectively, for use in regen rules and tests

The default behaviour is to produce both files.

Update release managers' guide to say to regen the
META files before generating release tarballs.

3 months agomakemeta no longer relies on the currently executing perl for version
Chris 'BinGOs' Williams [Tue, 5 Feb 2013 16:31:29 +0000]
makemeta no longer relies on the currently executing perl for version

3 months agoAdd use_versioned_archname to Configure
David Golden [Wed, 10 Nov 2010 16:15:50 +0000]
Add use_versioned_archname to Configure

This patch adds 'use_versioned_archname' as a Configure option.
When set, it includes 'api_versionstring' in 'archname'. E.g.
x86_64-linux-5.13.6-thread-multi.  It is unset by default.

This feature was requested by Tim Bunce, who observed that
INSTALL_BASE creates a library structure that does not
differentiate by perl version.  Instead, it places architecture
specific files in "$install_base/lib/perl5/$archname".  This makes
it difficult to use a common INSTALL_BASE library path with
multiple versions of perl.

By setting -Duse_versioned_archname, the $archname will be
distinct for architecture *and* API version, allowing mixed use of
INSTALL_BASE.

This patch demonstrates the desired effect for discussion.  Actual
changes would need to be made upstream in metaconfig and
integrated back into blead.

3 months agoRemove EFS escapes in unixify without directory components.
Craig A. Berry [Tue, 5 Feb 2013 13:20:23 +0000]
Remove EFS escapes in unixify without directory components.

When converting a VMS file specification containing caret escapes
for extended characters to Unix format, we need to remove those
escapes.  We were doing so for paths containing directory
components but we also need to do it for bare filenames.  I.e.,
this was working:

disk:[dir]foo^%bar --> /disk/dir/foo%bar

but this was not (until now):

foo^%bar --> foo%bar

3 months agoAdd tests and clarify pod for (?[ ])
Karl Williamson [Mon, 4 Feb 2013 21:03:09 +0000]
Add tests and clarify pod for (?[ ])

A compliled '(?[ ])' embedded in a larger one is unaffected by what
regex modifiers are in effect at the time of the compilation of the
outer one; it retains, going forward, the modifiers it had when it was
first encountered.

3 months agobisect-runner.pl: Reword some pod examples
Karl Williamson [Sat, 2 Feb 2013 19:58:57 +0000]
bisect-runner.pl: Reword some pod examples

I found myself better able to understand what's really happening given
this rewording.

3 months agoperldelta.pod: Fix misstatement
Karl Williamson [Mon, 4 Feb 2013 18:46:46 +0000]
perldelta.pod: Fix misstatement

Spotted by Aaron Crane

3 months agoAdd interpolations to regex sets
Karl Williamson [Sun, 3 Feb 2013 16:29:32 +0000]
Add interpolations to regex sets

This commit adds the capability for '(?[ ])' to contain interpolated
variables from other '(?[ ])' constructs.  A set operation can thus be
built up from the composition of other ones, without having to worry
about precedence, etc.

Thanks to Aaron Crane for suggesting this.

3 months agoIncorporate code review feedback for (?[])
Karl Williamson [Wed, 30 Jan 2013 19:39:51 +0000]
Incorporate code review feedback for (?[])

Thanks to Hugo van der Sanden for reviewing this new code.

3 months agoregcomp.c: Slight refactoring for clarity
Karl Williamson [Wed, 30 Jan 2013 16:34:44 +0000]
regcomp.c: Slight refactoring for clarity

This code was confusing enough that until a couple of commits ago, there
was a useless setting of a local variable.

3 months agoregcomp.c: Combine duplicated code
Karl Williamson [Wed, 30 Jan 2013 16:26:15 +0000]
regcomp.c: Combine duplicated code

3 months agoregcomp.c: Extract code into function
Karl Williamson [Wed, 30 Jan 2013 15:29:54 +0000]
regcomp.c: Extract code into function

The code to parse the flags that occur after in '(?foo)' and
'(?foo:bar)' is extracted into a function; some comments were added.
This is in preparation for this to be called from an additional place

3 months agoregcomp.c: Remove useless code
Karl Williamson [Wed, 30 Jan 2013 05:12:21 +0000]
regcomp.c: Remove useless code

This code sets a variable on the C stack, and two statements later
returns, throwing away that variable without ever using the new value.

3 months agoFix syntax: useless use of constant in void context
Alan Haggai Alavi [Sun, 3 Feb 2013 04:47:06 +0000]
Fix syntax: useless use of constant in void context

3 months agoCorrect word: Window => Windows
Alan Haggai Alavi [Sun, 3 Feb 2013 05:18:01 +0000]
Correct word: Window => Windows

3 months agoThe targets for makemeta in Makefile.SH were spelt wrong
Chris 'BinGOs' Williams [Sat, 2 Feb 2013 16:09:36 +0000]
The targets for makemeta in Makefile.SH were spelt wrong

3 months agoTeach makemeta to use CPAN::Meta to generate both META.json and META.yml
Chris 'BinGOs' Williams [Sat, 26 Jan 2013 12:46:44 +0000]
Teach makemeta to use CPAN::Meta to generate both META.json and META.yml

3 months agoUpdate Module-Load to CPAN version 0.24
Chris 'BinGOs' Williams [Fri, 1 Feb 2013 21:53:23 +0000]
Update Module-Load to CPAN version 0.24

  [DELTA]

  Changes for 0.24    Fri Feb  1 18:14:28 2013
  ============================================
  * Resolve [rt #83093] "Won't load modules with apostrophes"
    reported by Dave Golden

3 months agoregexec.c: Remove redundant code
Karl Williamson [Fri, 1 Feb 2013 04:08:09 +0000]
regexec.c: Remove redundant code

This code does a save_re_context() and then calls swash_init, which also
does a save_re_context.  This is unnecessary; the save should be done in
the lowest possible level.

3 months agoMerge branch 'data-dumper-testing' into blead
James E Keenan [Fri, 1 Feb 2013 02:43:26 +0000]
Merge branch 'data-dumper-testing' into blead

3 months agoregcomp.c: Expand diagnostic
Karl Williamson [Thu, 31 Jan 2013 16:15:05 +0000]
regcomp.c: Expand diagnostic

Perl 5.16 added a deprecation message for an unescaped left brace
following \b and \B in regular expression patterns.  It suggests
escaping the brace by preceding it with a backslash.  This doesn't work
if the pattern delimiters are {}.  Instead, one can escape the brace
by enclosing it within square brackets.  In recent Perls, this compiles
identically to the backslashed version.

This comit expands the message to suggest both options.

3 months agoRemove dead code in Perl_sv_cmp_flags
Steffen Mueller [Thu, 31 Jan 2013 09:58:36 +0000]
Remove dead code in Perl_sv_cmp_flags

Most certainly compiled away anyway, but still dead.

3 months agoData-Dumper: Boost test coverage and refactor.
James E Keenan [Sun, 20 Jan 2013 00:20:21 +0000]
Data-Dumper: Boost test coverage and refactor.

Thanks to coverage data posted by Paul Johnson as part of Perl
Foundation-sponsored work, we know that as of Jan 01 2013, Data::Dumper
(v2.139) had the following coverage of its code by its test suite:

                          stmt  bran  cond   sub
Dumper.xs                 94.8  64.5
blib/lib/Data/Dumper.pm   85.3  76.7  69.6  71.4

The coverage levels reported for Dumper.pm are unacceptably low,
particularly for a library which is part of the Perl 5 core
distribution.  With this commit, we significantly improve
coverage of Dumper.pm; Dumper.xs will need attention from those with XS
expertise.

Attempting to write tests for every line in a codebase frequently
uncovers places in the code that are superfluous or cannot be reached.
The close study of the code required to achieve high test coverage also
discloses places where the code and its documentation are at odds with
each other.  This work on Data::Dumper is no exception, so we have made
changes to Dumper.pm where appropriate.  In addition, in order to
facilitate this analysis and to make the codebase easier to maintain
going forward, the code in Dumper.pm has been tidied up in certain
locations, mostly with respect to tabs vs. whitespace in indentation and
cuddled elses.

Specifics of this commit:

* Modifications to Dumper.pm

** Eliminate subs Dumpf() and Dumpp, which were neither documented nor
tested anywhere in the codebase.  (They will be reinstated if and only
if someone can provide a rationale for that, along with documentation
and testing.)

** For both Values() and Names():  explicit handling (croak) of the case
where the method is provided with a defined argument that is not an
array reference.

** Tidying, mostly in _dump().

** Deletion of commented-out code.

* New test files

** t/deparse.t
** t/dumpperl.t
** t/indent.t
** t/misc.t
** t/names.t
** t/purity_deepcopy_maxdepth.t
** t/quotekeys.t
** t/seen.t
** t/sortkeys.t
** t/sparseseen.t
** t/toaster.t
** t/values.t

** t/lib/Testing.pm - package holding subs used in the new test files

* Expanded test files

** t/freezer.t
** t/terse.t

* Add test for variable type which Data-Dumper does not handle.  Improve
punctuation in fatal error messge.  Related to: RT #101508.

The work done so far has significantly improved the coverage.  As of Jan
26 2013 we are at:
                                  stmt  bran  cond   sub
Jan 01: blib/lib/Data/Dumper.pm   85.3  76.7  69.6  71.4
Jan 26: blib/lib/Data/Dumper.pm   97.9  94.3  82.1  97.6

Additional revisions submitted by Aaron Crane++:

* Adjust newly-added comment.  Without this change, it appears to run on
into the existing comment on the next line.

* Mention "undefined" in carp message, not "non-ref".  This is a more
precise description of the problem encountered.

* Whitespace corrections.

* Avoid scalar-IO in test routine; just return the concatenated ->Dump
return values directly.

3 months agoAdd Config::Perl::V coring to perldelta
Chris 'BinGOs' Williams [Wed, 30 Jan 2013 20:54:50 +0000]
Add Config::Perl::V coring to perldelta

3 months agoreplace "new in Perl 5" hype with timeless Perl hype
Ricardo Signes [Mon, 28 Jan 2013 03:53:06 +0000]
replace "new in Perl 5" hype with timeless Perl hype

3 months agopmruntime(): change '=' to '==' in an assertion
David Mitchell [Wed, 30 Jan 2013 16:40:55 +0000]
pmruntime(): change '=' to '==' in an assertion

Whoops!

Probably harmless, since if the thing it was intended to assert for
was indeed true, then the assignment would be a noop anyway.

3 months agopmruntime(): rename var to avoid macro name clash
David Mitchell [Wed, 30 Jan 2013 16:37:22 +0000]
pmruntime(): rename var to avoid macro name clash

[perl #116557]

Apparently MS's WinCE SDK #defines 'leave'. So rename the 'leave' variable
to 'leaveop' to avoid clashes.

3 months agohv.c: add some NULL check removal
bulk88 (via RT) [Mon, 24 Dec 2012 02:20:10 +0000]
hv.c: add some NULL check removal

The purpose is less machine instructions/faster code.

* S_hv_free_ent_ret() is always called with entry non-null: so change its
  signature to reflect this, and remove a null check;

* Add some SvREFCNT_dec_NNs;

* In hv_clear(), refactor the code slightly to only do a SvREFCNT_dec_NN
within the branch where its already been determined that the arg is
non-null; also, use the _nocontext variant of Perl_croak() to save
a push instruction in threaded perls.

3 months agoUpdate Win32API-File to CPAN version 0.1201
Chris 'BinGOs' Williams [Mon, 28 Jan 2013 19:22:39 +0000]
Update Win32API-File to CPAN version 0.1201

  [DELTA]

  0.1201 by Alexandr Ciornii 2013-01-28
        - Fix tests on Cygwin (RURBAN)
        - Constants for GetStdHandle and SetStdHandle

3 months agoConvert t/op/sprintf.t to use test.pl
Marcel Gruenauer (via RT) [Tue, 22 Jan 2013 20:02:43 +0000]
Convert t/op/sprintf.t to use test.pl

[perl #116513]

3 months agoPorting/Maintainers.pm: deterministic output order
Marcel Gruenauer (via RT) [Tue, 22 Jan 2013 20:02:39 +0000]
Porting/Maintainers.pm: deterministic output order

[perl #116509]

Change Porting/Maintainers.pm to output tests in the same order each
time t/porting/maintainers.t is run.

Before, it was difficult to see whether editing t/porting/maintainers.t
didn't have any adverse effects. The random output order could be seen
with

    diff <(./perl t/porting/maintainers.t) <(./perl t/porting/maintainers.t)

Also set Porting/Maintainers.pm version to 0.09.

3 months agoUpdate Pod-Perldoc to CPAN version 3.19
Chris 'BinGOs' Williams [Mon, 28 Jan 2013 11:15:47 +0000]
Update Pod-Perldoc to CPAN version 3.19

  [DELTA]

  3.19 - Mon Jan 28 04:29:40 UTC 2013
    * Really put perldoc.pod into man1

  3.18 - Mon Jan 28 04:17:26 UTC 2013
    * Document perldoc behavior in build directories (RT #80376)
    * Don't blindly force UTF8 to Pod::Man (RT #77465)
    * Fix is_dos typo (RT #76029)
    * Put perldoc.pod into man1 RT #77210 (ppisar@redhat.com)
    * Remove formatting from literal blocks RT #77209 (ppisar@redhat.com)

3 months agoLet Configure honor the external MAILDOMAIN environment variable, if set.
H.Merijn Brand [Mon, 28 Jan 2013 07:55:53 +0000]
Let Configure honor the external MAILDOMAIN environment variable, if set.

3 months agoBelated Happy New Year!
James E Keenan [Sun, 27 Jan 2013 23:55:42 +0000]
Belated Happy New Year!

3 months agoFix podcheck errors in perldelta
Chris 'BinGOs' Williams [Sun, 27 Jan 2013 21:40:37 +0000]
Fix podcheck errors in perldelta

3 months agoDocument module and utility deprecations in perldelta
Chris 'BinGOs' Williams [Sun, 27 Jan 2013 21:23:35 +0000]
Document module and utility deprecations in perldelta

3 months agoAdd module deprecations for v5.18.0 to Module::CoreList
Chris 'BinGOs' Williams [Sun, 27 Jan 2013 15:24:43 +0000]
Add module deprecations for v5.18.0 to Module::CoreList

3 months agoNew TODO test: B::Deparse doesn't handle lexical subs
Aaron Crane [Sun, 27 Jan 2013 10:56:14 +0000]
New TODO test: B::Deparse doesn't handle lexical subs

See RT #116553.

3 months agoFix installman ignoring --silent
Dagfinn Ilmari Mannsåker [Sat, 26 Jan 2013 17:01:25 +0000]
Fix installman ignoring --silent

3 months agoUpdate Archive-Extract to CPAN version 0.64
Chris 'BinGOs' Williams [Sun, 27 Jan 2013 01:04:28 +0000]
Update Archive-Extract to CPAN version 0.64

  [DELTA]

  Changes for 0.64    Sat Jan 26 21:07:03 2013
  ============================================
  * Add deprecation usage to warn if the
    module is loaded from corelib.
    Archive::Extract is leaving core with
    v5.20.0, but will remain available from
    CPAN.

3 months agoun-TODO a test that passes on recent FreeBSD
Tony Cook [Sat, 26 Jan 2013 03:06:37 +0000]
un-TODO a test that passes on recent FreeBSD

It may pass on earlier FreeBSD, but I don't have it available to
check.

3 months agoEINVAL is expected when f?pathconf() isn't implemented for a path
Tony Cook [Fri, 25 Jan 2013 11:09:25 +0000]
EINVAL is expected when f?pathconf() isn't implemented for a path

This can happen when a particular file system doesn't implement a
particular variable.

RT# 116463

3 months agoavoid PERL_UNICODE interfering with the new PerlIO-scalar tests
Tony Cook [Sun, 27 Jan 2013 04:17:24 +0000]
avoid PERL_UNICODE interfering with the new PerlIO-scalar tests

3 months agoPATCH [perl 116252]: Correct nested pod bullets in perl5177delta.pod
Smylers [Sat, 26 Jan 2013 23:19:06 +0000]
PATCH [perl 116252]: Correct nested pod bullets in perl5177delta.pod

3 months agoPorting/todo.pod: Add tasks
Karl Williamson [Sat, 26 Jan 2013 19:06:49 +0000]
Porting/todo.pod: Add tasks

This requests people to volunteer to

1) classify type unknown bug tickets

2) investigate new tickets, classify them, and get TODO tests from the
originator

3) add TODO tests to old tickets

3 months agoUpdate B-Lint to CPAN version 1.17
Chris 'BinGOs' Williams [Sat, 26 Jan 2013 16:51:18 +0000]
Update B-Lint to CPAN version 1.17

  [DELTA]

  1.17    2013-0126
          make the use of "deprecate" conditional

3 months agoreplace tabs with spaces
Tobias Leich [Thu, 24 Jan 2013 09:05:46 +0000]
replace tabs with spaces

Use spaces like the rest of the pod does.

3 months agowrap examples in single quotes
Tobias Leich [Thu, 24 Jan 2013 09:04:24 +0000]
wrap examples in single quotes

Examples that use $ as metacharacter should be in single quotes,
or the dollar must be escaped.

3 months agoUpdate lib/.gitignore to include Config-Perl-V generated file
Chris 'BinGOs' Williams [Sat, 26 Jan 2013 14:50:15 +0000]
Update lib/.gitignore to include Config-Perl-V generated file

3 months agoImport Config-Perl-V 0.16
Ricardo Signes [Sat, 26 Jan 2013 13:28:50 +0000]
Import Config-Perl-V 0.16

3 months agoprevent failures deep in value dumping from aborting
Ricardo Signes [Fri, 25 Jan 2013 03:44:22 +0000]
prevent failures deep in value dumping from aborting

Sometimes, dumpvar's dumpvalue routine gets a value it can't dump.  The
simplest example to contrive is the one in this test: a tied hash that
can't tell you its keys.  Until now, this would cause the whole dump to
abort as soon as it failed to dump one part.

With this commit, each stringify or unwind is inside an eval.  Failed
stringifications or unwindings are replaced with a placeholder showing
the error.

unwind uses return to stop early, and rather than go through contortions
to wrap the eval in something that can then return 1 to test that eval
worked, I've just asserted that this code requires 5.14.0, which made $@
a much more reliable indicator of failure after eval.

3 months agoperldelta for f0af002c73 (-DPERL_GLOBAL_STRUCT)
Tony Cook [Sat, 26 Jan 2013 04:24:38 +0000]
perldelta for f0af002c73 (-DPERL_GLOBAL_STRUCT)

3 months agoFix format string warnings in toke.c Changed literals to "%s", literal
Peter Martini [Fri, 25 Jan 2013 17:06:47 +0000]
Fix format string warnings in toke.c Changed literals to "%s", literal

3 months agoUpdate CPANPLUS-Dist-Build to CPAN version 0.70
Chris 'BinGOs' Williams [Fri, 25 Jan 2013 16:37:59 +0000]
Update CPANPLUS-Dist-Build to CPAN version 0.70

  [DELTA]

  0.70 Fri Jan 25 15:58:27 GMT 2013
    - Add deprecation usage to warn if modules are loaded
      from corelib. CPANPLUS::Dist::Build will be leaving
      core with v5.20.0 and will still be available on
      CPAN.

3 months agoCorrect variable names in embed.fnc for hv_free_ent and hv_free_ent_ret.
Andy Dougherty [Fri, 25 Jan 2013 15:12:35 +0000]
Correct variable names in embed.fnc for hv_free_ent and hv_free_ent_ret.

Make the second variable name in embed.fnc match those used in the
actual function declaration.  This will matter if we add in 'entry'
to PERL_ARGS_ASSERT_HV_FREE_ENT_RET.  Also regen headers (only proto.h
is affected) to match.

3 months agoUpdate B-Lint to CPAN version 1.16
Chris 'BinGOs' Williams [Fri, 25 Jan 2013 08:13:12 +0000]
Update B-Lint to CPAN version 1.16

  [DELTA]

  1.16    2013-01-23
        install to sitelib, not corelib on 5.12.0 and later

  1.15    2013-01-23
        Merge changes from perl core:
        - Stop the indexer from processing private modules

        Add warning that B::Lint will be removed from core, if used from core

3 months agofix -DPERL_GLOBAL_STRUCT_PRIVATE builds
Tony Cook [Fri, 25 Jan 2013 02:54:47 +0000]
fix -DPERL_GLOBAL_STRUCT_PRIVATE builds