3 years agoNo need to go into this much detail in the pod (also podcheck doesn't like it) v5.15.3
Stevan Little [Wed, 21 Sep 2011 00:42:50 +0000]
No need to go into this much detail in the pod (also podcheck doesn't like it)

3 years agoTweak wording of the Notice based on Jesse's feedback
Stevan Little [Tue, 20 Sep 2011 22:12:39 +0000]
Tweak wording of the Notice based on Jesse's feedback

3 years agoAdding some Known Problems to perldelta
Stevan Little [Tue, 20 Sep 2011 21:46:40 +0000]
Adding some Known Problems to perldelta

3 years agoremoving the comment from the perldelta (and the previous perldelta as well)
Stevan Little [Tue, 20 Sep 2011 17:48:26 +0000]
removing the comment from the perldelta (and the previous perldelta as well)

3 years agofinalize perldelta
Stevan Little [Tue, 20 Sep 2011 16:53:49 +0000]
finalize perldelta

3 years agoadding new release to perlhist
Stevan Little [Tue, 20 Sep 2011 16:51:29 +0000]
adding new release to perlhist

3 years agofixing the path to pod2html in the release managers guide
Stevan Little [Tue, 20 Sep 2011 16:43:46 +0000]
fixing the path to pod2html in the release managers guide

3 years agoAdding the acknowledgements section to perldelta
Stevan Little [Tue, 20 Sep 2011 16:31:10 +0000]
Adding the acknowledgements section to perldelta

3 years agoUpdate Module::CoreList for 5.15.3
Stevan Little [Tue, 20 Sep 2011 01:24:56 +0000]
Update Module::CoreList for 5.15.3

3 years agoThe link to Devel::PPPort was not understood by porting/podcheck.t so we had to teach it
Stevan Little [Tue, 20 Sep 2011 00:54:33 +0000]
The link to Devel::PPPort was not understood by porting/podcheck.t so we had to teach it

3 years agoperldelta pod tweaks,.. this is not a link
Stevan Little [Tue, 20 Sep 2011 00:53:40 +0000]
perldelta pod tweaks,.. this is not a link

3 years agomanually updating INSTALL version "Upgrading from 5.X.Y or earlier" as specified...
Stevan Little [Tue, 20 Sep 2011 00:35:32 +0000]
manually updating INSTALL version "Upgrading from 5.X.Y or earlier" as specified in the RMG

3 years agobump version to 5.15.3 using Porting/bump-perl-version
Stevan Little [Mon, 19 Sep 2011 21:14:52 +0000]
bump version to 5.15.3 using Porting/bump-perl-version

3 years agoMore pod formatting tweaks
Stevan Little [Mon, 19 Sep 2011 21:26:34 +0000]
More pod formatting tweaks

3 years agoFix some pod errors reported by podchecker
Stevan Little [Mon, 19 Sep 2011 21:06:01 +0000]
Fix some pod errors reported by podchecker

3 years agoUpdating perldelta in preparation for the 5.13.3 release.
Stevan Little [Mon, 19 Sep 2011 20:45:12 +0000]
Updating perldelta in preparation for the 5.13.3 release.

3 years agoFixing the version in the comment in perl5152delta.pod
Stevan Little [Mon, 19 Sep 2011 19:51:02 +0000]
Fixing the version in the comment in perl5152delta.pod

3 years agoSkip 2 tests in t/op/filetest.t if t/TEST is a symlink.
Nicholas Clark [Tue, 20 Sep 2011 13:11:46 +0000]
Skip 2 tests in t/op/filetest.t if t/TEST is a symlink.

t/TEST is usually a regular file, but not always. For example, if one is
building using a symlink forest (eg ./Configure -Dmksymlinks) then it will
be a symlink.

3 years agoUpdate CPAN-Meta to CPAN version 2.112621
Stevan Little [Mon, 19 Sep 2011 16:57:51 +0000]
Update CPAN-Meta to CPAN version 2.112621

  [DELTA]

  2.112621  2011-09-19 12:15:16 America/New_York

    [BUGFIX]

    - Spell BACKEND environment variables correctly this time
      [noticed by Stevan Little]

  2.112620  2011-09-18 20:56:06 America/New_York

    [BUGFIX]

    - Protect tests against PERL_(YAML|JSON)_BACKEND settings that could
      cause tests to fail. (RT #69979)

3 years agoAdding myself to the AUTHORS list
Stevan Little [Mon, 19 Sep 2011 16:30:42 +0000]
Adding myself to the AUTHORS list

3 years agoregen generated files
Dave Rolsky [Fri, 16 Sep 2011 04:00:45 +0000]
regen generated files

3 years agoInclude stub files in pod.lst
Dave Rolsky [Fri, 16 Sep 2011 04:00:32 +0000]
Include stub files in pod.lst

3 years agoExplicitly ignore the stub pod files I just added when doing the sanity check
Dave Rolsky [Fri, 16 Sep 2011 04:00:09 +0000]
Explicitly ignore the stub pod files I just added when doing the sanity check

3 years agoadd stub files for deleted OO-related pod files
Dave Rolsky [Fri, 16 Sep 2011 03:39:32 +0000]
add stub files for deleted OO-related pod files

3 years agoFor RC releases there's no indexer report
Florian Ragwitz [Mon, 19 Sep 2011 12:10:31 +0000]
For RC releases there's no indexer report

3 years agouse :raw to avoid interference from PERL_UNICODE when creating test data
Tony Cook [Mon, 19 Sep 2011 05:23:44 +0000]
use :raw to avoid interference from PERL_UNICODE when creating test data

986a805c added dist/IO/t/io_utf8argv.t which creates a utf-8 test file
from raw bytes.  When PERL_UNICODE was set the bytes were encoded as
utf-8, so producing a double-encode file.

Create the file with :raw to avoid that.

3 years agoclear $ENV{PERL_UNICODE} before runperl()ing a test of use open.
Tony Cook [Mon, 19 Sep 2011 05:20:04 +0000]
clear $ENV{PERL_UNICODE} before runperl()ing a test of use open.

If PERL_UNICODE was set to a value that modified stream behaviour, the
test added in 73f1eaca would fail, because the implied -C option would
cause the behaviour the test was checking wouldn't happen.

3 years agoFix the version of CoreList that'll ship with 5.14.2
Florian Ragwitz [Mon, 19 Sep 2011 05:13:42 +0000]
Fix the version of CoreList that'll ship with 5.14.2

3 years agoUpdate Module::CoreList for 5.14.2
Florian Ragwitz [Mon, 19 Sep 2011 04:34:54 +0000]
Update Module::CoreList for 5.14.2

3 years agoRe-generate known_pod_issues.dat
Florian Ragwitz [Mon, 19 Sep 2011 04:45:11 +0000]
Re-generate known_pod_issues.dat

3 years agoCorrect perldelta entry for -l \*foo change
Father Chrysostomos [Mon, 19 Sep 2011 00:08:28 +0000]
Correct perldelta entry for -l \*foo change

3 years agoUpdate CPAN-Meta to CPAN version 2.112600
Chris 'BinGOs' Williams [Sun, 18 Sep 2011 21:01:08 +0000]
Update CPAN-Meta to CPAN version 2.112600

  [DELTA]

  2.112600  2011-09-17 12:21:09 America/New_York

    [DOCUMENTATION]

    - Fixed spelling error in CPAN::Meta::Spec (RT #71036) [Gregor Hermann]

3 years ago[perl #95034] Make perldoc <url> use a reasonabe name
Father Chrysostomos [Sun, 18 Sep 2011 21:17:50 +0000]
[perl #95034] Make perldoc <url> use a reasonabe name

This patch makes perldoc with a URL use a somewhat reasonable name
based on the basename of the URL, instead of displaying PALLEGCSYO or
BJ1KKH1675 in the pod header (based on the tmp file name).

It treats all URLs the same (changing perldoc.pod to PERLDOC), instead
of treating .pm’s specially.  Maybe this could be improved later.

3 years agoDBFile -> DB_File
Father Chrysostomos [Sun, 18 Sep 2011 19:48:05 +0000]
DBFile -> DB_File

3 years agoUpdate skip count in t/op/filetest.t after 433644eed.
Craig A. Berry [Sun, 18 Sep 2011 19:33:51 +0000]
Update skip count in t/op/filetest.t after 433644eed.

3 years agoNoted recent changes to Module::CoreList and added http://perlpunks.de/corelist
Chris 'BinGOs' Williams [Sun, 18 Sep 2011 19:37:22 +0000]
Noted recent changes to Module::CoreList and added perlpunks.de/corelist

3 years agopodcheck: Clean up known issues
Karl Williamson [Sun, 18 Sep 2011 19:13:21 +0000]
podcheck: Clean up known issues

When a link to a module is unknown, it is better to use the --add_link
option to podcheck.t and not the --regen option

3 years agoIncrease $VERSIONs for Text::Abbrev and Search::Dict
Father Chrysostomos [Sun, 18 Sep 2011 13:13:34 +0000]
Increase $VERSIONs for Text::Abbrev and Search::Dict

3 years agofix NAME section in Text::Abbrev and Search::Dict
Robin Barker [Sat, 10 Sep 2011 08:05:13 +0000]
fix NAME section in Text::Abbrev and Search::Dict

These modules currently warn when parsing ABSTRACT_FROM,
as the NAME section does not have the correct form; so
add "$package - " at the start of the NAME section line.

3 years agoOnly upgrade when necessary
Leon Timmermans [Sun, 18 Sep 2011 10:22:30 +0000]
Only upgrade when necessary

3 years agoDeparse "${#}a"
Father Chrysostomos [Sun, 18 Sep 2011 05:42:58 +0000]
Deparse "${#}a"

3 years agoDeparse $#{/} correctly
Father Chrysostomos [Sun, 18 Sep 2011 05:39:17 +0000]
Deparse $#{/} correctly

3 years agoMake -l always treat non-bareword arguments as file names
Father Chrysostomos [Sun, 18 Sep 2011 03:47:26 +0000]
Make -l always treat non-bareword arguments as file names

Here is some suspicious code in Perl_my_lstat_flags:

     if (SvROK(sv) && isGV_with_GP(SvRV(sv)) && ckWARN(WARN_IO)) {
  Perl_warner(aTHX_ packWARN(WARN_IO), "Use of -l on filehandle %s",
  GvENAME((const GV *)SvRV(sv)));
  return (PL_laststatval = -1);
     }

The behaviour differs depending on whether warnings are enabled.

That -1 turns into undef in pp_ftlink.  So we get an undef return
value with warnings on, but a file test on a file name otherwise.

In 5.6.2, -l $foo always treated $foo as a file name.

In 5.8+, if it is a reference (ignoring magic) and the reference
points to a typeglob (ignoring magic) and io warnings are on, it warns
and returns undef.

So the only time that undef return is reached is when a warning has
been emitted, so it’s code that will likely be corrected before it
goes into production.  Hence I think it unlikely that anyone could be
relying on the behaviour of -l \*foo (under warnings).

So this commit restores the 5.6 behaviour for that case.

3 years agoMake stacked -l work
Father Chrysostomos [Sun, 18 Sep 2011 03:16:36 +0000]
Make stacked -l work

Perl 5.10.0 introduced stacked filetest operators,

   -x -r $foo

being equivalent to

    -r $foo && -x _

That does not work with -l.  It was these suspicious lines in
Perl_my_lstat_flags that drew my attention to it:

>     else if (PL_laststype != OP_LSTAT
>      && (PL_op->op_private & OPpFT_STACKED) && ckWARN(WARN_IO))
>  Perl_croak(aTHX_ no_prev_lstat);

That croak only happens when warnings are on.  Warnings are just
supposed to be warnings, unless the ‘user’ explicitly requests
fatal warnings.

$ perl -le 'print "foo", -l -e "miniperl"'
foo
$ perl -lwe 'print "foo", -l -e "miniperl"'
The stat preceding -l _ wasn't an lstat at -e line 1.

That it doesn’t die in the first example is a bug.

In fact, it’s using the return value of -e as a file name:

$ ln -s miniperl 1
$ ./miniperl -le 'print -l -e "miniperl"'
1

And, with warnings on, if the preceding stat *was* an lstat, it
falls back to the pre-stacked behaviour, just as it does when warn-
ings are off.

It’s meant to be equivalent to -e "miniperl" && -l _ (which is why the
error message above says ‘The stat preceding -l _’).

3 years agoperlglossary: fix broken link
Father Chrysostomos [Sun, 18 Sep 2011 02:39:07 +0000]
perlglossary: fix broken link

3 years agoperlglossary: Make empty-list-as-scalar even clearer
Father Chrysostomos [Sun, 18 Sep 2011 02:32:22 +0000]
perlglossary: Make empty-list-as-scalar even clearer

3 years agoDocument empty-list-as-scalar in perlglossary
Chas. Owens [Sun, 18 Sep 2011 02:31:09 +0000]
Document empty-list-as-scalar in perlglossary

3 years agoReally allow podcheck.t to be run from outside t/
Father Chrysostomos [Sun, 18 Sep 2011 02:35:41 +0000]
Really allow podcheck.t to be run from outside t/

4e9a627e2 was not enough.

3 years agoperldata: Mention undefined as a false val
Father Chrysostomos [Sun, 18 Sep 2011 02:25:26 +0000]
perldata: Mention undefined as a false val

3 years agoAllow podcheck.t to be run from outside t/ for convenience
Father Chrysostomos [Sun, 18 Sep 2011 02:12:38 +0000]
Allow podcheck.t to be run from outside t/ for convenience

3 years agoUpdate META.yml following 986a805c
Father Chrysostomos [Sat, 17 Sep 2011 21:28:29 +0000]
Update META.yml following 986a805c

3 years agoCorrect punctuation in some POSIX error messages
Father Chrysostomos [Sat, 17 Sep 2011 20:23:07 +0000]
Correct punctuation in some POSIX error messages

Commit fa22ee54 changed some of the POSIX error messages to be more
consistent, but in doing so made many of them grammatically incorrect.
It is almost always incorrect in English to join two independent
clauses with a comma.

I don’t think it’s particularly important that error messages be gram-
matical; I just don’t want them getting worse over time.  Hence, I
have not touched those that were already ungrammatical.

3 years agoperlop: Clarify \octal slightly
Father Chrysostomos [Sat, 17 Sep 2011 19:46:20 +0000]
perlop: Clarify \octal slightly

This is to address ticket #94252.

3 years agoMake IO::Handle::getline(s) respect the open pragma
Father Chrysostomos [Sat, 17 Sep 2011 19:09:22 +0000]
Make IO::Handle::getline(s) respect the open pragma

See <https://rt.cpan.org/Ticket/Display.html?id=66474>.  Also, this
came up in <https://rt.perl.org/rt3/Ticket/Display.html?id=92728>.

The <> operator, when reading from the magic ARGV handle, automatic-
ally opens the next file.  Layers set by the lexical open pragma are
applied, if they are in scope at the point where <> is used.

This works almost all the time, because the common convention is:

    use open ":utf8";

    while(<>) {
        ...
    }

IO::Handle’s getline and getlines methods are Perl subroutines
that call <> themselves.  But that happens within the scope of
IO/Handle.pm, so the caller’s I/O layer settings are ignored.  That
means that these two expressions are not equivalent within in a
‘use open’ scope:

    <>
    *ARGV->getline

The latter will open the next file with no layers applied.

This commit solves that by putting PL_check hooks in place in
IO::Handle before compiling the getline and getlines subroutines.
Those hooks cause every state op (nextstate, or dbstate under the
debugger) to have a custom pp function that saves the previous value
of PL_curcop, calls the default pp function, and then restores
PL_curcop.

That means that getline and getlines run with the caller’s compile-
time hints.  Another way to see it is that getline and getlines’s own
lexical hints are never activated.

(A state op carries all the lexical pragmata.  Every statement
has one.  When any op executes, it’s ‘pp’ function is called.
pp_nextstate and pp_dbstate both set PL_curcop to the op itself.  Any
code that checks hints looks at PL_curcop, which contains the current
run-time hints.)

3 years agoperldelta for h2ph conditional sub fix
Father Chrysostomos [Sat, 17 Sep 2011 18:51:16 +0000]
perldelta for h2ph conditional sub fix

3 years agodon't redefine macrosubs in .ph
Lukas Mai [Sat, 17 Sep 2011 16:31:00 +0000]
don't redefine macrosubs in .ph

h2ph generates code of the form

 unless(defined(&FOO)) {
     sub FOO () {42;}
 }

for a C macro like '#define FOO 42'.

The problem with that: 'sub' happens at compile time, 'unless' at runtime.
So the sub is unconditionally defined first, then the unless runs with
an empty body. This behavior was introduced in commit
3d271ce79d39df56470393916b3d33ff26db2c8b (the syntax errors there were
fixed in commit 4a8e146e38ec2045f1f817a7cb578e1b1f80f39f).

There are already two code paths there, one for indentation level > 0
(eval), the other for toplevel definitions (straight sub). This patch
unifies them to always use 'eval' / runtime definitions. This change
shortens the code and makes the conditions actually work.
It moves the check for '#define FOO FOO' further up because I don't
see why it only needs to be done if indentation == 0. I changed the
comparison to use a whitespace-agnostic regex because
'" \&$name" eq $new' looks too brittle (the redundant \ doesn't help).

3 years agoperlobj: Fix pod problems
Karl Williamson [Sat, 17 Sep 2011 18:43:57 +0000]
perlobj: Fix pod problems

introduced by 7168b2511bddd4967be30033b32ce8b1b6500f6d

3 years agoperldata: Only one "_" is allowed between each digit pair
Karl Williamson [Sat, 17 Sep 2011 18:16:15 +0000]
perldata: Only one "_" is allowed between each digit pair

3 years agopodcheck.t: Don't use case-sensitive file exclusion
Karl Williamson [Mon, 5 Sep 2011 18:39:23 +0000]
podcheck.t: Don't use case-sensitive file exclusion

VMS by default doesn't preserve case in its file systems, and so
excluding a file based on case-sensitive matching will fail there.

3 years agoLots of revisions from Damian for perlobj
Damian Conway [Sat, 17 Sep 2011 13:39:56 +0000]
Lots of revisions from Damian for perlobj

A lot of this is fixing the incorrect meme of "an object is a blessed
reference", but this change also corrects a number of typos, adds clarifying
bits of text, etc.

3 years agoTweaks to perlootut by Damian
Damian Conway [Sat, 17 Sep 2011 13:29:47 +0000]
Tweaks to perlootut by Damian

Mostly this consists of removing the incorrect meme that an object is a
blessed reference.

3 years agoPOSIX::access() doesn't do ENOTDIR on VMS.
Craig A. Berry [Sat, 17 Sep 2011 12:15:15 +0000]
POSIX::access() doesn't do ENOTDIR on VMS.

Even though the underlying error is RMS$_DNF.  Go figure.

3 years agoFix recursion warning for ‘no warnings; goto &sub’
Father Chrysostomos [Sat, 17 Sep 2011 07:27:14 +0000]
Fix recursion warning for ‘no warnings; goto &sub’

Commit 309aab3a made goto &foo make the lexical hints of the caller of
the sub containing the goto visible when foo is called.  CORE subs
need this to function properly when ‘goneto’.  But in that commit I
put the PL_curcop assignment before the recursion check, causing the
warning settings of the caller to be used, instead of those at the
goto.  This commit moves the PL_curcop further down in pp_goto.

3 years agoTests for goto &xsub and lexical hints
Father Chrysostomos [Sat, 17 Sep 2011 01:57:37 +0000]
Tests for goto &xsub and lexical hints

This new script tests that goto &xsub causes the sub to see the hints,
not of the subroutine it replaces, but of that subroutine’s caller.

3 years agoMake goto &CORE::sub use the right lexical scope
Father Chrysostomos [Sat, 17 Sep 2011 01:54:57 +0000]
Make goto &CORE::sub use the right lexical scope

Since goto &foo is supposed to replace the current sub call, as though
foo had been called instead, logically foo should see the same lexical
hints that would have been seen if it had been called to begin with.

Regular Perl subs begin with nextstate ops, so they have their own
lexical scopes, but CORE:: subs see the caller’s PL_curcop.  They lack
a nextstate precisely so that they run in the caller’s scope, just as
though a built-in function had been called.

For Perl subs (as opposed to XSUBs), goto-&sub was not reset-
ting PL_curcop to the caller’s value, but leaving as it was, so
goto &CORE::sub would cause the CORE sub to run with the lexical hints
of the subroutine in replaced, instead of that sub’s caller.

This was never a problem until CORE subs came along, as they look like
Perl subs to the internals (they have an op tree and are flagged as
such), but comprise a sequence of ops that can never result from com-
piling Perl source code.

The simple one-line fix is to set PL_curcop in pp_goto for Perl subs
as well as XSUBs.  (For XSUBs it is implied by POPBLOCK.)

3 years agoMerge postinc and postdec
Father Chrysostomos [Fri, 16 Sep 2011 23:15:53 +0000]
Merge postinc and postdec

They were nearly identical.

3 years agoMerge preinc and postinc
Father Chrysostomos [Fri, 16 Sep 2011 23:10:57 +0000]
Merge preinc and postinc

They are almost identical.  This gives the compiler less code
to digest.

3 years agoMake ++ and -- work on glob copies
Father Chrysostomos [Fri, 16 Sep 2011 22:48:46 +0000]
Make ++ and -- work on glob copies

These ops considered typeglobs read-only, even if they weren’t.

3 years ago[perl #93638] $ENV{LS_COLORS} causes miniperl glob failure
Father Chrysostomos [Fri, 16 Sep 2011 21:32:20 +0000]
[perl #93638] $ENV{LS_COLORS} causes miniperl glob failure

On some systems, csh croaks if the LS_COLORS envvar contains something
it considers invalid.

The easiest and least intrusive fix for now is to localize %ENV before
running csh, though eventually it might be nice to use File::Glob in
miniperl, either by linking it statically or by inlining it.

3 years agoupdate B::Concise test for B::Deparse change
Zefram [Fri, 16 Sep 2011 21:39:07 +0000]
update B::Concise test for B::Deparse change

3 years agoUpdate CPAN-Meta to CPAN version 2.112580
Chris 'BinGOs' Williams [Fri, 16 Sep 2011 20:18:45 +0000]
Update CPAN-Meta to CPAN version 2.112580

  [DELTA]

  2.112580  2011-09-15 10:53:59 America/New_York

    [BUGFIX]

    - Use UTF-8 mode for internal structure cloning to avoid bugs
      in Perl <= 5.8.6 (RT #70936) [Dagfinn Ilmari Mannsåker]

3 years agoUpdate CPANPLUS to CPAN version 0.9111
Chris 'BinGOs' Williams [Fri, 16 Sep 2011 20:02:58 +0000]
Update CPANPLUS to CPAN version 0.9111

  [DELTA]

  Changes for 0.9111      Fri Sep 16 10:15:06 2011
  ================================================
  * Enhance CPANPLUS::Dist::MM Makefile/Makefile.PL
    age checking code to resolve some issues.

3 years agoskip_all is a sub in t/test.pl.
Craig A. Berry [Fri, 16 Sep 2011 20:07:42 +0000]
skip_all is a sub in t/test.pl.

plan(skip_all => 'foo') is a Test::More-ism that survived the
switch to t/test.pl in 8d646433865d105d3ca0f95dd6593fe343e37aa2
unchanged and caused the test to fail where d_shm is not defined
or IPC::SysV is not built.

3 years agomake B::Deparse handle $[ for older perls
Zefram [Fri, 16 Sep 2011 19:44:51 +0000]
make B::Deparse handle $[ for older perls

3 years agoNetWare has stdbool.h, so add it as 'define' to config.wc
Nicholas Clark [Fri, 16 Sep 2011 17:45:29 +0000]
NetWare has stdbool.h, so add it as 'define' to config.wc

[bd31be4baa3ee68a failed to add *any* value for i_stdbool to config.wc]

3 years agoAssorted File::Glob test fix-ups following 528bd3ce85.
Craig A. Berry [Fri, 16 Sep 2011 17:08:19 +0000]
Assorted File::Glob test fix-ups following 528bd3ce85.

- Avoid list assignment to %ENV, which fails at compile time on VMS.
- Use consistent indentation for readability.
- Mark bsd_glob('~') tests TODO on VMS. The HOME path is successfully
  retrieved, but it normally contains square brackets, which confuse
  glob, because it thinks the directory portion of the path contained
  within brackets is a pattern.  The path probably needs to be
  converted to Unix syntax first.

3 years agoDisallow weakening of read-only references
Father Chrysostomos [Fri, 16 Sep 2011 16:25:10 +0000]
Disallow weakening of read-only references

$ perl -MScalar::Util=weaken -le 'DESTROY{return if$_++;weaken$_[0]}$x=bless[]'
DESTROY created new reference to dead object 'main' during global destruction.

It says that because the reference count has gone down to -1 (or the
max unsigned value, whichever it is), and the error occurs when
SvREFCNT is true.  So there is no new reference to the dead object;
it’s just the refcount that’s off.

This case is worse:

$ perl -MScalar::Util=weaken -le 'DESTROY{weaken$_[0];$x=$_[0]}bless[];'
Segmentation fault

$_[0]’s reference count is normally lowered manually by sv_clear, to
avoid a recursive call to sv_clear (as lowering the reference count
normally triggers that).  If the variable has been weakened, then
$_[0] no longer holds a reference count.  sv_clear proceeds to destroy
at, as its reference count is 1 (held by $x), causing $x to point to a
freed scalar.  Not good.

Since $_[0] is read-only anyway, it should not be weakenable.

3 years agoperldelta update
Father Chrysostomos [Fri, 16 Sep 2011 16:21:05 +0000]
perldelta update

3 years agoRevert "Put Jesse's "How a Bill Becomes a Law" into perlhack (with editing)"
Dave Rolsky [Fri, 16 Sep 2011 14:07:52 +0000]
Revert "Put Jesse's "How a Bill Becomes a Law" into perlhack (with editing)"

This reverts commit 6a945912f2861921b440402072b7053a1dc414a5.

3 years agoPartial perldelta update
Father Chrysostomos [Fri, 16 Sep 2011 13:17:28 +0000]
Partial perldelta update

3 years agoi_stdbool for configure.com.
Craig A. Berry [Fri, 16 Sep 2011 12:38:40 +0000]
i_stdbool for configure.com.

The comments in the header itself say that it needs DEC C 6.4 or
later.

3 years agoRegenerate. Sorry for the massive re-order
H.Merijn Brand [Fri, 16 Sep 2011 11:21:07 +0000]
Regenerate. Sorry for the massive re-order

3 years agoProbe for <stdbool.h>, and if found use it in handy.h
Nicholas Clark [Wed, 14 Sep 2011 12:03:31 +0000]
Probe for <stdbool.h>, and if found use it in handy.h

This means that the core uses the compiler's bool type if one exists.
This avoids potential problems of clashes between perl's own implementation
of bool and the compiler's bool type, which otherwise occur when one
attempts to include headers which in turn include <stdbool.h>.

Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>

3 years agoDear perlvar: ${\ fPEN} was introduced in 5.8.0.
Father Chrysostomos [Fri, 16 Sep 2011 05:45:37 +0000]
Dear perlvar: ${\ fPEN} was introduced in 5.8.0.

3 years ago[perl #92728] open.pm without :std should leave std alone
Father Chrysostomos [Fri, 16 Sep 2011 03:22:28 +0000]
[perl #92728] open.pm without :std should leave std alone

‘use open’ without :std was turning off layers on STDIN and STDOUT
(but not STDERR), due to a few missing if() conditions and due to an
omission of STDERR (which probably also caused STDERR’s handles to
accumulate through multiple calls to ‘use open ':std'...’).

This fixes that.  (As if you were expecting otherwise.)

3 years agoMake open.t use test.pl
Father Chrysostomos [Fri, 16 Sep 2011 02:58:43 +0000]
Make open.t use test.pl

so future commits can use runperl.

3 years agoAdd a mention of #p5p to perlhack
Dave Rolsky [Fri, 16 Sep 2011 04:26:54 +0000]
Add a mention of #p5p to perlhack

3 years agoPut Jesse's "How a Bill Becomes a Law" into perlhack (with editing)
Dave Rolsky [Fri, 16 Sep 2011 04:26:45 +0000]
Put Jesse's "How a Bill Becomes a Law" into perlhack (with editing)

3 years agoWording tweak to clarify that perlbug submits the patch for you via email
Dave Rolsky [Fri, 16 Sep 2011 04:06:43 +0000]
Wording tweak to clarify that perlbug submits the patch for you via email

3 years agoRun podtidy on perlhack.pod
Dave Rolsky [Fri, 16 Sep 2011 04:06:23 +0000]
Run podtidy on perlhack.pod

3 years agoMake tie_fetch_count.t skip -[guk] globref tests
Father Chrysostomos [Fri, 16 Sep 2011 01:08:17 +0000]
Make tie_fetch_count.t skip -[guk] globref tests

When trying to fix this before (4a021280) I assumed that these func-
tions would die on primitive platforms, without even looking at the
code to make sure.

They don’t die, but return false.

Since Config does not list them, we just have to skip the -k \$tied
tests on all platforms.

Since they share the same code as a whole list of other filetest ops,
I think this code is still tested well enough.

3 years ago[perl #99142] Make GV_ADDMG and magic vars account for s(t)ubs
Father Chrysostomos [Fri, 16 Sep 2011 00:56:30 +0000]
[perl #99142] Make GV_ADDMG and magic vars account for s(t)ubs

When I eliminated is_gv_magical_sv (commit 23496c6ea), I did not take
into account that existing symbol table elements might not be GVs.
The special handling that GV_ADDMG does (to avoid creating a GV at all
unless a magical variable is created) simply does not apply if there
is a stash element there already, so this commit disables it.

The special handling involves creating a GV without assigning it to
the symbol table until the end of the function, where it gets freed if
it turns out not to contain a magical variable.  If the GV it is deal-
ing with is actually a non-GV that was residing in a stash element,
then we end up freeing something still in use.

When I made defined(&{"name"}) vivify CORE:: subs (commit 9da346da9),
this bug was extended to defined(&{"name"}), causing the
HTTP::MobileAttribute failure reported in the RT ticket (which was
actually triggered directly by code in Class::Inspector, but which
required HTTP::MobileAttribute’s test suite to make it apparent).

3 years agodocument convention for keys in %^H
Zefram [Thu, 15 Sep 2011 21:35:20 +0000]
document convention for keys in %^H

3 years agoFix some bugs in the example code for perlootut
Dave Rolsky [Thu, 15 Sep 2011 14:03:09 +0000]
Fix some bugs in the example code for perlootut

3 years agoremove outdated information from perlport
Moritz Lenz [Thu, 15 Sep 2011 12:26:52 +0000]
remove outdated information from perlport

3 years agoDon't #include headers already included by perl.h
Nicholas Clark [Wed, 14 Sep 2011 13:21:28 +0000]
Don't #include headers already included by perl.h

097ee67dff1c60f2 didn't need to include <locale.h> in locale.c (then
util.c) because it had been included by perl.h since 5.002 beta 1
3f270f98f9305540 missed removing the include of <unistd.h> from perl.c
or perlio.c
de8ca8af19546d49 changed perl.h to also include <sys/wait.h>, but didn't
notice that it code therefore be removed from perl.c, pp_sys.c and util.c

3 years agoUse test.pl miniperl check rather than by-hand in t/io/shm.t
George Greer [Thu, 15 Sep 2011 03:46:44 +0000]
Use test.pl miniperl check rather than by-hand in t/io/shm.t

Doing the miniperl check by hand didn't exit() so the test script would die
as soon as it got down to the "use IPC::SysV" line.

3 years agoTests in "t/io" aren't supposed to use Test::More yet, so use test.pl instead.
George Greer [Thu, 15 Sep 2011 03:45:54 +0000]
Tests in "t/io" aren't supposed to use Test::More yet, so use test.pl instead.

3 years agoshm.t: Skip under miniperl
Father Chrysostomos [Thu, 15 Sep 2011 01:07:02 +0000]
shm.t: Skip under miniperl

3 years agoshm.t: Don’t call shmctl in END when undefined
Father Chrysostomos [Wed, 14 Sep 2011 23:12:59 +0000]
shm.t: Don’t call shmctl in END when undefined

The skip was not inside a BEGIN block, so the END block ended up
getting compiled and running.