develooper Front page | perl.perl5.porters | Postings from January 2012

Re: [perl.git] branch blead, updated. v5.15.6-390-ga46b39a

Thread Next
From:
Craig A. Berry
Date:
January 6, 2012 08:12
Subject:
Re: [perl.git] branch blead, updated. v5.15.6-390-ga46b39a
Message ID:
craigberry-6D6BBE.10122306012012@cpc2-bmly6-0-0-cust974.2-3.cable.virginmedia.com
In article <E1RiquS-0000ij-8i@camel.ams6.corp.booking.com>,
 sprout@cpan.org ("Father Chrysostomos") wrote:

> In perl.git, the branch blead has been updated
> 
> <http://perl5.git.perl.org/perl.git/commitdiff/a46b39a853149ac3ddcaad16f3c7be0
> b86d520d0?hp=bade7fbcf63fdefa0b4fd8a0321087860e413483>
> 
> - Log -----------------------------------------------------------------
> commit a46b39a853149ac3ddcaad16f3c7be0b86d520d0
> Author: Father Chrysostomos <sprout@cpan.org>
> Date:   Thu Jan 5 08:48:35 2012 -0800
> 
>     [perl #90030] sort with no arguments
>     
>     This eliminates the error ‘sort is now a reserved word’, which was
>     added for the sake of code that does close(sort) at about the time
>     that sort became a keyword.
<snip>
> --- a/t/op/sort.t
> +++ b/t/op/sort.t
> @@ -6,7 +6,7 @@ BEGIN {
>      require 'test.pl';
>  }
>  use warnings;
> -plan( tests => 165 );
> +plan( tests => 171 );
>  
>  # these shouldn't hang
>  {
> @@ -949,3 +949,14 @@ is join("", sort hopefullynonexistent split//, 
> '04381091'), '98431100',
>  my $stubref = \&givemeastub;
>  is join("", sort $stubref split//, '04381091'), '98431100',
>      'AUTOLOAD with stubref';
> +
> +# [perl #90030] sort without arguments
> +#eval '@x = (sort); 1';
> +is $@, '', '(sort) does not die';
> +is @x, 0, '(sort) returns empty list';
> +#eval '@x = sort; 1';
> +is $@, '', 'sort; does not die';

Is there a reason these two evals are commented out?  For me the new 
tests fail like:

ok 165 - AUTOLOAD with stubref
not ok 166 - (sort) does not die
# Failed at [.op]sort.t line 955
#      got "Modification of a read-only value attempted at [.op]sort.t 
line 791.\n"
# expected ""
ok 167 - (sort) returns empty list
not ok 168 - sort; does not die
# Failed at [.op]sort.t line 958
#      got "Modification of a read-only value attempted at [.op]sort.t 
line 791.\n"
# expected ""
ok 169 - sort; returns empty list
ok 170 - {sort} does not die
ok 171 - {sort} returns empty list

because $@ has something left over from a much earlier test.  
Uncommenting the evals makes the tests pass but in case they were 
commented out for a reason, I thought I'd ask before changing them.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About