1 Check implicit loading of features with use VERSION.
4 # Standard feature bundle
10 # VERSION requirement, dotted notation
16 # VERSION requirement, v-dotted notation
22 # VERSION requirement, decimal notation
28 # VERSION requirement, doesn't load anything with require
30 print "<".$INC{"feature.pm"}.">\n";
34 # VERSION requirement in eval {}
42 # VERSION requirement in eval ""
50 # VERSION requirement in BEGIN
58 # no implicit features with 'no'
59 eval "no " . ($]+1); print $@;
62 # lower version after higher version
63 sub evalbytes { print "evalbytes sub\n" }
64 sub say { print "say sub\n" }
66 evalbytes "say 'yes'";
77 # SKIP ? not defined DynaLoader::boot_DynaLoader
79 no warnings 'deprecated';
81 print qw[a b c][2], "\n";
83 print qw[a b c][2], "\n";
89 # SKIP ? not defined DynaLoader::boot_DynaLoader
90 use feature 'say'; # make sure it is loaded and modifies %^H; we are test-
91 use v5.8.8; # ing to make sure it does not disable $[
92 no warnings 'deprecated';
94 print qw[a b c][2], "\n";
98 # $[ under < 5.10 after use v5.15
99 # SKIP ? not defined DynaLoader::boot_DynaLoader
102 no warnings 'deprecated';
104 print qw[a b c][2], "\n";
108 # Implicit unicode_string feature
110 print 'ss' =~ /\xdf/i ? "ok\n" : "nok\n";
112 print 'ss' =~ /\xdf/i ? "ok\n" : "nok\n";