File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ requires 'Storable' => '2.17';
4040test_requires ' Class::Inspector' => ' 1.22' ;
4141test_requires ' File::Remove' => ' 1.42' ;
4242test_requires ' Test::More' => ' 0.86' ;
43+ test_requires ' Test::Warn' => ' 0.30' ;
4344test_requires ' Test::Object' => ' 0.07' ;
4445test_requires ' Test::SubCalls' => ' 1.07' ;
4546test_requires ' Test::Deep' ;
Original file line number Diff line number Diff line change 44
55use lib ' t/lib' ;
66use PPI::Test::pragmas;
7- use Test::More tests => 570 + ($ENV {AUTHOR_TESTING } ? 1 : 0);
7+ use Test::More tests => ( $] >= 5.006 and $] < 5.008 ? 570 : 568) + ($ENV {AUTHOR_TESTING } ? 1 : 0);
88
99use File::Spec::Functions ' :ALL' ;
1010use PPI;
@@ -100,7 +100,13 @@ SCOPE: {
100100
101101 if ($base != 256) {
102102 $^W = 0;
103- my $literal = eval $code ;
103+ my $literal ;
104+ if ( $] >= 5.006 and $] < 5.008 and $code =~ / ^1_0[.]?$ / ) {
105+ warning_is { $literal = eval $code } " Misplaced _ in number" ,
106+ " $] warns about misplaced underscore" ;
107+ } else {
108+ $literal = eval $code ;
109+ }
104110 if ($@ ) {
105111 is($token -> literal, undef , " literal('$code '), $@ " );
106112 } else {
You can’t perform that action at this time.
0 commit comments