This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
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.

13 years agoLet the compiler shorten symbols on VMS.
Craig A. Berry [Fri, 8 Oct 2010 19:18:49 +0000 (14:18 -0500)]
Let the compiler shorten symbols on VMS.

Traditionally Perl does its own name shortening in
ExtUtils::XSSymSet to get around the 31-character limit
on symbol names in the VMS linker.  That method predates
the availability of the /NAMES=SHORTENED option in the
C compiler, which uses the same algorithm as the C++
name mangler to produce shortened symbols.  This change
makes configuration with -Duseshortenedsymbols select
the compiler's shortening over the home-grown shortening.

The advantages of the compiler option over the home-grown
option are that hand-coded long symbols in the core can be
handled (instead of only generated XS_... symbols); long
symbols in external libraries can be handled; and eventually
we can remove XSSymSet and have less to maintain.

84efe3dfc6afbd8ea017ddcc4d5d213cc1a35c72 is required to travel
wherever this change travels for extension building to work
properly.

13 years agoExtUtils::XSSymSet can now let the compiler shorten symbols.
Craig A. Berry [Fri, 8 Oct 2010 19:07:59 +0000 (14:07 -0500)]
ExtUtils::XSSymSet can now let the compiler shorten symbols.

If the soon-to-be-implemented configuration option
-Duseshortenedsymbols has been selected, bypass the home-grown
symbol shortening traditionally done by xsubpp because the
compiler's /NAMES=SHORTENED feature will be used instead.

This is only relevant on VMS.

13 years agoFix bugs in e771aaa95f65a9c4 (reducing copying in gv_fetchpvn_flags)
Nicholas Clark [Fri, 8 Oct 2010 18:58:34 +0000 (19:58 +0100)]
Fix bugs in e771aaa95f65a9c4 (reducing copying in gv_fetchpvn_flags)

Bug spotting and 1 fix by Jerry D. Hedden.

13 years agoRefactor Perl_xs_apiversion_bootcheck()
Nicholas Clark [Fri, 8 Oct 2010 15:56:50 +0000 (16:56 +0100)]
Refactor Perl_xs_apiversion_bootcheck()

Use fewer mortals, and avoid leaking an SV if upg_version() croaks.

13 years agoConvert the implementation of XS_APIVERSION_BOOTCHECK to a function.
Nicholas Clark [Fri, 8 Oct 2010 15:13:38 +0000 (16:13 +0100)]
Convert the implementation of XS_APIVERSION_BOOTCHECK to a function.

The previous macro generated over .5K of object code. This is in every shared
object, and is only called once. Hence this change increases the perl binary
by about .5K (once), to save .5K for every XS module loaded.

13 years agoXS::APItest tests for XS_APIVERSION_BOOTCHECK.
Nicholas Clark [Fri, 8 Oct 2010 14:55:08 +0000 (15:55 +0100)]
XS::APItest tests for XS_APIVERSION_BOOTCHECK.

13 years agoxs_version_bootcheck() is an implementation detail, rather than a public API.
Nicholas Clark [Fri, 8 Oct 2010 14:12:30 +0000 (15:12 +0100)]
xs_version_bootcheck() is an implementation detail, rather than a public API.

XS_VERSION_BOOTCHECK() is the public API.

13 years agoRefactor xs_version_bootcheck() to remove complex constructions.
Nicholas Clark [Fri, 8 Oct 2010 13:59:10 +0000 (14:59 +0100)]
Refactor xs_version_bootcheck() to remove complex constructions.

Replace complex format strings ternary conditionals with an if/else block.
Avoid assignment within expressions. Directly use the SV for the module's name,
rather than converting it to a char *.

13 years agoxs_version_bootcheck() must use mortals, as {new,upg}_version() can croak.
Nicholas Clark [Fri, 8 Oct 2010 10:59:47 +0000 (11:59 +0100)]
xs_version_bootcheck() must use mortals, as {new,upg}_version() can croak.

It's unlikely that XS_VERSION will contain a bogus version string (for long),
but the value passed in (or derived from $XS_VERSION or $VERSION) might well.
For that case, without this change, temporary SVs created within
xs_version_bootcheck() won't be freed (before interpreter exit).

13 years agothreads::shared should not FREETMPS in its BOOT code.
Nicholas Clark [Fri, 8 Oct 2010 13:00:43 +0000 (14:00 +0100)]
threads::shared should not FREETMPS in its BOOT code.

perl_construct() sets the current interpreter context, and ends in an ENTER.
Hence threads::shared needs to restore the interpreter context, and balance the
ENTER with a leave. Previously it was using its PERL_SET_CONTEXT() macro,
which also contains a FREETMPS. However, this FREETMPS is erroneous in this
specific context, as it does not have a balancing SAVETMPS. Hence calling
SAVETMPS here would run it in the context of the shared interpreter, but it
would (attempt to) free up temporaries created in the context of the parent
interpreter.

13 years agoChange vverify() to return HV or NULL (RT#78286)
David Golden [Fri, 8 Oct 2010 15:39:52 +0000 (11:39 -0400)]
Change vverify() to return HV or NULL (RT#78286)

Multiple code paths were dereferencing version objects without
checking the underlying type, which could result in segmentation
faults per RT#78286

This patch consolidates all dereferencing into vverify() and
has vverify return the underlying HV or NULL instead of
a boolean value.

13 years agoPerl_gv_fetchpvn_flags() can avoid copying when the package separator is ::
Nicholas Clark [Fri, 8 Oct 2010 14:39:24 +0000 (15:39 +0100)]
Perl_gv_fetchpvn_flags() can avoid copying when the package separator is ::

13 years agoFix unicode characters in Locale-Maketext ChangeLog
Chris 'BinGOs' Williams [Fri, 8 Oct 2010 11:55:48 +0000 (12:55 +0100)]
Fix unicode characters in Locale-Maketext ChangeLog

13 years agoFix pod/buildtoc's handling of Win32 makefiles
Steve Hay [Thu, 7 Oct 2010 20:56:41 +0000 (21:56 +0100)]
Fix pod/buildtoc's handling of Win32 makefiles

The state of the POD file cleanup code in the Win32 makefiles had parted
company with what pod/buildtoc was looking for. Fix the script for the
current state of play and regenerate the makefiles.

13 years agoBring Locale::Maketext ChangeLog up to date with all recent commits
Todd Rinaldo [Thu, 7 Oct 2010 18:41:21 +0000 (19:41 +0100)]
Bring Locale::Maketext ChangeLog up to date with all recent commits

Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
13 years agoConvert the implementation of XS_VERSION_BOOTCHECK to a function from a macro.
Nicholas Clark [Thu, 7 Oct 2010 15:30:32 +0000 (16:30 +0100)]
Convert the implementation of XS_VERSION_BOOTCHECK to a function from a macro.

The macro expansion generates over 1K of object code. This is in every shared
object, and is only called once. Hence this change increases the perl binary
by about 1K (once), to save 1K for every XS module loaded.

13 years agoXS::APItest tests for XS_VERSION_BOOTCHECK.
Nicholas Clark [Thu, 7 Oct 2010 14:47:14 +0000 (15:47 +0100)]
XS::APItest tests for XS_VERSION_BOOTCHECK.

13 years agoImprove XSLoader::load documentation.
Nicholas Clark [Thu, 7 Oct 2010 10:19:26 +0000 (11:19 +0100)]
Improve XSLoader::load documentation.

Document that all arguments are passed on to the module's bootstrap function,
and the behaviour of the bootstrap function in modules built by xsubpp.

13 years agoImprove DynaLoader::bootstrap documentation.
Nicholas Clark [Thu, 7 Oct 2010 10:16:30 +0000 (11:16 +0100)]
Improve DynaLoader::bootstrap documentation.

Document that all arguments are passed on to the module's bootstrap function,
and the behaviour of the bootstrap function in modules built by xsubpp.

13 years agoUpdate Win32 makefiles to remove perl5136delta.pod rather than perl5135delta.pod...
Steve Hay [Thu, 7 Oct 2010 09:22:41 +0000 (10:22 +0100)]
Update Win32 makefiles to remove perl5136delta.pod rather than perl5135delta.pod when cleaning

13 years agoPatch for Stratus VOS for extended file names
Paul Green [Thu, 7 Oct 2010 06:43:18 +0000 (23:43 -0700)]
Patch for Stratus VOS for extended file names

The attached 1-line patch to hints/vos.sh defines a C macro that enables
support for file names longer than 32 characters on the Stratus OpenVOS
port of perl. As there are now some files in the base package whose
names exceed 32 chars, this is an important change.

This change only applies to OpenVOS (horay for the hints files)! I
tested this change on OpenVOS Release 17.0.2ab.

I have also updated the .pod files that refer to VOS/OpenVOS.

13 years agoRemove MEMBER_TO_FPTR.
Ben Morrow [Tue, 5 Oct 2010 17:55:41 +0000 (18:55 +0100)]
Remove MEMBER_TO_FPTR.

This is left over from PERL_OBJECT (see beeff2, 16c915, and so on).

13 years agoNo distinction between .PL and .pl if case is not preserved.
Craig A. Berry [Thu, 7 Oct 2010 00:19:33 +0000 (19:19 -0500)]
No distinction between .PL and .pl if case is not preserved.

Follow-up to 13b5e8d8173af2197798ae78b4520ece8cb1151c.

On VMS, the CRTL downcases filenames by default, so pod2foo.PL
comes through as pod2foo.pl.  We need to match that so we paste
on the right extension for the generated command procedure.

13 years agoUpdate Unicode-Collate to CPAN version 0.62
Chris 'BinGOs' Williams [Wed, 6 Oct 2010 23:12:46 +0000 (00:12 +0100)]
Update Unicode-Collate to CPAN version 0.62

  [DELTA]

  0.62  Wed Oct  6 21:35:54 2010
    - U::C::Locale newly supports locales: ar, hu, hy, se, to, uk.
    - Vietnamese (vi): added tailoring for U+0340 and U+0341.

13 years agoAvoid defining a full XSLoader::bootstrap_inherit post 5.6, as it's not needed.
Nicholas Clark [Wed, 6 Oct 2010 18:20:04 +0000 (19:20 +0100)]
Avoid defining a full XSLoader::bootstrap_inherit post 5.6, as it's not needed.

Previously the full pre 5.6 XSLoader::bootstrap_inherit emulation code was
always declared, but only used with a *runtime* check of Perl version.

However, it appears to be part of the implicit API of XSLoader that
XSLoader::bootstrap_inherit exists, so keep a stub implementation post 5.6
 the commit.

13 years agoAdd 'dlext' and 'so' to the initial %Config::Config
Nicholas Clark [Wed, 6 Oct 2010 14:17:08 +0000 (15:17 +0100)]
Add 'dlext' and 'so' to the initial %Config::Config

This avoids Config.pm loading Config_heavy.pl when DynaLoader.pm is loaded.
It has been reading these at run time since 37589e1eefb1bd62, which post-dates
the analysis of which %Config::Config values are most "popular".

13 years agoGenerate the core-only Makefile.PL for podlators using make_ext.
Nicholas Clark [Tue, 5 Oct 2010 18:30:59 +0000 (19:30 +0100)]
Generate the core-only Makefile.PL for podlators using make_ext.

Using make_ext to generate it uses less code than committing a special
core-only Makefile.PL to the repository, and is no more complex.

13 years agoMoving all pod/*.PL files to ext/ (and cpan/) is now done.
Nicholas Clark [Tue, 5 Oct 2010 16:39:01 +0000 (17:39 +0100)]
Moving all pod/*.PL files to ext/ (and cpan/) is now done.

13 years agoEliminate the now unused Makefile targets plextract, pl and pllist.
Nicholas Clark [Tue, 5 Oct 2010 13:45:15 +0000 (14:45 +0100)]
Eliminate the now unused Makefile targets plextract, pl and pllist.

13 years agoMove pod2html.PL into ext/Pod-Html
Nicholas Clark [Tue, 5 Oct 2010 13:19:08 +0000 (14:19 +0100)]
Move pod2html.PL into ext/Pod-Html

Let ExtUtils::MakeMaker deal with running these extraction scripts, rather than
repeating the logic in (at least) 5 places.

13 years agoMove pod2man.PL, pod2text.PL, podselect.PL into cpan/podlators/scripts
Nicholas Clark [Tue, 5 Oct 2010 10:07:14 +0000 (11:07 +0100)]
Move pod2man.PL, pod2text.PL, podselect.PL into cpan/podlators/scripts

Let ExtUtils::MakeMaker deal with running these extraction scripts, rather than
repeating the logic in (at least) 5 places.

13 years agoMove pod2usage.PL, podchecker.PL, podselect.PL into cpan/Pod-Parser/scripts
Nicholas Clark [Tue, 5 Oct 2010 06:32:21 +0000 (07:32 +0100)]
Move pod2usage.PL, podchecker.PL, podselect.PL into cpan/Pod-Parser/scripts

Let ExtUtils::MakeMaker deal with running these extraction scripts, rather than
repeating the logic in (at least) 5 places.

13 years agoMove pod2latex.PL into its CPAN distribution directory.
Nicholas Clark [Thu, 2 Sep 2010 14:12:24 +0000 (15:12 +0100)]
Move pod2latex.PL into its CPAN distribution directory.

Let ExtUtils::MakeMaker deal with running this extraction script, rather than
repeating the logic in (at least) 5 places.

13 years agoMove Pod::Html from lib/ to ext/
Nicholas Clark [Tue, 5 Oct 2010 12:35:56 +0000 (13:35 +0100)]
Move Pod::Html from lib/ to ext/

13 years agomake_ext.pl now writes Makefile.PL that cope with pod*.PL self-extractors.
Nicholas Clark [Tue, 5 Oct 2010 04:42:22 +0000 (05:42 +0100)]
make_ext.pl now writes Makefile.PL that cope with pod*.PL self-extractors.

The "fun" comes because

1: these extract as pod2foo.com on VMS, pod2foo everywhere else
2: these contain a chdir, which messes up relative paths in @INC

13 years agotest_prep has a dependency on x2p/s2p
Nicholas Clark [Tue, 5 Oct 2010 12:23:53 +0000 (13:23 +0100)]
test_prep has a dependency on x2p/s2p

This has not been spotted because is has a dependency on $(plextract) which
in turn depends on x2p/s2p

13 years agoThe *.PL scripts in utils/ have a dependency on Cwd in lib.
Nicholas Clark [Tue, 5 Oct 2010 12:06:22 +0000 (13:06 +0100)]
The *.PL scripts in utils/ have a dependency on Cwd in lib.

This has not been spotted because they have a dependency on $(plextract) which
in turn depends on $(dynamic_ext).

13 years ago[perl #73534] Bigrat segfaults on irrational numbers
Father Chrysostomos [Tue, 5 Oct 2010 06:04:44 +0000 (23:04 -0700)]
[perl #73534] Bigrat segfaults on irrational numbers

aka [rt.cpan.org #55767] segfault on sqrt(2) with bigrat

The problem seems to be in &Math::BigInt::objectify. It doesn’t try to
convert the number object into the right class if $upgrade is defined.
The attached patch changes it to make sure it belongs to the calling
class or to the $upgrade class.

Here is a ‘one’-liner to trigger the same bug without bigrat:

perl -Ilib -MMath::BigInt=upgrade,Math::BigFloat \
 -MMath::BigFloat=upgrade,Math::BigMouse -le \
 '@Math::BigMouse::ISA = Math::BigFloat; print sqrt Math::BigInt->new(2)'

13 years ago* Update the versions numbers for stable in perlfaq1
brian d foy [Tue, 5 Oct 2010 05:52:40 +0000 (01:52 -0400)]
* Update the versions numbers for stable in perlfaq1
    I'm considering that this becomes official with 5.14, so
    'stable' is a bit in the future

13 years ago* Clarified a pronoun in perlfaq4
brian d foy [Tue, 5 Oct 2010 05:47:11 +0000 (01:47 -0400)]
* Clarified a pronoun in perlfaq4

How do I strip blank space from the beginning/end of a string?

13 years agoperldelta entry for Locale::Maketext/$@
Father Chrysostomos [Tue, 5 Oct 2010 04:45:24 +0000 (21:45 -0700)]
perldelta entry for Locale::Maketext/$@

13 years agoRe-add a test deleted by the recent Locale::Maketext/$@ change
Father Chrysostomos [Tue, 5 Oct 2010 04:45:16 +0000 (21:45 -0700)]
Re-add a test deleted by the recent Locale::Maketext/$@ change

(and make it pass, too)

13 years agoUpdate MANIFEST for prev. Locale::Maketext change
Father Chrysostomos [Tue, 5 Oct 2010 03:21:06 +0000 (20:21 -0700)]
Update MANIFEST for prev. Locale::Maketext change

13 years agoCPAN RT 34182 (Locale::Maketext) - Don't unnecessarily localize $@.
Todd Rinaldo [Tue, 5 Oct 2010 03:15:59 +0000 (20:15 -0700)]
CPAN RT 34182 (Locale::Maketext) - Don't unnecessarily localize $@.
Do it in scope only so die messages fall through when desired.

Previously, there was test code to make sure $@ was not modified when
maketext is called, but if the caller wraps maketext in an eval, then
it's going to be modified anyways to '' at the least. If the caller
does not wrap a maketext call in an eval and maketext dies, then hiding
the $@ simply confuses the person debugging as to what went wrong.

We do however backup/restore $@ so that it does not break any code that
looks might use $@ after a successful call to maketext.
    eval {...}
    $lm->maketext($@);
    do_something_else($@);
In the above example, $@ would be the same when passed to do_something_else

13 years ago[perl #45133] -0.0 has variable Boolean value
Father Chrysostomos [Mon, 4 Oct 2010 20:58:49 +0000 (13:58 -0700)]
[perl #45133] -0.0 has variable Boolean value

This patch makes -0.0 stringify as "0" (while leaving sprintf %g/%f
unchanged).

13 years ago[perl #20661] Constant strings representing a number can BECOME numbers
Father Chrysostomos [Mon, 4 Oct 2010 19:24:37 +0000 (12:24 -0700)]
[perl #20661] Constant strings representing a number can BECOME numbers

The & | ^ operators now avoid turning on numericness of read-only
arguments.

13 years agoCorrect test names in negate.t
Father Chrysostomos [Mon, 4 Oct 2010 16:22:59 +0000 (09:22 -0700)]
Correct test names in negate.t

13 years agoperlop.pod: Clarify -’s string/number distinction
Father Chrysostomos [Mon, 4 Oct 2010 15:33:31 +0000 (08:33 -0700)]
perlop.pod: Clarify -’s string/number distinction

13 years agoperldelta for [perl #57706]
Father Chrysostomos [Mon, 4 Oct 2010 15:29:12 +0000 (08:29 -0700)]
perldelta for [perl #57706]

13 years ago[perl #57706] Unary minus on 'numeric' inputs like '-1'
Renée Bäcker [Mon, 4 Oct 2010 13:26:21 +0000 (06:26 -0700)]
[perl #57706] Unary minus on 'numeric' inputs like '-1'

The attached patch adds the conversion if the value of the SV
looks_like_number.

13 years agostop map,grep leaking temps [perl #48004]
David Mitchell [Mon, 4 Oct 2010 14:18:44 +0000 (15:18 +0100)]
stop map,grep leaking temps [perl #48004]

The former behaviour of map and grep was to never free any temps.
Thus for large lists (and even worse, nested maps), the tmps stack could
grow very large. For all cases expect list-context map, the fix is easy:
just do a FREETMPS at the end of each iteration.

The list-context map however, needs to accumulate a list of temporaries
over the course of the iterations, and finally return that list to the
caller (which is responsible for freeing them). We get round this by, at
the end of each iteration, directly manipulating the tmps stack to free
everything *except* the values to be returned. To make this efficient,
we splice in the returned tmp items at the base of the stack frame, move
PL_tmps_floor above them, then do a FREETMPS (so they may appear twice on
the temps stack, but initially only get freed once).

13 years ago[PATCH] function to parse Perl statement sequence
Zefram [Mon, 4 Oct 2010 08:26:42 +0000 (10:26 +0200)]
[PATCH] function to parse Perl statement sequence

New API function parse_stmtseq() parses a sequence of statements, up to
closing brace or EOF.

13 years agoadd stray save_* functions to the API
Zefram [Mon, 4 Oct 2010 08:14:28 +0000 (10:14 +0200)]
add stray save_* functions to the API

13 years agoUpdate AUTHORS
Rafael Garcia-Suarez [Mon, 4 Oct 2010 07:53:12 +0000 (09:53 +0200)]
Update AUTHORS

13 years agoFurther clarification on indirect filehandles
A. Sinan Unur [Mon, 4 Oct 2010 01:30:50 +0000 (21:30 -0400)]
Further clarification on indirect filehandles

A recent discussion on Stackoverflow.com indicated to me that there is
some potential for confusion in the "Indirect Filehandles" section in
perlopentut.pod. See comments to
http://stackoverflow.com/questions/3661161/writing-a-macro-in-perl/3661239#36612
39

The attached patch is my attempt at clarifying that indirect
filehandles are closed when there are no more references to them
rather than simply when the end of the current lexical scope is
reached. I also added an example of returning such a filehandle from a
subroutine.

I am not sure if this is the best way to word it, so I would
appreciate feedback.

The patch is attached.

-- Sinan

13 years agoperldelta and version bump for Cwd
Father Chrysostomos [Mon, 4 Oct 2010 00:13:49 +0000 (17:13 -0700)]
perldelta and version bump for Cwd

13 years ago[perl #51562] Problem & "solution" for building 5.10.0 w/win32+mingw+dmake
kmx [Mon, 4 Oct 2010 00:03:46 +0000 (17:03 -0700)]
[perl #51562] Problem & "solution" for building 5.10.0 w/win32+mingw+dmake

Run `cd`, rather than `cmd /c cd`, in miniperl on Windows.

13 years agoperldelta entries
Father Chrysostomos [Sun, 3 Oct 2010 23:03:13 +0000 (16:03 -0700)]
perldelta entries

13 years ago[perl #32380] numeric.c assumes that NV_DIG+2 will be enough digits
Ed Allen Smith [Sun, 3 Oct 2010 22:51:34 +0000 (15:51 -0700)]
[perl #32380] numeric.c assumes that NV_DIG+2 will be enough digits
for all precision possible in NV

numeric.c, in the Perl_my_atof2 function, makes the following assumption:

/* There is no point in processing more significant digits
 * than the NV can hold. Note that NV_DIG is a lower-bound value,
 * while we need an upper-bound value. We add 2 to account for this;
 * since it will have been conservative on both the first and last digit.
 * For example a 32-bit mantissa with an exponent of 4 would have
 * exact values in the set
 *               4
 *               8
 *              ..
 *     17179869172
 *     17179869176
 *     17179869180
 *
 * where for the purposes of calculating NV_DIG we would have to discount
 * both the first and last digit, since neither can hold all values from
 * 0..9; but for calculating the value we must examine those two digits.
 */
#define MAX_SIG_DIGITS (NV_DIG+2)

Digits beyond MAX_SIG_DIGITS are ignored. In some systems and/or modes
(e.g., with/without using long doubles), this is not the case. One
example is IRIX when using long doubles, which are not fully IEEE
compliant; with it, while NV_DIG (the _minimum_ number of digits
usable) is 31 for long doubles used as NVs, long doubles can have up
to 34 digits of accuracy. (As well as IRIX with long doubles, other
machines using a mode in which NV is not IEEE compliant (e.g., as
found by the following from numeric.c:

#ifdef ((defined(VMS) && !defined(__IEEE_FP)) || defined(_UNICOS))

(although UNICOS does not by default use Perl's atof in any event) or
as noted in the hints files for DEC OSF with the old MIPS CC) may
benefit from a change to this.) I will attach a test program, example
set of problematic outputs, and experimental patch so others can
explore this on their systems. (With the patch and a
-Accflags='-DMAX_SIG_DIG_PLUS=3' (or
-Accflags='-DMAX_SIG_DIG_PLUS=4'), the test program was
successful. Different values of MAX_SIG_DIG_PLUS may need to be
experimented with, especially with different other Configure/compiler
flags (long doubles yes/no, optimization affecting floating point,
etcetera); 3 was the maximum that did any good on IRIX with long
doubles, but others may differ.) I have done some local testing (as in
the normal testsuite) of the patch and different -DMAX_SIG_DIG_PLUS
values, and will be doing more; it is possible that it would be best
to build in the test program into, say, numconvert.t. Patching
hints/irix_6.sh to use -DMAX_SIG_DIG_PLUS=3 if long doubles are in
use, or a define of MAX_SIG_DIG_PLUS to 3 if defined(IRIX) and long
doubles are in use, is also advisable; I have not included either in my patch
because I was unsure which was recommended practice.

13 years agoUse isGV_with_GP in vms/vms.c for better glob recognition.
Craig A. Berry [Sun, 3 Oct 2010 22:41:58 +0000 (17:41 -0500)]
Use isGV_with_GP in vms/vms.c for better glob recognition.

Suggested by Father Chrysostomos in:

[perl #77500] VMS::Filespec and PVLV globs

Affected routines are candelete_fromperl and rmscopy_from_perl.

13 years agoeval_sv: followup fix to 4aca2f62ef
David Mitchell [Sun, 3 Oct 2010 21:28:28 +0000 (22:28 +0100)]
eval_sv: followup fix to 4aca2f62ef

My original fix broke the 'goto redo_body' path. Not that
anything tests for this!

13 years agoFix perl build problems on Stratus VOS
Paul Green [Sun, 3 Oct 2010 21:18:17 +0000 (14:18 -0700)]
Fix perl build problems on Stratus VOS

The attached text files contain patches to correct build problems on the
Stratus VOS (recently renamed "OpenVOS") operating system. I have tested
these changes on OpenVOS Release 17.0, which is the most-current
customer release. None of these changes should affect any other OS.

Makefile.SH: This patch removes the "miniperl" dependency of the "all"
target. On an operating system that does not require an executable
suffix, the miniperl$(EXE_EXT) dependency evaluates to "miniperl", too.
But on an operating system like VOS that does have an executable suffix,
miniperl$(EXE_EXT) evaluates to (in our case) "miniperl.pm" and the
"miniperl" target is unresolved.

ext/Socket/Socket.xs: Sadly, OpenVOS does not yet support IPv6. I edited
the code to allow for this case, while retaining IPv6 support for
operating systems that do support it.

13 years agoTest for RT#3363: lexical lvalue under recursion
George Greer [Mon, 19 Jul 2010 00:01:32 +0000 (20:01 -0400)]
Test for RT#3363: lexical lvalue under recursion

Add a test to ensure that S_refto returns a SVt_PVLV if the original
is a SVt_PVLV so that the lvalue-ness is preserved.

13 years agoAdd a refgen+PADTMP test
Father Chrysostomos [Sun, 3 Oct 2010 21:06:14 +0000 (14:06 -0700)]
Add a refgen+PADTMP test

13 years agoSmall efficiency nit for regcurly()
Karl Williamson [Sun, 3 Oct 2010 16:19:23 +0000 (10:19 -0600)]
Small efficiency nit for regcurly()

As previously written, a test was executed unnecessarily

13 years agotoke.c: call regcurly instead of duplicating code
Karl Williamson [Sun, 3 Oct 2010 16:18:27 +0000 (10:18 -0600)]
toke.c: call regcurly instead of duplicating code

Remove code that duplicates regcurly()

13 years agobetter documentation for eval_sv() and G_KEEPERR
David Mitchell [Sun, 3 Oct 2010 19:50:20 +0000 (20:50 +0100)]
better documentation for eval_sv() and G_KEEPERR

13 years agoG_KEEPERR sometimes set $@
David Mitchell [Sun, 3 Oct 2010 19:36:36 +0000 (20:36 +0100)]
G_KEEPERR sometimes set $@

eval_sv(sv,G_KEEPERR) is supposed to warn on errors, rather than
set $@; but in the particular case of compile-time errors it still
set $@ instead. See [perl ##3719].

13 years agoeval_sv() and eval_pv() don't fail on syntax err
David Mitchell [Sat, 2 Oct 2010 10:13:09 +0000 (11:13 +0100)]
eval_sv() and eval_pv() don't fail on syntax err

[perl #3719] eval_sv("some syntax err") cleared $@ and didn't return
a failure indication. This also affected eval_pv() which calls eval_sv().
Fix this and add lots of tests.

13 years agoAvoid downgrading GVs during global destruction
Father Chrysostomos [Sun, 3 Oct 2010 17:46:52 +0000 (10:46 -0700)]
Avoid downgrading GVs during global destruction

Recently we’ve been getting assertions from gv.t like this:

Assertion failed: (SvTYPE(sv) != SVTYPEMASK), function Perl_sv_clear, file sv.c, line 5783.

This only happens in non-threaded builds and with PERL_DESTRUCT_LEVEL
set to 2 (as in make test).

These started with 13be902 (lvalue-to-glob assignment), but only
because of the tests it added.

The real cause turns out to be f746176, which introduced
gv_try_downgrade.

If a subroutine contains an op that references a downgradable GV, then
gv_try_downgrade, if called on that GV during global destruction,
*might* leave dangling pointers elsewhere; where exactly I wot not.

Since memory-saving operations such as this downgrading are questiona-
ble anyway durng global destruction, skip it, at least for now.

13 years agoFixed typos -- replaced "the the" with "the"
Walt Mankowski [Sun, 3 Oct 2010 02:04:22 +0000 (22:04 -0400)]
Fixed typos -- replaced "the the" with "the"

13 years agoFixed typo -- replaced "the the" with "the"
Walt Mankowski [Sun, 3 Oct 2010 02:22:00 +0000 (22:22 -0400)]
Fixed typo -- replaced "the the" with "the"

13 years agoFixed typo -- changed "it's code point" to "its code point"
Walt Mankowski [Sun, 3 Oct 2010 02:30:42 +0000 (22:30 -0400)]
Fixed typo -- changed "it's code point" to "its code point"

13 years agoUpdate Unicode-Collate to CPAN version 0.61
Chris 'BinGOs' Williams [Sat, 2 Oct 2010 10:18:42 +0000 (11:18 +0100)]
Update Unicode-Collate to CPAN version 0.61

  [DELTA]

  0.61  Sat Oct  2 11:41:29 2010
    - U::C::Locale newly supports locales: hr, ig, sq.
    - precomposites of e-dot-below, o-dot-below, o-tilde are tailored as well.
        (affected locales: et, yo)
    - Vietnamese (vi): added contractions for non-blocked decompositions
      * base + dot-below + diacritical such as "a\x{323}\x{306} etc.
      * base + tone + horn such as "o\x{300}\x{31B}" etc.

13 years agostrictify vms/gen_shrfls.pl.
Craig A. Berry [Fri, 1 Oct 2010 15:39:46 +0000 (10:39 -0500)]
strictify vms/gen_shrfls.pl.

13 years agort 76474: Avoid the child perl reading from stdout
Tony Cook [Fri, 1 Oct 2010 08:58:37 +0000 (18:58 +1000)]
rt 76474: Avoid the child perl reading from stdout

FD 1 is stdout, and the "<&1" redirect in the test sets the child to
read from its parent's stdout, on Linux (and presumably OS X) doesn't
let you read from stdout, but FreeBSD does, without the -e perl will
try to read its program from stdin, so provide one.

13 years ago[perl #48332] Debugger corrupts symbol table munging
Father Chrysostomos [Fri, 1 Oct 2010 06:48:56 +0000 (23:48 -0700)]
[perl #48332] Debugger corrupts symbol table munging

This reverts commit 92adfbd49af0758bcc9a198cf2df2bd78c4176b9, which
removed a necessary assignment for the sake of consting.

In doing so, it allows subroutine redefinition to work properly again
in the debugger.

13 years agoUpgrade Digest::MD5 from version 2.50 to 2.51
Florian Ragwitz [Thu, 30 Sep 2010 22:15:01 +0000 (00:15 +0200)]
Upgrade Digest::MD5 from version 2.50 to 2.51

13 years ago[perl #77952] regcomp.c compiler warnings
Karl Williamson [Thu, 30 Sep 2010 04:43:32 +0000 (22:43 -0600)]
[perl #77952] regcomp.c compiler warnings

These were that longjmp calls could clobber certain variables.
Initializing the variables after the place that longjmp returns to
causes the warnings to disappear.