Move tests under 'threads' module
[p5sagit/p5-mst-13.2.git] / t / lib / feature / implicit
1 Check implicit loading of features with use VERSION.
2
3 __END__
4 # Standard feature bundle
5 use feature ":5.10";
6 say "Hello", "world";
7 EXPECT
8 Helloworld
9 ########
10 # VERSION requirement, dotted notation
11 use 5.9.5;
12 say "Hello", "world";
13 EXPECT
14 Helloworld
15 ########
16 # VERSION requirement, v-dotted notation
17 use v5.9.5;
18 say "Hello", "world";
19 EXPECT
20 Helloworld
21 ########
22 # VERSION requirement, decimal notation
23 use 5.009005;
24 say defined $INC{"feature.pm"} ? "Helloworld" : "Good bye";
25 EXPECT
26 Helloworld
27 ########
28 # VERSION requirement, doesn't load anything for < 5.9.5
29 use 5.8.8;
30 print "<".$INC{"feature.pm"}.">\n";
31 EXPECT
32 <>
33 ########
34 # VERSION requirement, doesn't load anything with require
35 require 5.9.5;
36 print "<".$INC{"feature.pm"}.">\n";
37 EXPECT
38 <>
39 ########
40 # VERSION requirement in eval {}
41 eval {
42     use 5.9.5;
43     say "Hello", "world";
44 }
45 EXPECT
46 Helloworld
47 ########
48 # VERSION requirement in eval ""
49 eval q{
50     use 5.9.5;
51     say "Hello", "world";
52 }
53 EXPECT
54 Helloworld
55 ########
56 # VERSION requirement in BEGIN
57 BEGIN {
58     use 5.9.5;
59     say "Hello", "world";
60 }
61 EXPECT
62 Helloworld