File: autoloader.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 (44 lines) | stat: -rw-r--r-- 923 bytes parent folder | download
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
37
38
39
40
41
42
43
44
use warnings;
use strict;

use Test::More tests => 14;

our @warnings;
BEGIN {
	$^W = 1;
	$SIG{__WARN__} = sub { push @warnings, $_[0] };
}

use AutoLoader ();

BEGIN { use_ok "Lexical::SealRequireHints"; }
BEGIN { unshift @INC, "./t/lib"; }

BEGIN {
	$^H |= 0x20000 if "$]" < 5.009004;
	$^H{"Lexical::SealRequireHints/test"} = 1;
}
$^H |= 0x20000 if "$]" < 5.009004;
$^H{"Lexical::SealRequireHints/test"} = 2;

BEGIN { is $^H{"Lexical::SealRequireHints/test"}, 1; }
is $^H{"Lexical::SealRequireHints/test"}, 2;

use t::auto_0 ();

BEGIN { is $^H{"Lexical::SealRequireHints/test"}, 1; }
is $^H{"Lexical::SealRequireHints/test"}, 2;

is t::auto_0::auto_1(), 42;

BEGIN { is $^H{"Lexical::SealRequireHints/test"}, 1; }
is $^H{"Lexical::SealRequireHints/test"}, 2;

is t::auto_0::auto_1(), 42;

BEGIN { is $^H{"Lexical::SealRequireHints/test"}, 1; }
is $^H{"Lexical::SealRequireHints/test"}, 2;

is_deeply \@warnings, [];

1;