Commit | Line | Data |
24f50a79 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | eval "use B::C;"; |
5 | if ($@) { |
0290d419 |
6 | print "1..0 # SKIP B::C required for testing perlcc -O3\n"; |
24f50a79 |
7 | exit; |
cc891d20 |
8 | } elsif ($B::C::VERSION lt '1.48') { |
9 | print "1..0 # SKIP testing too old B-C-$B::C::VERSION\n"; |
10 | exit; |
24f50a79 |
11 | } else { |
12 | print "1..1\n"; |
13 | } |
14 | |
15 | my $f = "t/rt96893x.pl"; |
3aaa8d18 |
16 | open my $fh, ">", $f; END { unlink $f if $f } |
24f50a79 |
17 | print $fh 'use Sub::Name; subname("main::bar", sub{42}); print "ok 1\n";'; |
18 | close $fh; |
19 | |
20 | system($^X, qw(-Mblib -S perlcc -O3 -UCarp -UConfig -r), $f); |
21 | |
22 | unlink "t/rt96893x", "t/rt96893x.exe"; |
23 | # vim: ft=perl |