Skip to content

Commit

Permalink
Can't use // in Perl 5.008
Browse files Browse the repository at this point in the history
  • Loading branch information
briandfoy committed Apr 18, 2024
1 parent f7af6f8 commit d64aeb2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions t/bc/input.t
Expand Up @@ -271,11 +271,17 @@ sub run_table {
TODO: {
local $TODO = $todo;
if( ! ref $expected ) {
is $output, $expected // '', $description;
is $output, (defined $expected ? $expected : ''), $description;
}
elsif( ref $expected eq ref qr// ) {
elsif( $] < 5.010 and ref $expected eq ref qr// ) {
like $output, $expected, $description;
}
else {
SKIP: {
skip "$] does not have qr//", 1;
pass($label);
};
}
}
}
};
Expand Down

0 comments on commit d64aeb2

Please sign in to comment.