Eviscerate README.macos to match the state of the world
[p5sagit/p5-mst-13.2.git] / dist / Safe / t / safeload.t
CommitLineData
616f6b20 1#!perl
2
3BEGIN {
616f6b20 4 require Config;
5 import Config;
6 if ($Config{'extensions'} !~ /\bOpcode\b/) {
7 print "1..0\n";
8 exit 0;
9 }
10 # Can we load the version module ?
11 eval { require version; 1 } or do {
12 print "1..0 # no version.pm\n";
13 exit 0;
14 };
15 delete $INC{"version.pm"};
16}
17
18use strict;
19use Test::More;
20use Safe;
21plan(tests => 1);
22
23my $c = new Safe;
05cb221f 24$c->permit(qw(require caller entereval unpack));
616f6b20 25my $r = $c->reval(q{ use version; 1 });
26ok( defined $r, "Can load version.pm in a Safe compartment" ) or diag $@;