version_feature.t 471 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
use warnings;
use strict;

BEGIN {
	if("$]" < 5.009005) {
		require Test::More;
		Test::More::plan(skip_all =>
			"no version-implied features on this perl");
	}
}

use Test::More tests => 4;

BEGIN { use_ok "Lexical::SealRequireHints"; }

eval q{
	use 5.009005;
	sub t0 { say "foo"; }
};
is $@, "";

eval q{
	no warnings "portable";
	use 5.9.5;
	sub t1 { say "foo"; }
};
is $@, "";

eval q{
	no warnings "portable";
	use v5.9.5;
	sub t2 { say "foo"; }
};
is $@, "";

1;