This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Test that (??{$pvlvregexp}) does not recompile the regexp
authorFather Chrysostomos <sprout@cpan.org>
Mon, 25 Nov 2013 07:30:09 +0000 (23:30 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 25 Nov 2013 07:30:09 +0000 (23:30 -0800)
2685dc2d9a accidentally fixed this.  Oops! :-)

t/re/recompile.t

index f026fae..2ae310d 100644 (file)
@@ -22,7 +22,7 @@ BEGIN {
 }
 
 
-plan tests => 46;
+plan tests => 48;
 
 my $results = runperl(
                        switches => [ '-Dr' ],
@@ -210,3 +210,10 @@ CODE
 comp_n(2, <<'CODE', '(??{number})');
 "bb" =~ /(??{123})/;
 CODE
+
+comp_n(2, <<'CODE', '(??{$pvlv_regexp})');
+sub {
+   $_[0] = ${qr/abc/};
+  "bb" =~ /(??{$_[0]})/;
+}->($_[0]);
+CODE