Skip Menu |

This queue is for tickets about the experimental CPAN distribution.

Report information
The Basics
Id: 99441
Status: resolved
Priority: 0/
Queue: experimental

People
Owner: Nobody in particular
Requestors: 'spro^^*%*^6ut# [...] &$%*c
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] Lvalue references
See attachment.
Subject: open_UbF5tmGO.txt
diff --git a/lib/experimental.pm b/lib/experimental.pm index b91ac7d..2b2cf55 100644 --- a/lib/experimental.pm +++ b/lib/experimental.pm @@ -25,6 +25,7 @@ my %min_version = ( fc => '5.16.0', lexical_topic => '5.10.0', lexical_subs => '5.18.0', + lvalue_refs => '5.21.5', postderef => '5.20.0', postderef_qq => '5.20.0', regex_sets => '5.18.0', @@ -58,7 +59,13 @@ sub _enable { croak "Can't enable unknown feature $pragma"; } elsif ($min_version{$pragma} > $]) { - croak "Need perl $min_version{$pragma} or later for feature $pragma"; + my $stable = $min_version{$pragma}; + if ($stable->{version}[1] % 2) { + $stable = version->new( + "5.".($stable->{version}[1]+1).'.0' + ); + } + croak "Need perl $stable or later for feature $pragma"; } } @@ -146,6 +153,7 @@ The supported features, documented further below, are: array_base - allow the use of $[ to change the starting index of @array autoderef - allow push, each, keys, and other built-ins on references lexical_topic - allow the use of lexical $_ via "my $_" + lvalue_refs - allow aliasing via \$x = \$y postderef - allow the use of postfix dereferencing expressions, including in interpolating strings regex_sets - allow extended bracketed character classes in regexps diff --git a/t/basic.t b/t/basic.t index 239225b..5dc2eaf 100644 --- a/t/basic.t +++ b/t/basic.t @@ -50,5 +50,14 @@ if ($] >= 5.018) { END } +if ($] >= 5.021005) { + is (eval <<'END', 1, 'lvalue ref compiles') or diag $@; + use experimental 'lvalue_refs'; + \@a = \@b; + is(\@a, \@b, '@a and @b are the same after \@a=\@b'); + 1; +END +} + done_testing;
Subject: Re: [rt.cpan.org #99441] [PATCH] Lvalue references
Date: Sun, 12 Oct 2014 12:58:02 +0200
To: bug-experimental [...] rt.cpan.org
From: Leon Timmermans <fawaka [...] gmail.com>
On Sun, Oct 12, 2014 at 1:30 AM, Father Chrysostomos via RT < bug-experimental@rt.cpan.org> wrote: Show quoted text
> See attachment. > > diff --git a/lib/experimental.pm b/lib/experimental.pm > index b91ac7d..2b2cf55 100644 > --- a/lib/experimental.pm > +++ b/lib/experimental.pm > @@ -25,6 +25,7 @@ my %min_version = ( > fc => '5.16.0', > lexical_topic => '5.10.0', > lexical_subs => '5.18.0', > + lvalue_refs => '5.21.5', > postderef => '5.20.0', > postderef_qq => '5.20.0', > regex_sets => '5.18.0', > @@ -58,7 +59,13 @@ sub _enable { > croak "Can't enable unknown feature $pragma"; > } > elsif ($min_version{$pragma} > $]) { > - croak "Need perl $min_version{$pragma} or later for > feature $pragma"; > + my $stable = $min_version{$pragma}; > + if ($stable->{version}[1] % 2) { > + $stable = version->new( > + "5.".($stable->{version}[1]+1).'.0' > + ); > + } > + croak "Need perl $stable or later for feature $pragma"; > } > } > > @@ -146,6 +153,7 @@ The supported features, documented further below, are: > array_base - allow the use of $[ to change the starting index > of @array > autoderef - allow push, each, keys, and other built-ins on > references > lexical_topic - allow the use of lexical $_ via "my $_" > + lvalue_refs - allow aliasing via \$x = \$y > postderef - allow the use of postfix dereferencing > expressions, including > in interpolating strings > regex_sets - allow extended bracketed character classes in > regexps > diff --git a/t/basic.t b/t/basic.t > index 239225b..5dc2eaf 100644 > --- a/t/basic.t > +++ b/t/basic.t > @@ -50,5 +50,14 @@ if ($] >= 5.018) { > END > } > > +if ($] >= 5.021005) { > + is (eval <<'END', 1, 'lvalue ref compiles') or diag $@; > + use experimental 'lvalue_refs'; > + \@a = \@b; > + is(\@a, \@b, '@a and @b are the same after \@a=\@b'); > + 1; > +END > +} > + > done_testing; >
Applied :-)
On Sun Oct 12 06:58:38 2014, fawaka@gmail.com wrote: Show quoted text
> Applied :-)
Sorry for the bother, but objections were raised on p5p against the name of the new feature. So now it’s called refaliasing.
On Fri Oct 17 23:31:10 2014, SPROUT wrote: Show quoted text
> On Sun Oct 12 06:58:38 2014, fawaka@gmail.com wrote:
> > Applied :-)
> > Sorry for the bother, but objections were raised on p5p against the > name of the new feature. So now it’s called refaliasing.
And here is the patch.
Subject: open_ZtBPEHTa.txt
diff -rup experimental-0.012-UtR2X3-orig/lib/experimental.pm experimental-0.012-UtR2X3/lib/experimental.pm --- experimental-0.012-UtR2X3-orig/lib/experimental.pm 2014-10-12 03:10:21.000000000 -0700 +++ experimental-0.012-UtR2X3/lib/experimental.pm 2014-10-17 21:46:05.000000000 -0700 @@ -25,9 +25,9 @@ my %min_version = ( fc => '5.16.0', lexical_topic => '5.10.0', lexical_subs => '5.18.0', - lvalue_refs => '5.21.5', postderef => '5.20.0', postderef_qq => '5.20.0', + refaliasing => '5.21.5', regex_sets => '5.18.0', say => '5.10.0', smartmatch => '5.10.0', @@ -153,9 +153,9 @@ The supported features, documented furth array_base - allow the use of $[ to change the starting index of @array autoderef - allow push, each, keys, and other built-ins on references lexical_topic - allow the use of lexical $_ via "my $_" - lvalue_refs - allow aliasing via \$x = \$y postderef - allow the use of postfix dereferencing expressions, including in interpolating strings + refaliasing - allow aliasing via \$x = \$y regex_sets - allow extended bracketed character classes in regexps signatures - allow subroutine signatures (for named arguments) smartmatch - allow the use of ~~ diff -rup experimental-0.012-UtR2X3-orig/t/basic.t experimental-0.012-UtR2X3/t/basic.t --- experimental-0.012-UtR2X3-orig/t/basic.t 2014-10-12 03:10:21.000000000 -0700 +++ experimental-0.012-UtR2X3/t/basic.t 2014-10-17 21:45:24.000000000 -0700 @@ -51,8 +51,8 @@ END } if ($] >= 5.021005) { - is (eval <<'END', 1, 'lvalue ref compiles') or diag $@; - use experimental 'lvalue_refs'; + is (eval <<'END', 1, 'ref aliasing compiles') or diag $@; + use experimental 'refaliasing'; \@a = \@b; is(\@a, \@b, '@a and @b are the same after \@a=\@b'); 1;
On Sat Oct 18 00:47:25 2014, SPROUT wrote: Show quoted text
> On Fri Oct 17 23:31:10 2014, SPROUT wrote:
> > On Sun Oct 12 06:58:38 2014, fawaka@gmail.com wrote:
> > > Applied :-)
> > > > Sorry for the bother, but objections were raised on p5p against the > > name of the new feature. So now it’s called refaliasing.
> > And here is the patch.
Applied and shipped Leon