File: package.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 (40 lines) | stat: -rw-r--r-- 585 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
use warnings;
use strict;

use Test::More tests => 3;

BEGIN { unshift @INC, "./t/lib"; }

our $native_package;

BEGIN {
	our $package;
	{
		package Foo;
		require t::package_0;
	}
	$native_package = $package;
	$package = undef;
	delete $INC{"t/package_0.pm"};
}

BEGIN { use_ok "Lexical::SealRequireHints"; }

our $package;
{
	package Foo;
	require t::package_0;
}
is $package, $native_package;
$package = undef;
delete $INC{"t/package_0.pm"};

{
	package Foo;
	do "t/package_0.pm" or die $@ || $!;
}
is $package, $native_package;
$package = undef;
delete $INC{"t/package_0.pm"};

1;