2 use Test::More tests => 14;
11 if ("$]" >= 5.019_004) {
12 # This should be the case since 5.17.4 but there's a bug in perl that
13 # was fixed in 5.19.4 which caused the FETCH callback to get the old
15 $rx_idx{q[${^PREMATCH}]} = -5;
16 $rx_idx{q[${^POSTMATCH}]} = -4;
17 $rx_idx{q[${^MATCH}]} = -3;
19 $rx_idx{q[${^PREMATCH}]} = $rx_idx{q[$`]};
20 $rx_idx{q[${^POSTMATCH}]} = $rx_idx{q[$']};
21 $rx_idx{q[${^MATCH}]} = $rx_idx{q[$&]};
25 use re::engine::Plugin (
29 if ("$]" >= 5.017_004) {
39 [ q[${^PREMATCH}], "a" ],
41 [ q[${^POSTMATCH}], "o" ],
43 [ q[${^MATCH}], "e" ],
49 my ($re, $paren, $sv) = @_;
50 my $test = shift @{ $re->stash };
56 $desc = "STORE \$$idx";
62 is($paren, $idx, "$desc (index)");
63 is($sv, $test->[1], "$desc (value)");