platform/upstream/perl.git
13 years agooverload.pl -> regen/overload.pl
Father Chrysostomos [Thu, 14 Oct 2010 06:24:22 +0000 (23:24 -0700)]
overload.pl -> regen/overload.pl

13 years agoopcode.pl -> regen/opcode.pl
Father Chrysostomos [Thu, 14 Oct 2010 06:18:36 +0000 (23:18 -0700)]
opcode.pl -> regen/opcode.pl

13 years agokeywords.pl -> regen/keywords.pl
Father Chrysostomos [Thu, 14 Oct 2010 06:22:56 +0000 (23:22 -0700)]
keywords.pl -> regen/keywords.pl

13 years agoembed.pl -> regen/embed.pl
Father Chrysostomos [Thu, 14 Oct 2010 06:15:06 +0000 (23:15 -0700)]
embed.pl -> regen/embed.pl

so newcomers can find it more easily

13 years agoaf00134636ffe4172cbffeaed3bbad802e58d8a0 broke regen_perly.
Zefram [Thu, 14 Oct 2010 05:34:15 +0000 (22:34 -0700)]
af00134636ffe4172cbffeaed3bbad802e58d8a0 broke regen_perly.

13 years agoperldelta up to 825563b9
Father Chrysostomos [Thu, 14 Oct 2010 05:31:59 +0000 (22:31 -0700)]
perldelta up to 825563b9

13 years agoperldelta up to 7ec2c349
Father Chrysostomos [Thu, 14 Oct 2010 01:15:07 +0000 (18:15 -0700)]
perldelta up to 7ec2c349

13 years agoperldelta up to 07ffcb738
Father Chrysostomos [Thu, 14 Oct 2010 01:01:47 +0000 (18:01 -0700)]
perldelta up to 07ffcb738

13 years agoperldelta up to 91332126
Father Chrysostomos [Wed, 13 Oct 2010 23:31:28 +0000 (16:31 -0700)]
perldelta up to 91332126

13 years agoperldelta up to 2748c77610
Father Chrysostomos [Wed, 13 Oct 2010 21:53:09 +0000 (14:53 -0700)]
perldelta up to 2748c77610

13 years agoAdd tests for the usage messages for Tie::Hash::NamedCapture::*
Nicholas Clark [Wed, 13 Oct 2010 20:04:47 +0000 (21:04 +0100)]
Add tests for the usage messages for Tie::Hash::NamedCapture::*

13 years agoIn reg_nc_tie.t, use like() to get better diagnostics on failure.
Nicholas Clark [Wed, 13 Oct 2010 17:58:06 +0000 (18:58 +0100)]
In reg_nc_tie.t, use like() to get better diagnostics on failure.

13 years agoAdd perl5122delta
Florian Ragwitz [Wed, 13 Oct 2010 15:35:03 +0000 (17:35 +0200)]
Add perl5122delta

13 years agoStop cpan/CGI/t/http.t from failing
Father Chrysostomos [Wed, 13 Oct 2010 16:45:08 +0000 (09:45 -0700)]
Stop cpan/CGI/t/http.t from failing

A similar patch has been applied upstream. This will be overwritten
when the next CGI.pm is merged into blead, but at least we can get
the tests passing for now.

This does not affect any installed files.

13 years agoIn S_save_scalar_at, remove oldtainted, unneeded since 0cbee0a449cc4e11.
Nicholas Clark [Wed, 13 Oct 2010 16:07:34 +0000 (17:07 +0100)]
In S_save_scalar_at, remove oldtainted, unneeded since 0cbee0a449cc4e11.

0cbee0a449cc4e11 removed the call to mg_get(), and hence any possibility of
calling code with the side effect of changing PL_tainted.

13 years agoConsistent stack handling for XS_re_regnames_*
Nicholas Clark [Wed, 13 Oct 2010 15:16:11 +0000 (16:16 +0100)]
Consistent stack handling for XS_re_regnames_*

This may also fix bugs for the (untested) cases where the called routine
returns NULL, and the calling routine attempted XSRETURN_UNDEF.

13 years agoConsistent usage messages for XS_Tie_Hash_NamedCapture_*
Nicholas Clark [Wed, 13 Oct 2010 13:37:16 +0000 (14:37 +0100)]
Consistent usage messages for XS_Tie_Hash_NamedCapture_*

The $flags argument is actually the object, so should not be mentioned.

13 years agoIn XS_Tie_Hash_NamedCapture_{CLEAR,STORE}, free any returned value.
Nicholas Clark [Wed, 13 Oct 2010 13:12:27 +0000 (14:12 +0100)]
In XS_Tie_Hash_NamedCapture_{CLEAR,STORE}, free any returned value.

The calling convention for CALLREG_NAMED_BUFF_*() is to return NULL, or a
reference to a scalar. For CLEAR and STORE we return no values, so if we're
erroneously passed a reference, we should free it to stop it being leaked.

13 years agoConsistent stack handling for XS_Tie_Hash_NamedCapture_*
Nicholas Clark [Wed, 13 Oct 2010 12:56:38 +0000 (13:56 +0100)]
Consistent stack handling for XS_Tie_Hash_NamedCapture_*

This may also fix bugs for the (untested) cases where CALLREG_NAMED_BUFF_*
returned NULL, and the calling routine attempted XSRETURN_UNDEF.

It's fine to call sv_2mortal() on the immortals returned by
CALLREG_NAMED_BUFF_EXISTS()

13 years agoXS_Tie_Hash_NamedCapture_DELETE should return a value.
Nicholas Clark [Wed, 13 Oct 2010 10:09:02 +0000 (11:09 +0100)]
XS_Tie_Hash_NamedCapture_DELETE should return a value.

The core's regexp implementation will always croak, but other pluggable engines
may have read/write semantics, and hence return from their delete call.

Note that STORE and EXISTS are called in void context, hence their return stack
is discarded.

13 years agoperlfaq4: use given() in number/float/integer answer
brian d foy [Wed, 13 Oct 2010 07:40:49 +0000 (02:40 -0500)]
perlfaq4: use given() in number/float/integer answer

How do I determine whether a scalar is a number/whole/integer/float?

David Canzi also adjusted some of the regexes. The
real number and decimal number tests are really the
same thing, and we don't have to capture in the float
case.

13 years agoFix typos in comments
Karl Williamson [Tue, 12 Oct 2010 22:24:59 +0000 (16:24 -0600)]
Fix typos in comments

13 years agoperldelta entries for op-building functions and LINKLIST
Zefram [Wed, 13 Oct 2010 05:18:46 +0000 (22:18 -0700)]
perldelta entries for op-building functions and LINKLIST

13 years agocharnames.t: Make sure code point aliasess are right
Karl Williamson [Thu, 7 Oct 2010 04:16:56 +0000 (22:16 -0600)]
charnames.t: Make sure code point aliasess are right

Some code points have two (possibly more names).  This makes sure that
all work.

13 years agocharnames.t: Extract common code to subroutine
Karl Williamson [Thu, 7 Oct 2010 04:12:35 +0000 (22:12 -0600)]
charnames.t: Extract common code to subroutine

13 years ago[perl #78362] Make mro_package_moved check for recursion
Father Chrysostomos [Wed, 13 Oct 2010 05:07:17 +0000 (22:07 -0700)]
[perl #78362] Make mro_package_moved check for recursion

The existence of main::main::... caused mro_package_moved to break
Text::Template, and probably Acme::Meta as well.

13 years agoANSI C-ify the Perl_mro_isa_changed_in return mathoms.c
Tony Cook [Tue, 12 Oct 2010 23:12:35 +0000 (10:12 +1100)]
ANSI C-ify the Perl_mro_isa_changed_in return mathoms.c

A return statement with an expression shall not appear in a
function whose return type is void.

See http://source.test-smoke.org/tsdb?mode=report&rid=86779&top=86781
for an example build failure.

13 years agomktables: Change name of option to -annotate
Karl Williamson [Mon, 11 Oct 2010 19:04:02 +0000 (13:04 -0600)]
mktables: Change name of option to -annotate

This name is more descriptive of what this option has come to be.  The
previous option name has been released only in a few of the 5.13 series
Perls, and is for internal mktables development only, so backward
compatibility shouldn't be an issue.

13 years agomktables: Change variable name
Karl Williamson [Mon, 11 Oct 2010 19:00:59 +0000 (13:00 -0600)]
mktables: Change variable name

More than just names are output now, $output_names is renamed $annotate

13 years agomktables: Extend -output_names option
Karl Williamson [Mon, 11 Oct 2010 18:49:58 +0000 (12:49 -0600)]
mktables: Extend -output_names option

This option is not used for production, but is useful for someone
running mktables by hand who wants to compare Unicode versions, and
perhaps for debugging mktables.  It causes the code points in the output
tables to have comments added that give information about that code
point, so it isn't necessary to look up the hex numbers.

This patch is a significant expansion of the previous capability, and
adds the character's representation, and text for the non-named
characters.

I'm finding it useful in moving to Unicode 6.0.

13 years agomktables: Add arg to write() to say if in utf8
Karl Williamson [Mon, 11 Oct 2010 18:10:28 +0000 (12:10 -0600)]
mktables: Add arg to write() to say if in utf8

This will be used for annotations.  Currently no file is written in
utf8, so the calls all have 0 for the parameter.

13 years agomktables: Move method to different class
Karl Williamson [Mon, 11 Oct 2010 17:20:25 +0000 (11:20 -0600)]
mktables: Move method to different class

matches_identically_to() was a Table method, but it really applies to
the Range_List contained in the table.  Moving it to that class instead
will help with later code that wants to compare a Range_List that isn't
in a table.

13 years agomktables: Remove extraneous error message
Karl Williamson [Mon, 11 Oct 2010 16:47:04 +0000 (10:47 -0600)]
mktables: Remove extraneous error message

When I created matches_identically_to() originally, I just copied from
another subroutine, changing a few things.  I shouldn't have copied this
message, as it was only applicable to the original routine.

13 years agomktables: Change method name for clarity
Karl Williamson [Mon, 11 Oct 2010 16:33:06 +0000 (10:33 -0600)]
mktables: Change method name for clarity

is_equivalent_to() doesn't mean what it says.  Instead it means if the
two objects have been set equivalent to each other.

13 years agomktables: Finish the refactoring out of a pass.
Karl Williamson [Mon, 11 Oct 2010 03:59:25 +0000 (21:59 -0600)]
mktables: Finish the refactoring out of a pass.

Commit e1a3bfbd2f5194edc05010f0b5e5a568b1fdf508
omitted some code that was in my working version.  My git skills aren't
good enough to go back and add that in without zapping everything else.

13 years agomktables: Remove unshift onto large array
Karl Williamson [Mon, 11 Oct 2010 00:14:08 +0000 (18:14 -0600)]
mktables: Remove unshift onto large array

This changes the parameters to write() so it can accept more than one
array ref, thus eliminating the need for an unshift onto a large array.

13 years agomktables: Rmv obsolete field
Karl Williamson [Sun, 10 Oct 2010 22:36:06 +0000 (16:36 -0600)]
mktables: Rmv obsolete field

has_specials was used to avoid an extra pass for tables that didn't
need it.  That pass has been eliminated, so this code is useless.

13 years agomktables: refactor to eliminate a pass over tables
Karl Williamson [Sun, 10 Oct 2010 22:22:44 +0000 (16:22 -0600)]
mktables: refactor to eliminate a pass over tables

This patch is mainly for performance, but in eliminating a pass which
modified the tables, it allows for later changes to not have to rely on
things happening in a certain order.

Previously, tables that had special ranges in them, such as mappings to
multiple characters and character names that are algorithmically
derivable had a separate pass to process those ranges ahead of the main
table, as the information about these is output at the beginning of the
file.

What this patch does is to add a call-back for the processing of
the main body to call when it finds a special range that it doesn't
handle.  That call-back just adds the information to various
temporaries, depending on what the range is.

After the processing of all the ranges, those temporaries hold all the
information needed to output the specials data.  This is processed and
the text is unshifted to the beginning of the output.

pre_body() used to process all this.  But it has been split up.  The
code that does need to go at the beginning is moved to the write()
routine for the sub-class, which processes it before calling the super
class's write.  The code that figured out about the special ranges is
moved to the new call-back handle_special_range().  The remaining code
remains in pre_body(), but it is now called later in the process.

13 years agomktables: Add # XXX so can find experimental code
Karl Williamson [Sun, 10 Oct 2010 21:01:28 +0000 (15:01 -0600)]
mktables: Add # XXX so can find experimental code

13 years agomktables: Move 'format' to base class
Karl Williamson [Sun, 10 Oct 2010 15:58:24 +0000 (09:58 -0600)]
mktables: Move 'format' to base class

This patch is in preparation for adding more complete annotations to the
output tables.  Previously, only Map tables had a listed format.  Match
tables also have a format (empty), but that was understood.  But the new
annotation code will need to refer to that format, so I moved the field
into the base class common to both types of tables, and added the
EMPTY_FORMAT for use by Match tables.

13 years agomktables: Change format name for Decomposition.pl
Karl Williamson [Sun, 10 Oct 2010 15:41:44 +0000 (09:41 -0600)]
mktables: Change format name for Decomposition.pl

This table which is used only by Normalize.pm has a special format that
is used in no other table.  In preparation for adding annotations to it,
make a special format signifier for it.  This affects only one line at
the top that indicates to the user the format of the table.

The table has comments in it to say it is volatile and no one should use
this table besides Normalize.pm, which currently doesn't look at that
signifier.

13 years agomktables: change variable name for clarity
Karl Williamson [Sun, 10 Oct 2010 15:36:45 +0000 (09:36 -0600)]
mktables: change variable name for clarity

I found that 'youngest' was confusing

13 years agomktables: if modify during run, regen tables
Karl Williamson [Sun, 10 Oct 2010 15:28:09 +0000 (09:28 -0600)]
mktables: if modify during run, regen tables

This bug has bitten me enough times that I decided to fix it.  It would
only be applicable to someone who is developing mktables, and making
changes to it while the program is running.  Due to the complicated
nature of the dependencies of mktables, it basically functions as its
own make command, knowing when to rebuild or not based on the
modification times of itself and its input and output files.
Previously, it did not account for changes to itself made while running,
so it would think that it wouldn't have to rebuild, even though it did.

I solve this problem by keeping track of the time the process started,
and storing it in mktables.lst.  If something has changed since then,
then the files need to be rebuilt.

13 years agomktables: rewrite 'if' statement for clarity
Karl Williamson [Sun, 10 Oct 2010 15:08:05 +0000 (09:08 -0600)]
mktables: rewrite 'if' statement for clarity

13 years agomktables: complement variable name for rebuilding
Karl Williamson [Sun, 10 Oct 2010 14:57:56 +0000 (08:57 -0600)]
mktables: complement variable name for rebuilding

This is an intermediate patch that changes the variable name as to
whether the files need rebuilding or not to something I understand
better.  This has long been confusing, as up until a year ago, there had
been a long-standing bug in the program that didn't get it right.

13 years agomktables: Add type_of() method to get range's type
Karl Williamson [Sat, 9 Oct 2010 23:58:11 +0000 (17:58 -0600)]
mktables: Add type_of() method to get range's type

This will be useful in outputting better annotations.

13 years agomktables: Convert value_of() to use containing_range()
Karl Williamson [Sat, 9 Oct 2010 23:42:48 +0000 (17:42 -0600)]
mktables: Convert value_of() to use containing_range()

13 years agomktables: Remove extraneous debug statement
Karl Williamson [Sat, 9 Oct 2010 23:40:45 +0000 (17:40 -0600)]
mktables: Remove extraneous debug statement

13 years agomktables: Add containing_range method
Karl Williamson [Sat, 9 Oct 2010 23:33:30 +0000 (17:33 -0600)]
mktables: Add containing_range method

This method will be used in multiple places

13 years agomktables: Clarify comment in generated tables
Karl Williamson [Sat, 9 Oct 2010 23:29:35 +0000 (17:29 -0600)]
mktables: Clarify comment in generated tables

Tables whose values are strings, aren't arbitrary strings, as for
example they can't contain '#' characters that start comments.  So,
don't say they are 'arbitrary'.

13 years agomktables: Clarify comment in generated tables
Karl Williamson [Sat, 9 Oct 2010 22:49:59 +0000 (16:49 -0600)]
mktables: Clarify comment in generated tables

An installation may choose to output more tables than by default.  The
comment in tables should make it clearer that these are not necessarily
present.

13 years agomktables: Save reference to two commonly used tables
Karl Williamson [Sat, 9 Oct 2010 21:28:58 +0000 (15:28 -0600)]
mktables: Save reference to two commonly used tables

These two tables can be used frequently, so save a reference instead of
looking it up each time

13 years agomktables: Improve message
Karl Williamson [Sat, 9 Oct 2010 20:59:15 +0000 (14:59 -0600)]
mktables: Improve message

13 years agomktables: Remove commented out obsolete code
Karl Williamson [Sat, 9 Oct 2010 20:56:46 +0000 (14:56 -0600)]
mktables: Remove commented out obsolete code

This functionality is now in charnames.

13 years agomktables: Can't generate simple casing tables
Karl Williamson [Sat, 9 Oct 2010 20:35:08 +0000 (14:35 -0600)]
mktables: Can't generate simple casing tables

The simple as opposed to the full casing tables weren't able to be
generated correctly because I was passing the name of a table instead of
its object.  Normally these tables are generated at all, but I turned
generation of them on temporarily for development purposes, and found
this bug.  So there is no test case that can be generated for this fix.

13 years agomktables: Use more descriptive property names
Karl Williamson [Sat, 9 Oct 2010 20:29:45 +0000 (14:29 -0600)]
mktables: Use more descriptive property names

13 years agomktables: Make generated files use hex code points
Karl Williamson [Sat, 9 Oct 2010 20:18:56 +0000 (14:18 -0600)]
mktables: Make generated files use hex code points

Certain generated files had some values converted from hex into decimal.
All the published values are in hex, so should use the more familiar
form for readability.

13 years agomktables: fix typos in comments
Karl Williamson [Sat, 9 Oct 2010 20:04:24 +0000 (14:04 -0600)]
mktables: fix typos in comments

13 years agoperldelta entry for cv_set_call_checker
Zefram [Tue, 12 Oct 2010 17:32:06 +0000 (10:32 -0700)]
perldelta entry for cv_set_call_checker

plus tweaks from Reini Urban and the committer

13 years agoAdd LINKLIST to the API.
Ben Morrow [Mon, 11 Oct 2010 05:19:44 +0000 (06:19 +0100)]
Add LINKLIST to the API.

Also rename the underlying function to op_linklist, to match the other
API op functions.

13 years agoAPIify op list constructors
Zefram [Mon, 4 Oct 2010 21:19:08 +0000 (22:19 +0100)]
APIify op list constructors

Put into the API op_append_elem, op_prepend_elem, and op_append_list.  All
renamed from op_-less internal names.  Parameter types for op_append_list
changed to match the rest of the op API and avoid some casting.

13 years agoReset isa caches on nonexistent substashes when stash trees are moved
Father Chrysostomos [Tue, 12 Oct 2010 17:13:58 +0000 (10:13 -0700)]
Reset isa caches on nonexistent substashes when stash trees are moved

This fixes the problem of isa cache linearisations’ and method caches’
not being reset on nonexistent packages when they are replaced with
real packages as a result of parent stashes’ being moved. This can
happen in cases like this:

  @left::ISA = 'outer::inner';
  @right::ISA = 'clone::inner';
  {package outer::inner}
  *clone:: = \%outer::;
  print "ok 1", "\n" if left->isa("clone::inner");
  print "ok 2", "\n" if right->isa("outer::inner");

This changes mro_package_moved’s parameter list as documented in the
diff for mro.c. See also the new comments in that function.

13 years agoIn APItest.xs, augment croak("fail") with the file name and line number.
Nicholas Clark [Tue, 12 Oct 2010 19:41:36 +0000 (20:41 +0100)]
In APItest.xs, augment croak("fail") with the file name and line number.

With this, it should be possible to determine which C condition failed without
needing to run the test under a debugger. A debugger may still be needed to
determine *why*.

13 years agoXS_Tie_Hash_NamedCapture_STORE should always croak on invalid parameters.
Nicholas Clark [Tue, 12 Oct 2010 17:03:45 +0000 (18:03 +0100)]
XS_Tie_Hash_NamedCapture_STORE should always croak on invalid parameters.

Previously, it would return undef instead of calling Perl_croak_no_modify() if
PL_localizing was true. However, that case can never be reached. PL_localizing
is set non-zero for

1: Perl_mg_localize and PL_save_scalar, for the duration of executing the local
2: Perl_leave_scope for the duration of unwinding the local

However, XS_Tie_Hash_NamedCapture_STORE can't be reached in either case, with
PL_curpm NULL (or otherwise invalid) || !SvROK(ST(0)).

Case 1 would be the call to save_helem_flags() in pp_helem. However, this is
only reached if preeminent is TRUE, which will only hold if hv_exists_ent()
has already returned TRUE, which will only be possible if PL_curpm and ST(0)
are valid.

Case 2 would be the case SAVEt_HELEM in Perl_leave_scope(). However, this
case is only reached as part of the unwinding from Case 1 above, so again
PL_curpm and ST(0) will be valid, for this dynamic scope.

This commit is the patch proposed in RT ##77610. It does not resolve all issues
in that ticket.

Currently C<local $1> is legal - it's a runtime no-op, which neither errors
*nor* resets $1 to undef. Clearly C<local $+{k}> is inconsistent with this,
(as it errors at scope exit for all cases, and additionally errors at local
time if $+{k} exists) but I consider it not worth fixing until we decide
whether C<local $1>'s current behaviour is a "bug" or a "feature".

13 years agoCorrect mistaken references to &PL_sv_true and &PL_sv false in perlguts
Andrew Rodland [Tue, 12 Oct 2010 12:27:23 +0000 (07:27 -0500)]
Correct mistaken references to &PL_sv_true and &PL_sv false in perlguts

Their correct names are &PL_sv_yes and &PL_sv_no.

13 years agoMemoize has CPAN as its upstream
Florian Ragwitz [Tue, 12 Oct 2010 09:43:17 +0000 (11:43 +0200)]
Memoize has CPAN as its upstream

13 years agoImprove documentation of \Q
Eric Brine [Tue, 12 Oct 2010 00:17:15 +0000 (17:17 -0700)]
Improve documentation of \Q

13 years agoCorrect prototype of mathom Perl_mro_isa_changed_in() for ithreads.
Nicholas Clark [Mon, 11 Oct 2010 19:41:35 +0000 (20:41 +0100)]
Correct prototype of mathom Perl_mro_isa_changed_in() for ithreads.

6f86b615fa775fad forgot the pTHX_

13 years agoAllow mro_isa_changed_in to be called on nonexistent packages
Father Chrysostomos [Mon, 11 Oct 2010 17:10:06 +0000 (10:10 -0700)]
Allow mro_isa_changed_in to be called on nonexistent packages

This is necessary for an upcoming bug fix.

(For this bug:

 @left::ISA = 'outer::inner';
 @right::ISA = 'clone::inner';
 *clone:: = \%outer::;
 print left->isa('clone::inner'),"\n";
 print right->isa('outer::inner'),"\n";

)

This commit actually replaces mro_isa_changed_in with
mro_isa_changed_in3. See the docs for it in the diff for mro.c.

13 years agoAvoid calling Gcovert() when stringifying 0.0 and -0.0
Nicholas Clark [Mon, 11 Oct 2010 12:12:04 +0000 (13:12 +0100)]
Avoid calling Gcovert() when stringifying 0.0 and -0.0

Previously we always called Gconvert(), then tested its string output, then
fixed that up if necessary. This way has fewer tests. We can also reduce the
memory allocation for the string output for the case of zero.

13 years agoInstall l1_char_class_tab.h on VMS.
Craig A. Berry [Mon, 11 Oct 2010 03:56:49 +0000 (22:56 -0500)]
Install l1_char_class_tab.h on VMS.

13 years agoRemove some excess cleverness from the Bhk macros.
Ben Morrow [Sun, 10 Oct 2010 22:10:15 +0000 (23:10 +0100)]
Remove some excess cleverness from the Bhk macros.

Allowing BhkENTRY(bhk, start) to look up the bhk_start member defeats
much of the point of having a bhk_ prefix in the first place: if a
member is added later called (say) 'bhk_die', any invocation of
BhkENTRY(bhk, die) will expand to BhkENTRY(bhk, Perl_die) because of the
API macros. Requiring BhkENTRY(bhk, bhk_start), while tedious, is much
safer.

13 years agoplugin mechanism to rewrite calls to a subroutine
Zefram [Sun, 3 Oct 2010 13:53:16 +0000 (14:53 +0100)]
plugin mechanism to rewrite calls to a subroutine

New magic type PERL_MAGIC_checkcall attaches a function to a CV, which
will be called as the second half of the op checker for an entersub
op calling that CV.  Default state, in the absence of this magic,
is to process the CV's prototype if it has one, or apply list context
to all the arguments if not.  New API functions cv_get_call_checker()
and cv_set_call_checker() provide a clean interface to this facility,
hiding the internal use of magic.

Expose in the API the new functions rv2cv_op_cv(),
ck_entersub_args_list(), ck_entersub_args_proto(), and
ck_entersub_args_proto_or_list(), which are meaningful segments of
standard entersub op checking and are likely to be useful in plugged-in
call checker functions.

Expose new API function op_contextualize(), which is a public interface
to the internal scalar()/list()/scalarvoid() functions.  This API is
likely to be required in most plugged-in call checker functions.

Incidentally add new function mg_free_type(), in the API, which will
remove magic of one type from an SV.  (mg_free() removes all magic,
and there isn't anything else more selective.)

13 years agomake sv_clear() non-recursive on RVs
David Mitchell [Sun, 10 Oct 2010 23:13:07 +0000 (00:13 +0100)]
make sv_clear() non-recursive on RVs

The previous two commits made it non-recursive on AVs. With that
machinery in place, it's now trivial to extend it to RVs too.
This means that now any depth nesting of AVs and RVs will be freed
in a single call to sv_clear().

13 years agore-indent sv_clear()
David Mitchell [Sun, 10 Oct 2010 23:05:26 +0000 (00:05 +0100)]
re-indent sv_clear()

The previous commit wrapped most of sv_clear in a big while loop,
but didn't re-indent everything, to keep the change clear.
So re-indent now, and wrap long lines. Only whitespace changes.

13 years agomake sv_clear() iterate over AVs
David Mitchell [Fri, 8 Oct 2010 15:22:42 +0000 (16:22 +0100)]
make sv_clear() iterate over AVs

In sv_clear(), rather than calling av_undef(), iterate over the AV's
elements. This is the first stage in making sv_clear() non-recursive,
and thus non-stack-blowing when freeing deeply nested structures.

Since we no longer have the stack to maintain the chain of AVs currently
being iterated over, we instead store a pointer to the previous AV in the
AvARRAY[AvMAX] slot of the currently-being-iterated AV. Since our first
action is to pop the first SV, that slot is guaranteed to be free, and
(in theory) nothing should be messing with the AV while we iterate over
its elements, so that slot should remain undisturbed.

13 years agostop DEBUG_LEAKING_SCALARS, er, leaking!
David Mitchell [Sun, 10 Oct 2010 18:48:23 +0000 (19:48 +0100)]
stop DEBUG_LEAKING_SCALARS, er, leaking!

When cloning an SV, new_SV() was setting sv_debug_file, then we
immediately set it again without freeing the first one.

13 years agoregcomp.c: Fix compiler warning
Karl Williamson [Tue, 5 Oct 2010 05:15:53 +0000 (23:15 -0600)]
regcomp.c: Fix compiler warning

Another compiler gave another warning, that this should fix.  The
expression should have been cast to a bool all along

13 years agoAdd an inheritance diagram to package_aliases.t
Father Chrysostomos [Sun, 10 Oct 2010 18:39:57 +0000 (11:39 -0700)]
Add an inheritance diagram to package_aliases.t

13 years agoDon't assume filenames can contain parentheses
Craig A. Berry [Sun, 10 Oct 2010 03:31:37 +0000 (22:31 -0500)]
Don't assume filenames can contain parentheses
in the new File::DosGlob tests that came in with
2f3c8ce922663caa9b02d9fddae7536225b6f95d.

13 years agoMove regen scripts to regen/
Steffen Mueller [Sun, 10 Oct 2010 13:43:47 +0000 (15:43 +0200)]
Move regen scripts to regen/

Moves the various scripts that are called by regen.pl to a subdirectory
to reduce clutter.

13 years agoMention a few more auto-generated files in pumpkin.pod
Steffen Mueller [Sun, 10 Oct 2010 13:12:53 +0000 (15:12 +0200)]
Mention a few more auto-generated files in pumpkin.pod

13 years agoMake more ways to move packages around reset isa caches
Father Chrysostomos [Sun, 10 Oct 2010 05:29:19 +0000 (22:29 -0700)]
Make more ways to move packages around reset isa caches

This makes string-to-glob assignment and hashref-to-glob assignment
reset isa caches by calling mro_package_moved, if the glob’s name
ends with ::.

Related to [perl #75176].

13 years agoAvoid uninitialized warning in glob_assign_glob
Father Chrysostomos [Sun, 10 Oct 2010 05:18:30 +0000 (22:18 -0700)]
Avoid uninitialized warning in glob_assign_glob

13 years agoRemove code added by c8bbf675 that turns out to be unnecessary
Father Chrysostomos [Sun, 10 Oct 2010 05:18:08 +0000 (22:18 -0700)]
Remove code added by c8bbf675 that turns out to be unnecessary

13 years agoOops. Remove a duplicate require.
Father Chrysostomos [Sun, 10 Oct 2010 05:12:46 +0000 (22:12 -0700)]
Oops. Remove a duplicate require.

13 years agoUpdate gitignore files for moved pod scripts
Florian Ragwitz [Sun, 10 Oct 2010 03:55:11 +0000 (05:55 +0200)]
Update gitignore files for moved pod scripts

13 years agoPod/Html.pm is now in ext/Pod-Html
Florian Ragwitz [Sun, 10 Oct 2010 03:51:15 +0000 (05:51 +0200)]
Pod/Html.pm is now in ext/Pod-Html

13 years ago[perl #78306] Clearify inc_version_list config in INSTALL
Zsbán Ambrus [Sun, 10 Oct 2010 01:46:04 +0000 (18:46 -0700)]
[perl #78306] Clearify inc_version_list config in INSTALL

13 years agoReset isa on stash manipulation
Father Chrysostomos [Sun, 10 Oct 2010 01:42:01 +0000 (18:42 -0700)]
Reset isa on stash manipulation

This only applies to glob-to-glob assignments and deletions of stash
elements. Other types of stash manipulation are dealt with by subse-
quent patches.

It adds mro_package_moved, a private function that iterates through
subpackages, calling mro_isa_changed_in on each.

This is related to [perl #75176], but is not the same bug. It simply
got in the way of fixing [perl #75176].

13 years agoMake the new perl5db.t taint test work on VMS.
Craig A. Berry [Sat, 9 Oct 2010 23:32:41 +0000 (18:32 -0500)]
Make the new perl5db.t taint test work on VMS.

Follow-up to 07004ebbe530fe5ce1c67e63c0b8e1c0aa77b3b9.

13 years agoAdd VMS symbol shortening to PL_bincompat_options.
Craig A. Berry [Sat, 9 Oct 2010 22:41:27 +0000 (17:41 -0500)]
Add VMS symbol shortening to PL_bincompat_options.

13 years agoCreate populate_isa() to de-duplicate logic to populate @ISA.
Nicholas Clark [Sat, 9 Oct 2010 19:34:29 +0000 (20:34 +0100)]
Create populate_isa() to de-duplicate logic to populate @ISA.

Previously yylex() was conditionally populating @AnyDBM_File::ISA (if it was not
set, and the token dbmopen was seen), and init_predump_symbols() was populating
@IO::File::ISA (unconditionally, but this is so early that nothing previously
could have set it). This refactoring eliminates code duplication.

13 years agodo not use both "a lvalue" and "an lvalue" but pick one
Ricardo Signes [Sat, 9 Oct 2010 18:17:34 +0000 (14:17 -0400)]
do not use both "a lvalue" and "an lvalue" but pick one

13 years agoRemove now-unused parameters from S_gv_magicalize_isa().
Nicholas Clark [Sat, 9 Oct 2010 11:24:10 +0000 (12:24 +0100)]
Remove now-unused parameters from S_gv_magicalize_isa().

997daa56862a0fc7 eliminated the need for passing these in.

13 years agoMove the automatic instantiation of @AnyDBM_File::ISA to Perl_yylex()
Nicholas Clark [Sat, 9 Oct 2010 08:02:15 +0000 (09:02 +0100)]
Move the automatic instantiation of @AnyDBM_File::ISA to Perl_yylex()

case KEY_dbmopen in Perl_yylex() has always had special-case code to create
@AnyDBM_File::ISA, using GV_ADDMULTI. S_gv_magicalize_isa() [part of
Perl_gv_fetchpvn_flags()] has special case code to spot "AnyDBM_File::ISA"
being created with GV_ADDMULTI, and populate the variable if it is empty.

Grouping the special case code in one place makes more sense. Removing the
special case code from gv.c means that there is no longer a check clause in the
code path for *every* package's @ISA initialisation.

13 years agoUpdate perldelta.pod for threads::shared upgrade
Chris 'BinGOs' Williams [Fri, 8 Oct 2010 22:33:46 +0000 (23:33 +0100)]
Update perldelta.pod for threads::shared upgrade

13 years agoUpgrade to threads::shared 1.34
Jerry D. Hedden [Fri, 8 Oct 2010 16:58:33 +0000 (12:58 -0400)]
Upgrade to threads::shared 1.34

Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
13 years agoRemove dead code from Perl_gv_stashpvn().
Nicholas Clark [Fri, 8 Oct 2010 20:33:29 +0000 (21:33 +0100)]
Remove dead code from Perl_gv_stashpvn().

GvHV() and HvNAME() will both always already be set, as gv_fetchpvn_flags()
will initialise these as it walks the string in its initial loop to locate the
correct stash, then return early because name == name_end.

This code has been dead since it was added in 5.000.

13 years agoMake compiler-shortened symbols the default on VMS.
Craig A. Berry [Fri, 8 Oct 2010 19:44:15 +0000 (14:44 -0500)]
Make compiler-shortened symbols the default on VMS.

It used to be that once or twice per decade a symbol longer than
31 characters snuck into the core and we had to manually shorten
it to get the build working.  But it's happened twice in the last
month, most recently with the humanly unswallowable function name
XS_XS__APItest__XSUB_XS_VERSION_undef, so the need for a more
general solution has become not only apparent but mandatory.