summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Updated Locale-Codes to CPAN version 3.18Chris 'BinGOs' Williams2011-08-3123-25067/+25221
| | | | | | | | | | | | [DELTA] VERSION 3.18 (2011-08-31) NEW CODE(s) No longer use CIA data The CIA world added non-standard values, so I no longer use it as a source of data. Based on a report by Michiel Beijen.
* Avoid an extra SV when creating $] and $^VFather Chrysostomos2011-08-301-2/+2
| | | | | | | | | | | | Originally, GVs always had something in the SV slot. So, when the code for $] and $^V started replacing it with another SV, it had to free the existing SV. Then commit c69033f2 came along and added the PERL_DONT_CREATE_GVSV directive. It necessarily changed a bunch of GvSV()s to GvSVn()s in gv_fetchpvn_flags. But it changed these two, even though they didn’t need it. So, when PERL_DONT_CREATE_GVSV is true (the default), we just create and throw away a scalar needlessly.
* Eliminate is_gv_magical_svFather Chrysostomos2011-08-308-179/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This resolves perl bug #97978. Many built-in variables, like $], are actually created on the fly when first accessed. Perl likes to pretend that these variables have always existed, so it autovivifies the *] glob even in rvalue context (e.g., defined *{"]"}, close "]"). The list of variables that were autovivified was maintained separ- ately (in is_gv_magical_sv) from the code that actually creates them (gv_fetchpvn_flags). ‘Maintained’ is not actually precise: it *wasn’t* being maintained, and there were new variables that never got added to is_gv_magical_sv and one deleted variable that was never removed. There are only two pieces of code that call is_gv_magical_sv, both in pp.c: S_rv2gv (called by *{} and also the implicit *{} that functions like close() provide) and Perl_softrefxv (called by ${}, @{}, %{}). In both cases, the glob is immediately autovivified if is_gv_magical_sv returns true. So this commit eliminates the extra maintenance burden by extirpat- ing is_gv_magical_sv altogether, and replacing it with a new flag to gv_fetchpvn_flags, GvADDMG, which will autovivify a glob *if* it’s a magical one. It does make defined(*{"frobbly"}) slightly slower, in that it creates a temporary glob and then frees it when it sees nothing magical has been done with it. But this case is rare enough it should not matter. At least I got rid of the bugginess.
* Remove 3 unused scripts from PortingNicholas Clark2011-08-304-499/+0
| | | | | | | | | | | | | | | | | Porting/findvars was added in 1998 in 2bd2b9e04a68ec86. It searches @ARGV for its wordlist of then-current interpreter variable names. Porting/fixvars was added as fixvars in 1998 in a15299417de39f35. It captures the output of make (defaulting to make miniperl), parses it for errors matching /undeclared/, and then attempts to edit the relevant line of the reported file to prefix the name with PL_ Porting/fixCORE is a modified copy of Porting/fixvars, added in 1998 in a8693bd382efcc6d. It's intended to load modules, catching errors of the form /Ambiguous call resolved as CORE::/, and editing the relevant lines to prefix CORE:: to the function in question. It appears only ever to have been used to fix warnings in Math::Complex. All 3 have only had trivial style and spelling edits since addition, and have been unused for over 12 years.
* Generate $Config::Config{byteorder} slightly more efficiently.Nicholas Clark2011-08-301-4/+3
|
* Tiny typo in perldeltaFather Chrysostomos2011-08-291-1/+1
| | | | | The fact that I typed a comma for 2 probably bewrays what keyboard layout I’m using. :-)
* Update docs about &CORE::subs()Father Chrysostomos2011-08-292-8/+11
|
* &CORE::write()Father Chrysostomos2011-08-292-1/+7
| | | | | | This commit allows &CORE::write to be called through references and via ampersand syntax. No change to pp_enterwrite was necessary, as it can already handle nulls.
* &CORE::unpack()Father Chrysostomos2011-08-293-17/+33
| | | | | | | | | | | This commit allows &CORE::unpack to be called through references and via ampersand syntax. It moves the $_-handling code in pp_coreargs inside the parameter loop, so it can apply to the second parameter, not just the first. Consequently, a mkdir test has been added that ensures implicit $_ is not used for mkdir’s second argument; i.e., that the $_-handling code’s if() condition is correct.
* &CORE::umask()Father Chrysostomos2011-08-293-3/+8
| | | | | | | | This commit allows &CORE::umask to be called through references and via ampersand syntax. pp_umask is modified to take into account the nulls pushed on to the stack in pp_coreargs, which happens because pp_coreargs has no other way to tell umask how many arguments it’s actually getting. See commit 0163043a for details.
* &CORE::foo() for tie functionsFather Chrysostomos2011-08-293-16/+50
| | | | | | | This commit allows the tie, tied and untie subroutines in the CORE namespace to be called through references and via &ampersand() syntax. pp_coreargs is modified to handle the functions with \[$@%*] in their prototypes (which happen to be just the tie functions).
* &CORE::tell()Father Chrysostomos2011-08-293-2/+12
| | | | | | | | This commit allows &CORE::tell to be called through references and via ampersand syntax. pp_tell is modified to take into account the nulls pushed on to the stack in pp_coreargs, which happens because pp_coreargs has no other way to tell pp_tell how many arguments it’s actually getting. See commit 0163043a for details.
* &CORE::setpgrp()Father Chrysostomos2011-08-293-9/+16
| | | | | | | | This commit allows &CORE::setpgrp to be called through references and via ampersand syntax. pp_setpgrp is modified to take into account the nulls pushed on to the stack in pp_coreargs, which happens because pp_coreargs has no other way to tell setpgrp how many arguments it’s actually getting. See commit 0163043a for details.
* Make setpgrp($x) equivalent to setpgrp($x,0)Father Chrysostomos2011-08-293-2/+11
| | | | | Prior to this commit, setpgrp(27) was equivalent to (27, setpgrp), because it ignored the argument on the stack when there was only one.
* make setpgrpstack.t use skip_all_without_configFather Chrysostomos2011-08-291-6/+3
|
* ExtUtils::ParseXS: Don't put null chars into generated sourceStephen Bennett2011-08-292-1/+7
| | | | | ... file when -except is used; write the '\0' escape sequence properly instead.
* Add Stephen Bennett to AUTHORSSteffen Mueller2011-08-291-0/+1
|
* For s///r, don't call SvPV_force() on the original value. Resolves #97954.Nicholas Clark2011-08-292-1/+41
| | | | | | | | 8ca8a454f60a417f optimised the implementation of s///r by avoiding an unconditional copy of the original value. However, it introduced a behaviour regression where if original value happened to be one of a few particular types, it could be modified by being forced to a string using SvPV_force(). The substitution was (correctly) performed on a copy of this string.
* Remove some resolved pod issuesFlorian Ragwitz2011-08-291-7/+0
|
* perlfaq is now maintained on CPANFlorian Ragwitz2011-08-2915-35/+37
|
* Upgrade perlfaq from version 5.015003 to 5.01500301Florian Ragwitz2011-08-291-1/+1
|
* Let's have at least one indexed package in perlfaqFlorian Ragwitz2011-08-291-4/+2
| | | | | This way we get to make use of PAUSE's permission system instead of allowing everyone to to upload new perlfaq versions.
* &CORE::sysopen()Father Chrysostomos2011-08-283-2/+10
| | | | | | | | This commit allows &CORE::sysopen to be called through references and via ampersand syntax. pp_sysopen is modified to take into account the nulls pushed on to the stack in pp_coreargs, which happens because pp_coreargs has no other way to tell sysopen how many arguments it’s actually getting. See commit 0163043a for details.
* Use leavesublv for all CORE subsFather Chrysostomos2011-08-281-4/+2
| | | | | | and not just lock, vec and substr. Using a regular leavesub op causes the return values to be copied. There is no need for that, so this commit changes them all to use leavesublv.
* Make tie_fetch_count.t pass with PERL_UNICODE setFather Chrysostomos2011-08-281-4/+4
|
* Make coreamp.t pass with PERL_UNICODE setFather Chrysostomos2011-08-281-1/+9
|
* Thinko in vms.c:copy_expand_unix_filename_escape().Craig A. Berry2011-08-281-4/+4
| | | | | | | | | | Turns out comparing a signed byte to values above 0x7f doesn't make sense. *All* signed byte integers are less than or equal to 0x9f, so the other two branches of the if could never be taken. This code probably needs more review and testing, but we might as well make it do what it intends to do before reviewing those intentions and factoring out some of the copy-and-paste verbosity.
* Backport XS_(IN|EX)TERNAL, be explicit about linkageSteffen Mueller2011-08-286-15/+99
| | | | | | | | With XS(name) defaulting to exporting symbols again since the previous commit, ExtUtils::ParseXS will now instead use explicit XS_EXTERNAL/XS_INTERNAL in its place. This allows backporting of the linkage changes to perls as old as 5.10.0 (and possibly further).
* Revert back to making XS(name) expose XSUB symbolsSteffen Mueller2011-08-281-5/+5
| | | | | | | Instead, as Zefram recommended, ExtUtils::ParseXS will be patched to not export XSUB symbols by default that are generated through the module itself. As Zefram said, this has the advantage of allowing older perls to benefit from the non-exporting of symbols.
* &CORE::substr()Father Chrysostomos2011-08-274-8/+28
| | | | | | | | | | | | | | | | | | This commit makes &CORE::substr callable through references and via &ampersand syntax. It’s a bit awkward, as we need a substr op that is flagged as hav- ing 4 arguments *and* possibly returning an lvalue. The code in op_lvalue_flags wasn’t really set up for that, so I needed to flag the op with OPpMAYBE_LVSUB in coresub_op before it gets passed to op_lvalue_flags. It turned out that only that was necessary, as op_lvalue_flags does an op_private == 4 check (rather than (op_private & 7) == 4 or some such) when checking for the 4-arg case and croak- ing. When the op arrives in op_lvalue_flags, it’s already flagged OPpMAYBE_LVSUB|4 which != 4. pp_substr is also modified to check for nulls and, if necessary, adjust its count of how many arguments were actually passed.)
* &CORE::srand()Father Chrysostomos2011-08-273-2/+8
| | | | | | | | This commit allows &CORE::srand to be called through references and via ampersand syntax. pp_srand is modified to take into account the nulls pushed on to the stack in pp_coreargs, which happens because pp_coreargs has no other way to tell srand how many arguments it’s actually getting. See commit 0163043a for details.
* &CORE::sleep()Father Chrysostomos2011-08-273-2/+3
| | | | | | | | | | | This commit allows &CORE::sleep to be called through references and via ampersand syntax. pp_sleep is modified to take into account the nulls pushed on to the stack in pp_coreargs, which happens because pp_coreargs has no other way to tell sleep how many arguments it’s actually getting. See commit 0163043a for details. Unfortunately, sleep with no args is nearly impossible to test porta- bly. But I have checked that it works.
* Close some unclosed comments in vms/vms.c.Craig A. Berry2011-08-271-4/+4
| | | | | | | | | | Clearly this code is not well-tested. Especially the parts that the compiler couldn't see because it was hidden by unclosed comment blocks. Ouch. I'm not going to name names or look too deep in the blame log, but suffice it to say that this is why patches that add hundreds of lines of new code without tests should not be accepted.
* Fix miscellaneous compiler warnings in vms/vms.c.Craig A. Berry2011-08-271-7/+7
| | | | | | | | | A couple of empty parameter lists and a couple of unsigned -1 error statuses. Brought to you by -Duser_c_flags=/WARN=(ENABLE=LEVEL4,INFORMATIONAL=ALL) which is only the third highest warning level.
* Remove unnecessary includes from vms/vms.c.Craig A. Berry2011-08-271-3/+4
| | | | | A couple are only needed for the homegrown utime() replacement on older systems. rmsdef.h is apparently not needed at all.
* &CORE::send() and &CORE::syswrite()Father Chrysostomos2011-08-272-2/+4
| | | | | | | | This commit makes &CORE::send and &CORE::syswrite callable through references and & syntax. All this commit has to do is remove them from the exception list in gv.c, as previous commits happen to have made them work. (I didn’t realise originally that these use pushmark.)
* &CORE::select()Father Chrysostomos2011-08-273-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit allows CORE::select to be called through references and via &ampersand syntax. This is a tricky case, as the select keyword represents two distinct operators. ck_select replaces the OP_SELECT with an OP_SSELECT if there is more that one argument. So what we do here is create an if(@_>1)/else block with the usual op-with-coreargs-child inside each branch. The op tree looks like this: $ ./perl -Ilib -mO=Concise,CORE::select -e 'BEGIN{\&CORE::select} ' CORE::select: 8 <1> leavesub[1 ref] K/REFC,1 ->(end) - <1> null K/1 ->8 5 <|> cond_expr(other->6) K/1 ->9 4 <2> gt sK/2 ->5 2 <1> rv2av[t4] sK/1 ->3 1 <#> gv[*_] s ->2 3 <$> const[IV 1] s ->4 7 <@> sselect[t2] K ->8 - <0> ex-pushmark s ->6 6 <$> coreargs(IV 218) ->7 a <@> select[t1] sK/1 ->8 - <0> ex-pushmark s ->9 9 <$> coreargs(IV 219) s/DREF1 ->a -e syntax OK There was no need to modify pp_select to handle a null when there is no argument, as it can already handle it.
* Document getprotobynumber’s precedenceFather Chrysostomos2011-08-271-0/+7
|
* perlfunc/gethostbyname: Add missing C in C<>Father Chrysostomos2011-08-271-1/+1
|
* Testing deparsing of CORE::notFather Chrysostomos2011-08-271-2/+1
|
* Get coreamp.t passing on VMS.Craig A. Berry2011-08-271-2/+6
| | | | | | | | | | | | The last record in a file ends with a newline willy nilly, so we might as well write (and test for) one explicitly. The name of a directory file ends with .DIR, so we need to allow for that. File::Temp panics when trying to delete the directory that is the current working directory, so save where we were and restore to it before clean-up.
* pp.c: Use built-in case tables for ords < 256Karl Williamson2011-08-271-27/+4
| | | | | | | | | | | | | Previously, all case changing on utf8-encoded strings used the tables on disk, under the off-chance that there was a user-defined case change override in effect. Now that that feature has been removed, this can't happen, so we can use the existing built-in tables. This code has been present and ifdef'd out since 5.10.1. New compiler warnings forced a few other changes besides removing the #if statements Running some primitive benchmarks showed that this sped up upper-casing of utf8 strings in the latin1 range by 2 orders of magnitude.
* pp.c: Change commentKarl Williamson2011-08-271-14/+8
| | | | | This now reflects Tom Christiansen's and my current thinking about Greek Final Sigma
* Make pod2html a regular script without substitutionsFlorian Ragwitz2011-08-279-52/+75
| | | | | | This will make the CPAN dist easier. For the perl core, we still need substitutions to get the right she-bang as we don't go through EU::MM to fix it for us. For that, we add utils/pod2html.PL.
* Give Pod-Html a more modern dist layoutFlorian Ragwitz2011-08-272-17/+17
|
* &CORE::reset()Father Chrysostomos2011-08-263-2/+17
| | | | | | | | This commit allows &CORE::reset to be called through references and via ampersand syntax. pp_reset is modified to take into account the nulls pushed on to the stack in pp_coreargs, which happens because pp_coreargs has no other way to tell reset how many arguments it’s actually getting. See commit 0163043a for details.
* GVs of localised arrays and hashes should be refcountedFather Chrysostomos2011-08-263-5/+18
| | | | | | | | | | Otherwise the GV can be freed before the scope-popping code can put the old entry back in it: $ perl -le 'local @{"x"}; delete $::{x}' Bus error $ perl -le 'local %{"x"}; delete $::{x}' Bus error
* &CORE::foo() for (sys)read and recvFather Chrysostomos2011-08-264-7/+59
| | | | | | | | | | | | | | These are grouped together because they all have \$ in their prototypes. This commit allows the subs in the CORE package under those names to be called through references and via &ampersand syntax. The coreargs op in the subroutine is marked with the OPpSCALARMOD flag. (scalar_mod_type in op.c returns true for these three ops, indicating that the OA_SCALARREF parameter is \$, not \[$@%(&)*].) pp_coreargs uses that flag to decide what arguments to reject.
* Add OPpCOREARGS_SCALARMOD flagFather Chrysostomos2011-08-262-1/+2
| | | | | pp_coreargs will use this to distinguish between the \$ and \[$@%*] prototypes.
* Update the comments at the top of t/op/core*.tFather Chrysostomos2011-08-262-7/+4
|