platform/upstream/perl.git
10 years agoRemoved the ifdef for FPUTS_BOTCH
Brian Fraser [Sat, 31 Aug 2013 01:47:31 +0000 (22:47 -0300)]
Removed the ifdef for FPUTS_BOTCH

This enabled a workaround for fputs on SunOS 4.0.1 and 4.0.2,
SunOS 4.1.x and later do not have the problem.

10 years agoRemove the ifdefs for ULTRIX_STDIO_BOTCH
Brian Fraser [Sat, 31 Aug 2013 01:40:46 +0000 (22:40 -0300)]
Remove the ifdefs for ULTRIX_STDIO_BOTCH

Not only has Ultrix been long out of support, this ifdef was
working around a bug particular to Ultrix 1.2.

10 years agoRemove an ifdef for the Harris HCX-9 froms sv.c
Brian Fraser [Fri, 30 Aug 2013 23:52:21 +0000 (20:52 -0300)]
Remove an ifdef for the Harris HCX-9 froms sv.c

Historical cruft.

10 years agoRemove HAS_64K_LIMIT
Brian Fraser [Fri, 30 Aug 2013 23:25:12 +0000 (20:25 -0300)]
Remove HAS_64K_LIMIT

This was only defined for MSDOS if not using DJGPP.  We've long
since dropped support for that, so this define and related code
can go.

10 years agoRemoved an '#ifdef COMMENTARY' in toke.c
Brian Fraser [Sat, 7 Sep 2013 03:37:19 +0000 (00:37 -0300)]
Removed an '#ifdef COMMENTARY' in toke.c

This was added as a micro-optimiaztion twenty years ago.

10 years agotoke.c: Remove a cargo-culted #undef CLINE
Brian Fraser [Fri, 30 Aug 2013 21:38:05 +0000 (18:38 -0300)]
toke.c: Remove a cargo-culted #undef CLINE

10 years agoRemove a '#undef ff_next' remnant from ages past.
Brian Fraser [Fri, 30 Aug 2013 21:02:45 +0000 (18:02 -0300)]
Remove a '#undef ff_next' remnant from ages past.

This was discussed long ago on the list but never actually removed:
http://www.nntp.perl.org/group/perl.perl5.porters/2001/01/msg29492.html

10 years agoregcomp.c: Remove the last usage of NO_UNARY_PLUS
Brian Fraser [Fri, 30 Aug 2013 20:37:27 +0000 (17:37 -0300)]
regcomp.c: Remove the last usage of NO_UNARY_PLUS

This was set for some VMS variants in 5.005, but has since been
excised from vmsish.h.  The ifdef in regcomp was a leftover.

10 years agoregcomp.c: Remove a cargo-culted #undef SPSTART
Brian Fraser [Fri, 30 Aug 2013 20:36:46 +0000 (17:36 -0300)]
regcomp.c: Remove a cargo-culted #undef SPSTART

10 years agoregcomp.c: Remove a #undef op
Brian Fraser [Fri, 30 Aug 2013 20:25:10 +0000 (17:25 -0300)]
regcomp.c: Remove a #undef op

10 years agoregcomp.c: Remove a useless use of I_STDARG
Brian Fraser [Fri, 30 Aug 2013 17:42:40 +0000 (14:42 -0300)]
regcomp.c: Remove a useless use of I_STDARG

10 years agoModule::CoreList export %delta and document it
Chris 'BinGOs' Williams [Sat, 21 Sep 2013 10:35:07 +0000 (11:35 +0100)]
Module::CoreList export %delta and document it

10 years agotest that $\ is localized and restored even if it was undef
Ricardo Signes [Sat, 21 Sep 2013 05:51:36 +0000 (14:51 +0900)]
test that $\ is localized and restored even if it was undef

This was broken before 4bac9ae47b5ad7845a24e26b0e95609805de688a
but there is no test, and it is not clear that we knew about
the bug or the fix.

10 years agoRMG - Add a note about merging the release branch back into blead
Steve Hay [Sat, 21 Sep 2013 00:05:11 +0000 (01:05 +0100)]
RMG - Add a note about merging the release branch back into blead

I was momentarily confused and almost did the wrong thing when I saw that
"git merge release-5.19.4" had produced a merge commit (71d5a36340),
whereas the merge of 5.19.3 a month ago did not (see f865d60069).

The cause was simply that a change (ac239e1c3e) had been pushed to blead
since I'd created the release branch, which had not happened when merging
the 5.19.3 release branch last month.

10 years agoOptimise if/unless wrt OP_AND/OP_OR/OP_DOR. Also optimise OP_OR/OP_DOR chains.
Matthew Horsfall (alh) [Thu, 19 Sep 2013 23:18:48 +0000 (19:18 -0400)]
Optimise if/unless wrt OP_AND/OP_OR/OP_DOR. Also optimise OP_OR/OP_DOR chains.

An OP_AND/OP_OR/OP_DOR in void context provides a short circuit
through ->op_other that can be used if AND/OR/DOR ops contained
within it jump out early. Use that short circuit.

Previously:

  $ ./perl -Ilib -MO=Concise -e 'if ($aa || $bb) {}'
  8  <@> leave[1 ref] vKP/REFC ->(end)
  1     <0> enter ->2
  2     <;> nextstate(main 3 -e:1) v:{ ->3
  -     <1> null vK/1 ->8
  6        <|> and(other->7) vK/1 ->8
  -           <1> null sK/1 ->6
  4              <|> or(other->5) sK/1 ->6              <-- Not optimised
  -                 <1> ex-rv2sv sK/1 ->4
  3                    <$> gvsv(*aa) s ->4
  -                 <1> ex-rv2sv sK/1 ->-
  5                    <$> gvsv(*bb) s ->6
  -           <@> scope vK ->-
  7              <0> stub v ->8

Now:

  $ ./perl -Ilib -MO=Concise -e 'if ($aa || $bb) {}'
  8  <@> leave[1 ref] vKP/REFC ->(end)
  1     <0> enter ->2
  2     <;> nextstate(main 3 -e:1) v:{ ->3
  -     <1> null vK/1 ->8
  6        <|> and(other->7) vK/1 ->8
  -           <1> null sK/1 ->6
  4              <|> or(other->5) sK/1 ->7               <-- Short circuited
  -                 <1> ex-rv2sv sK/1 ->4
  3                    <$> gvsv(*aa) s ->4
  -                 <1> ex-rv2sv sK/1 ->-
  5                    <$> gvsv(*bb) s ->6
  -           <@> scope vK ->-
  7              <0> stub v ->8

10 years ago[perl #3112] Stop last from returning values
Father Chrysostomos [Fri, 20 Sep 2013 08:34:31 +0000 (01:34 -0700)]
[perl #3112] Stop last from returning values

In push @a, last, it can try to return the @a, copying it like a sca-
lar in the process, resulting in Bizarre copy of ARRAY in last.

In do{{&{sub{"Just another Perl hacker,\n"}},last}}, it returns "Just
another Perl hacker,\n".

The former is clearly a bug.  The latter depends on a side-effect of
the same bug.

‘last’ really should not be trying to return the values that the same
statement has accumulated so far.

10 years agocorelist.pl - Fix the addition of a new perl release following 9f92b9bec5
Steve Hay [Fri, 20 Sep 2013 18:37:27 +0000 (19:37 +0100)]
corelist.pl - Fix the addition of a new perl release following 9f92b9bec5

Now that the check is working, it was working slightly too well and actually
picked up 5.019005 in the %delta because that had been added already and
thus didn't add it to %released when it should have done!

One simple fix is to move the processing of %released so that it's done
first, which makes sense since it appears first in the file anyway.

10 years agoPrepare Module::CoreList for 5.19.5 and bump its $VERSION
Steve Hay [Fri, 20 Sep 2013 18:14:58 +0000 (19:14 +0100)]
Prepare Module::CoreList for 5.19.5 and bump its $VERSION

10 years agoModule::CoreList 2.99 is now on CPAN
Steve Hay [Fri, 20 Sep 2013 17:47:20 +0000 (18:47 +0100)]
Module::CoreList 2.99 is now on CPAN

10 years agoBump version for 5.19.5
Steve Hay [Fri, 20 Sep 2013 16:55:41 +0000 (17:55 +0100)]
Bump version for 5.19.5

10 years agoAdd new perldelta for 5.19.5
Steve Hay [Fri, 20 Sep 2013 16:49:09 +0000 (17:49 +0100)]
Add new perldelta for 5.19.5

10 years agoAdd 5.19.4 epigraph
Steve Hay [Fri, 20 Sep 2013 16:37:04 +0000 (17:37 +0100)]
Add 5.19.4 epigraph

10 years agoMerge branch 'release-5.19.4' into blead
Steve Hay [Fri, 20 Sep 2013 16:08:18 +0000 (17:08 +0100)]
Merge branch 'release-5.19.4' into blead

10 years agoUse hv_fetch_ent() instead of hv_fetch() in S_finalize_op().
Nicholas Clark [Fri, 20 Sep 2013 13:16:09 +0000 (15:16 +0200)]
Use hv_fetch_ent() instead of hv_fetch() in S_finalize_op().

This makes the source code slightly shorter and clearer, and the object code
smaller.

10 years agoUpdate perlhist for Perl 5.19.4
Steve Hay [Fri, 20 Sep 2013 08:54:22 +0000 (09:54 +0100)]
Update perlhist for Perl 5.19.4

10 years agoFinalize perldelta
Steve Hay [Fri, 20 Sep 2013 08:52:20 +0000 (09:52 +0100)]
Finalize perldelta

10 years agoUpdate Module::CoreList for Perl 5.19.4
Steve Hay [Fri, 20 Sep 2013 08:30:04 +0000 (09:30 +0100)]
Update Module::CoreList for Perl 5.19.4

10 years agoUpdate RMG - Bump Module::CoreList* $VERSIONs sooner
Steve Hay [Fri, 20 Sep 2013 08:29:07 +0000 (09:29 +0100)]
Update RMG - Bump Module::CoreList* $VERSIONs sooner

The corelist.pl program picks up the $VERSION bumps for you if you bump
them first.

10 years agoFix line nums when multiline ${expr} spans here-doc
Father Chrysostomos [Fri, 20 Sep 2013 07:50:54 +0000 (00:50 -0700)]
Fix line nums when multiline ${expr} spans here-doc

<<end . ${

end
"bar"};
warn __LINE__ # 3, not 5

This was caused by commit a49b10d0a, which make scan_ident in toke.c
reallocate the parser’s current line buffer (SvPVX(PL_linestr)) to
search for whitespace surrounding an identifier.

In case there is an arbitrary expression, it temporarily records the
line number and resets it at the end if that turns out to be the case.
However, it was not resetting PL_parser->herelines, which records how
many line numbers to skip when next incrementing it (to skip past
here-doc bodies).

So save and restore that value, too.

10 years agoFix parser buffer corruption with multiline *{...}
Father Chrysostomos [Fri, 20 Sep 2013 07:33:49 +0000 (00:33 -0700)]
Fix parser buffer corruption with multiline *{...}

Since commit a49b10d0a, it has been possible for scan_ident in toke.c
to reallocate the parser’s buffer (SvPVX(PL_linestr)) when scanning
for multiline whitespace.

For the sake of those cases where it finds an arbitrary expression,
not just an identifier, it records a pointer to the first opening
brace, which it returns to the parser after finding out that there is
indeed an expression.

That pointer was not being updated when the buffer was being
allocated.

The solution is to record an offset, rather than a pointer, of the
opening brace relative to the beginning of the current line of input.

This one-liner:

$ ./miniperl  -e '*{' -e '         XS::APItest::gv_fetchmeth_type()' -e '}'

was giving me:

Unrecognized character \x80; marked by <-- HERE after 2<-- HERE near column 24 at -e line 2.

(There were nine nulls before the 2, but git stripped them out.)

10 years agoperldelta - Wrap to 79 columns
Steve Hay [Fri, 20 Sep 2013 07:41:24 +0000 (08:41 +0100)]
perldelta - Wrap to 79 columns

10 years agoperldelta for the prev. commit
Father Chrysostomos [Fri, 20 Sep 2013 06:28:18 +0000 (23:28 -0700)]
perldelta for the prev. commit

10 years agoDon’t free initial src from @INC sub too early
Father Chrysostomos [Fri, 20 Sep 2013 05:33:54 +0000 (22:33 -0700)]
Don’t free initial src from @INC sub too early

As noted in <20130919225357.GA18474@mars.tony.develop-help.com>, com-
mit 839a0e5 introduces uninitialized warnings (and sometimes other
warnings) in inccode.t.

What actually is happening is that \PVBM is no longer being inlined
and returning the same reference each time, but is returning a new
mortal reference.  Commit 839a0e5 uncovers an existing bug.

A sub in @INC can return a reference to a scalar containing initial
source code.  That returned value would be freed prematurely if it was
not referenced elsewhere.

We have to increment its reference count before leaving the scope, and
then mortalise it afterwards.

10 years agoperldelta - A couple of corrections and tweaks
Steve Hay [Fri, 20 Sep 2013 00:29:56 +0000 (01:29 +0100)]
perldelta - A couple of corrections and tweaks

10 years agocorelist.pl - Update RMG to reflect recent changes
Steve Hay [Thu, 19 Sep 2013 23:24:30 +0000 (00:24 +0100)]
corelist.pl - Update RMG to reflect recent changes

10 years agocorelist.pl - Prefer more recent versions where many have the same delta
Steve Hay [Thu, 19 Sep 2013 23:16:26 +0000 (00:16 +0100)]
corelist.pl - Prefer more recent versions where many have the same delta

When adding a new section to %delta in CoreList.pm and Utils.pm if we find
several previous versions which we can take the delta from then prefer the
most recent version. This has the effect that when adding the 5.019004
section to Utils.pm we now choose 5.019003 rather than a random one of
5.019000 (or 5.019), 5.019001, 5.019002 or 5.019003.

10 years agocorelist.pl - Put the new utilities delta section in place
Steve Hay [Thu, 19 Sep 2013 22:45:18 +0000 (23:45 +0100)]
corelist.pl - Put the new utilities delta section in place

This includes removing any existing stub section for this $perl_vnum first.

10 years agocorelist.pl - Fix make_coreutils_delta()
Steve Hay [Thu, 19 Sep 2013 22:43:24 +0000 (23:43 +0100)]
corelist.pl - Fix make_coreutils_delta()

10 years agocorelist.pl - Various tidy-ups
Steve Hay [Thu, 19 Sep 2013 22:42:29 +0000 (23:42 +0100)]
corelist.pl - Various tidy-ups

10 years agocorelist.pl - Apply BinGOs's commit "Two" at updating Utils.pm
Steve Hay [Thu, 19 Sep 2013 22:39:38 +0000 (23:39 +0100)]
corelist.pl - Apply BinGOs's commit "Two" at updating Utils.pm

This is commit 402e920b67.

10 years agocorelist.pl - Apply BinGOs's "First stab" at updating Utils.pm
Steve Hay [Thu, 19 Sep 2013 22:37:31 +0000 (23:37 +0100)]
corelist.pl - Apply BinGOs's "First stab" at updating Utils.pm

This is commit bdb83d4b01.

10 years agocorelist.pl - Correct the indentation of %delta's 'removed' entries
Steve Hay [Thu, 19 Sep 2013 22:29:25 +0000 (23:29 +0100)]
corelist.pl - Correct the indentation of %delta's 'removed' entries

The indentation was only 11 characters instead of 12 to match the 'changed'
entries.

10 years agocorelist.pl - Improve the updating of %delta and %deprecated
Steve Hay [Thu, 19 Sep 2013 22:25:59 +0000 (23:25 +0100)]
corelist.pl - Improve the updating of %delta and %deprecated

Both of these hashes needed to have the existing stub sections for the new
$perl_vnum manually removed prior to running corelist.pl otherwise a second
section for $perl_vnum got added. The script now deletes any such existing
section itself before adding the new (real) one.

10 years agocorelist.pl - Fix the updating of %released
Steve Hay [Thu, 19 Sep 2013 22:22:40 +0000 (23:22 +0100)]
corelist.pl - Fix the updating of %released

The code to not update %released if $perl_vnum is already in it didn't work
correctly. Fix this.

10 years agoTeach configure.com about Perl_drand48 and friends.
Craig A. Berry [Thu, 19 Sep 2013 21:30:04 +0000 (16:30 -0500)]
Teach configure.com about Perl_drand48 and friends.

Follow-up to 890c2948b6847.

10 years agoAdd newline to new switchd test for VMS.
Craig A. Berry [Thu, 19 Sep 2013 21:17:00 +0000 (16:17 -0500)]
Add newline to new switchd test for VMS.

On VMS, you're going to get a newline at EOF willy nilly, which
was making the expected output fail to match the actual output.
The simplest solution is just to put an explicit newline on the
print statement, which yields the same result everywhere.

Follow-up to 261cbad16f5ed8.

10 years agoUpgrade CPAN::Meta from version 2.132510 to 2.132620
Steve Hay [Thu, 19 Sep 2013 15:47:45 +0000 (16:47 +0100)]
Upgrade CPAN::Meta from version 2.132510 to 2.132620

10 years agoperldelta - 'nonexistent' should be 'non-existent'
Steve Hay [Thu, 19 Sep 2013 15:27:46 +0000 (16:27 +0100)]
perldelta - 'nonexistent' should be 'non-existent'

10 years agoperldelta - Remove all but one XXX notices
Steve Hay [Thu, 19 Sep 2013 15:16:27 +0000 (16:16 +0100)]
perldelta - Remove all but one XXX notices

10 years agoperldelta - Fill in currently remaining TODO items
Steve Hay [Thu, 19 Sep 2013 15:10:36 +0000 (16:10 +0100)]
perldelta - Fill in currently remaining TODO items

9d32676e doesn't need one since it only fixes things that were added post
5.19.3, but [perl #117265] is worth mentioning somewhere so I've added that
to the warnings entry.

10 years agoperldelta - Update entry for b29f65fce6
Steve Hay [Thu, 19 Sep 2013 14:32:17 +0000 (15:32 +0100)]
perldelta - Update entry for b29f65fce6

10 years agoperldelta for 3428cdc0d3
Steve Hay [Thu, 19 Sep 2013 14:25:44 +0000 (15:25 +0100)]
perldelta for 3428cdc0d3

10 years agoperldelta - More copy-editing
Steve Hay [Thu, 19 Sep 2013 14:20:00 +0000 (15:20 +0100)]
perldelta - More copy-editing

10 years agoperldelta - Un-TODO 9c7618be
Steve Hay [Thu, 19 Sep 2013 14:04:58 +0000 (15:04 +0100)]
perldelta - Un-TODO 9c7618be

As noted by Karl Williamson, it's very unlikely that any user would have
encountered the bug which this fixed, so it's not worth mentioning in
perldelta.

10 years agoAdd a USING_MSVC6 macro to identify Microsoft Visual C++ 6.0
Steve Hay [Thu, 19 Sep 2013 13:27:10 +0000 (14:27 +0100)]
Add a USING_MSVC6 macro to identify Microsoft Visual C++ 6.0

This simplifies some of the logic necessary for coping with its various
problems.

Suggested by Nicholas Clark.

10 years agoRemove Cwd from the "actually architecture dependant files" special cases.
Nicholas Clark [Thu, 19 Sep 2013 13:13:24 +0000 (15:13 +0200)]
Remove Cwd from the "actually architecture dependant files" special cases.

This probably hasn't been needed since the file Cwd.pm was moved from lib/
into the directory containing its XS code.

10 years agoAdded is_core(), which returns true if the module was/is in core
Neil Bowers [Wed, 18 Sep 2013 19:47:53 +0000 (20:47 +0100)]
Added is_core(), which returns true if the module was/is in core

Default to checking against $^V, but you can optionally specify
the perl release, and can also optionally specify a minimum
version of the module.

Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
10 years agoRemove 4 redundant #undefs, missed by commit 79be8fb4ac8fa995.
Nicholas Clark [Thu, 19 Sep 2013 09:32:02 +0000 (11:32 +0200)]
Remove 4 redundant #undefs, missed by commit 79be8fb4ac8fa995.

That commit removed all the code that defined PERL_NEED_MY_HTOLE64,
PERL_NEED_MY_LETOH64, PERL_NEED_MY_HTOBE64 and PERL_NEED_MY_BETOH64, but
missed removing code in perl.h which conditionally undefined them.

10 years agoperldelta for 88e3936f.
Craig A. Berry [Wed, 18 Sep 2013 02:16:21 +0000 (21:16 -0500)]
perldelta for 88e3936f.

10 years agoFix the VC6 build on Windows following commit e25d460c74
Steve Hay [Wed, 18 Sep 2013 22:56:21 +0000 (23:56 +0100)]
Fix the VC6 build on Windows following commit e25d460c74

As noted in commit 38aa66aabf, VC6 on Windows does not support the
64-bit-int build option, and likewise is broken if we don't undef HAS_QUAD
in the core.

10 years agoUpdate win32/config_H.[gv]c canned configuration files
Steve Hay [Wed, 18 Sep 2013 17:09:47 +0000 (18:09 +0100)]
Update win32/config_H.[gv]c canned configuration files

The win32/config.[gv]c files are generally kept up to date these days (and
we have tests to check that) so no changes are required in them.

The win32/config_H.[gv]c files are regenerated as per instructions in the
win32/Makefile and win32/makefile.mk, being careful to restore a couple of
things otherwise lost from the config_H.gc file. The files are now in sync
with the top-level master configuration file, config_h.SH.

10 years agoAdd Toby Inkster to AUTHORS
Father Chrysostomos [Wed, 18 Sep 2013 16:10:31 +0000 (09:10 -0700)]
Add Toby Inkster to AUTHORS

10 years agoExclude perlfaq1, perlglossary, etc from the list of pragmata - these just pod, not...
Toby Inkster [Wed, 18 Sep 2013 12:29:47 +0000 (13:29 +0100)]
Exclude perlfaq1, perlglossary, etc from the list of pragmata - these just pod, not modules.

10 years agoReally fix precedence problem in IO::Socket::connect() from 80d2c56d79
Steve Hay [Wed, 18 Sep 2013 13:11:21 +0000 (14:11 +0100)]
Really fix precedence problem in IO::Socket::connect() from 80d2c56d79

Thanks to Dagfinn Ilmari Mannsåker for paying more attention than me.

10 years agoperldelta - Correction to new slice syntax
Steve Hay [Wed, 18 Sep 2013 12:58:27 +0000 (13:58 +0100)]
perldelta - Correction to new slice syntax

Thanks to Michael Schroeder for the spot.

10 years agoMake changes_between() in Module::CoreList API the same as the other functions
Chris 'BinGOs' Williams [Wed, 18 Sep 2013 09:52:57 +0000 (10:52 +0100)]
Make changes_between() in Module::CoreList API the same as the other functions

10 years agoFix precedence problem in IO::Socket::connect() from 80d2c56d79
Steve Hay [Wed, 18 Sep 2013 10:09:21 +0000 (11:09 +0100)]
Fix precedence problem in IO::Socket::connect() from 80d2c56d79

Thanks to Andreas Koenig for the spot.

10 years agoMerge branch 'hugmeir/disallow_cntrl' into blead
Brian Fraser [Wed, 18 Sep 2013 08:42:12 +0000 (05:42 -0300)]
Merge branch 'hugmeir/disallow_cntrl' into blead

[perl #119123] disallow literal control character variables

This branch introduces a deprecation warning on variables like $^T,
where ^T is a literal control character in the source code.

It also reworks how the handling of whitespace in ${...} works,
fixing a number of bugs, such as ${\nfoo\n} not increasing the
line number.

10 years agotoke.c, scan_ident: No need for a while loop when using PEEKSPACE
Brian Fraser [Wed, 18 Sep 2013 08:20:43 +0000 (05:20 -0300)]
toke.c, scan_ident: No need for a while loop when using PEEKSPACE

PEEKSPACE already gobbles up all the remaining spaces until it
either finds a non-space character, or EOF.

10 years agotoke.c, scan_ident(): use PEEKSPACE() to skip over whitespace.
Brian Fraser [Sun, 1 Sep 2013 23:41:26 +0000 (20:41 -0300)]
toke.c, scan_ident(): use PEEKSPACE() to skip over whitespace.

This fixes a number of bugs regarding whitespace and line numbers
in scan_ident(), such as ${\nfoo\n} not increasing the line number,
or ${\ntime\n[1]} not working.

It goes through a number of hoops to get the correct line number for
warnings emmitted from scan_ident, and reverts CopLINE to its
original value if scan_ident() is giving up and returning from the
point of the opening bracket, like in the case of ${\n\nfoo()}.

10 years agotoke.c, S_scan_ident(): Don't take a "end of buffer" argument, use PL_bufend
Brian Fraser [Sun, 1 Sep 2013 22:32:17 +0000 (19:32 -0300)]
toke.c, S_scan_ident(): Don't take a "end of buffer" argument, use PL_bufend

All but one of scan_ident()'s callers already passed PL_bufend as
the removed argument; The one deviant was intuit_more(), which was
setting the "end of buffer" argument, to the next close-bracket.
This commit modifies intuit_more() to temporarily set PL_bufend and
then restore it.

This was done as groundwork for the following commit, which will add
more uses of PEEKSPACE() to scan_ident() in order to fix some whitespace
and line number bugs, and PEEKSPACE() modifies PL_bufend directly
if it encounters a newline at the end of the buffer -- that last bit
being why changing intuit_more() to modify-and-restore PL_bufend is
safe, since the end of the buffer will always be a ']'

10 years ago[perl #119123] disallow literal control character variables
Brian Fraser [Sun, 1 Sep 2013 13:21:52 +0000 (10:21 -0300)]
[perl #119123] disallow literal control character variables

This introduces a deprecation warning on things like $^T, where ^T
is a literal control character in the source code.

10 years agotoke.c, S_scan_ident: Skip over newlines as well as spaces and tabs.
Brian Fraser [Sun, 1 Sep 2013 13:51:31 +0000 (10:51 -0300)]
toke.c, S_scan_ident: Skip over newlines as well as spaces and tabs.

Not doing this lead to some bugs, such as 'eval "*{\nOIN}"'
returning a glob for "\nOIN" rather than just "OIN", or
'eval "\${\cT\n}"' giving spurious syntax errors.

Note however that this is not a full fix, since that latter
test case still fails outside of an eval.

10 years agoReworked t/base/lex.t to use less hardcoded test numbers.
Brian Fraser [Sun, 1 Sep 2013 12:41:20 +0000 (09:41 -0300)]
Reworked t/base/lex.t to use less hardcoded test numbers.

The later two thirds of the file now consistently use $test, which
should make future tweaks to the file simpler.

10 years agoMerge the cast fixes that enable drand48 to work on 32-bit HP-UX builds.
Nicholas Clark [Wed, 18 Sep 2013 08:00:45 +0000 (10:00 +0200)]
Merge the cast fixes that enable drand48 to work on 32-bit HP-UX builds.

10 years agoUpdate the comment in util.h related to HAS_QUAD and U64TYPE.
Nicholas Clark [Tue, 17 Sep 2013 12:40:29 +0000 (14:40 +0200)]
Update the comment in util.h related to HAS_QUAD and U64TYPE.

10 years agoUse U64_CONST() for the drand48 constants that are larger than 2**32.
Nicholas Clark [Tue, 17 Sep 2013 12:29:10 +0000 (14:29 +0200)]
Use U64_CONST() for the drand48 constants that are larger than 2**32.

Without this the constants are truncated to 32 bits on (at least) HP-UX
with 32 bit IVs, which results in some very wrong output from rand().

10 years agoFor PERL_CORE, don't undefine HAS_QUAD when building with 32 bit IVs.
Nicholas Clark [Tue, 17 Sep 2013 12:10:28 +0000 (14:10 +0200)]
For PERL_CORE, don't undefine HAS_QUAD when building with 32 bit IVs.

When commit de1c2614758a00c0 added support for $Config{d_quad} and HAS_QUAD
in Oct 1999, it also undefined HAS_QUAD. It's been that way ever since.

This isn't actually correct on a platform with a 64 bit type available, but
changing it now will cause too much breakage on CPAN for too little gain
(See RT #119753). However, we do need HAS_QUAD in the core for use by the
drand48 code, so make the undef conditional on PERL_CORE not being set.

10 years ago[perl #119539] clarify that copy() doesn't create the directory
Tony Cook [Wed, 18 Sep 2013 06:44:20 +0000 (16:44 +1000)]
[perl #119539] clarify that copy() doesn't create the directory

10 years agobump File::Copy's $VERSION
Tony Cook [Wed, 18 Sep 2013 06:33:41 +0000 (16:33 +1000)]
bump File::Copy's $VERSION

10 years agoadd Nathan Glenn to AUTHORS
Tony Cook [Wed, 18 Sep 2013 06:29:17 +0000 (16:29 +1000)]
add Nathan Glenn to AUTHORS

10 years agoAdded note about directories not being created with File::Copy::copy
Nathan Glenn [Sat, 31 Aug 2013 00:40:53 +0000 (17:40 -0700)]
Added note about directories not being created with File::Copy::copy

10 years agoperldelta for acb340504/#119501
Father Chrysostomos [Wed, 18 Sep 2013 01:20:37 +0000 (18:20 -0700)]
perldelta for acb340504/#119501

10 years agoperldelta for 650b1534
Father Chrysostomos [Wed, 18 Sep 2013 01:17:10 +0000 (18:17 -0700)]
perldelta for 650b1534

10 years agoperldelta: Two to-dos that don’t deserve mention
Father Chrysostomos [Wed, 18 Sep 2013 01:14:46 +0000 (18:14 -0700)]
perldelta: Two to-dos that don’t deserve mention

9cefd268 [perl #118747] Allow in-place s///g when !!PL_sawampersand
c04e4151 op.c:leave_scope: use mg_free before sv_force_normal [#119295]

In both cases, it is a module relying on undocumented internals.

In the former, we do have an optimisation kicking in in cases where it
didn’t in 5.18 and earlier.  But those cases are rare enough that an
entry in ‘Performance Enhancements’ would be misleading.

In the latter, the order in which clearing and ‘free’ magic are trig-
gered is more predictable, but I don’t believe that has ever been
guaranteed, and only creepy modules will be affected by it.

10 years agodepend on the new win32 sys/errno2.h header
Tony Cook [Wed, 18 Sep 2013 01:31:02 +0000 (11:31 +1000)]
depend on the new win32 sys/errno2.h header

10 years agoSort the contents of %Modules in Porting/Maintainers.pl
Steve Hay [Tue, 17 Sep 2013 22:14:05 +0000 (23:14 +0100)]
Sort the contents of %Modules in Porting/Maintainers.pl

(No changes other than the ordering of the entries.)

10 years agoperldelta for f1deee3312
Steve Hay [Tue, 17 Sep 2013 22:06:21 +0000 (23:06 +0100)]
perldelta for f1deee3312

10 years agoperldelta - Three module upgrades which haven't come from new CPAN releases
Steve Hay [Tue, 17 Sep 2013 21:59:52 +0000 (22:59 +0100)]
perldelta - Three module upgrades which haven't come from new CPAN releases

10 years agoUse non-dev version number in IO::Socket
Steve Hay [Tue, 17 Sep 2013 21:59:02 +0000 (22:59 +0100)]
Use non-dev version number in IO::Socket

There was no need for 80d2c56d79 to use a dev number. The IO distribution's
modules all have differing version numbers, mostly all well ahead of the
last CPAN release (UPSTREAM is 'blead' anyway), and no others are dev
numbers.

10 years agoUpgrade parent from version 0.227 to 0.228
Steve Hay [Tue, 17 Sep 2013 21:44:24 +0000 (22:44 +0100)]
Upgrade parent from version 0.227 to 0.228

10 years agoRT-119817 - Treat =back as the end of a warning description.
Matthew Horsfall (alh) [Tue, 17 Sep 2013 12:49:35 +0000 (08:49 -0400)]
RT-119817 - Treat =back as the end of a warning description.

This keeps any trailing data in the file from showing up as part
of the last warning's description.

10 years agoperldelta - Fill in one more item and add currently remaining possible TODOs
Steve Hay [Tue, 17 Sep 2013 17:15:00 +0000 (18:15 +0100)]
perldelta - Fill in one more item and add currently remaining possible TODOs

10 years agoperlhack: Make MAINTENANCE BRANCHES a link
Father Chrysostomos [Tue, 17 Sep 2013 15:28:36 +0000 (08:28 -0700)]
perlhack: Make MAINTENANCE BRANCHES a link

10 years ago[perl #119501] \(1+2) always referencing the same sv
Father Chrysostomos [Tue, 17 Sep 2013 15:26:12 +0000 (08:26 -0700)]
[perl #119501] \(1+2) always referencing the same sv

2484f8dbbb hid the fact that constant folding happens by making 1+2
fold to  a PADTMP, an SV that is never used as an lvalue and gets cop-
ied if one tries to use it that way.

The PADTMP mechanism is what allows \"$x" to return a new value each
time, even though ops like "$x" actually reuse the same scalar repeat-
edly to return values.

Because \ copies PADTMPs, \(1+2) ends up folding 1+2 to 3 (marked
PADTMP), which is then copied by the \ at compile time.  (Constant
folding works by evaluating certain ops at compile time and then
inlining their returned value.)  The result is that we have a folded
\3 where 3 is *not* marked PADTMP (the reference is, instead); hence
\(1+2) gives the same scalar each time, producing a value that can be
modified, affecting future evaluations.

The solution is to skip folding \ if its argument is a PADTMP.

10 years agoRewrap one perldiag entry for better splain output
Father Chrysostomos [Mon, 16 Sep 2013 17:09:11 +0000 (10:09 -0700)]
Rewrap one perldiag entry for better splain output

The right margin is slightly less uneven this way (once the pod
formatting is stripped).

10 years agoUpgrade CPAN from version 2.00 to 2.03-TRIAL
Steve Hay [Tue, 17 Sep 2013 15:26:22 +0000 (16:26 +0100)]
Upgrade CPAN from version 2.00 to 2.03-TRIAL

10 years agoMerge fixes needed to build with 32 bit IVs and HAS_QUAD defined.
Nicholas Clark [Tue, 17 Sep 2013 11:58:04 +0000 (13:58 +0200)]
Merge fixes needed to build with 32 bit IVs and HAS_QUAD defined.

However, don't actually eliminate the #undef HAS_QUAD for 32 bit IVs, as
the costs (in CPAN breakage) look to be higher than the gains.
(See RT #119753 for more detailed analysis.)

10 years agoEliminate POPq, POPuq, TOPq, TOPuq, dPOPqv, dTOPqv, qPOPuqv, dTOPuqv.
Nicholas Clark [Wed, 11 Sep 2013 12:44:48 +0000 (13:44 +0100)]
Eliminate POPq, POPuq, TOPq, TOPuq, dPOPqv, dTOPqv, qPOPuqv, dTOPuqv.

These shortcut macros are unused in the core, and unused by any code on CPAN.
If any XS code we can't see *is* using them, it will now fail to compile, and
can easily be fixed by replacing the macros with their expansion.

10 years agoThe choice of 7 or 13 byte extended UTF-8 should be based on UVSIZE.
Nicholas Clark [Wed, 11 Sep 2013 11:18:43 +0000 (12:18 +0100)]
The choice of 7 or 13 byte extended UTF-8 should be based on UVSIZE.

Previously it was based on HAS_QUAD, which is not (as) correct.