File: version_feature.t

package info (click to toggle)
liblexical-sealrequirehints-perl 0.012-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 360 kB
  • sloc: perl: 340; makefile: 3
file content (36 lines) | stat: -rw-r--r-- 471 bytes parent folder | download | duplicates (5)
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;