Commit | Line | Data |
1e73acc8 |
1 | #!perl |
1e73acc8 |
2 | use strict; use warnings; |
3 | |
4 | use Test::More tests => 8; |
5 | |
6 | # see that Hash::Util::FieldHash and Hash::Util load and export what |
7 | # they should |
8 | |
1e73acc8 |
9 | BEGIN { |
10 | use_ok( 'Hash::Util'); |
11 | ok( defined( &Hash::Util::lock_keys), "Hash::Util::lock_keys found"); |
12 | ok( !defined( &Hash::Util::FieldHash::fieldhashes), |
13 | "Hash::Util::FieldHash not loaded", |
14 | ); |
15 | } |
16 | |
17 | package one; |
18 | use Test::More; |
19 | use Hash::Util qw( lock_keys); |
20 | BEGIN { |
21 | ok( defined( &lock_keys), "lock_keys imported from Hash::Util"); |
22 | } |
23 | |
24 | use Hash::Util qw( fieldhashes); |
25 | BEGIN { |
26 | ok( defined( &Hash::Util::FieldHash::fieldhashes), |
27 | "Hash::Util::FieldHash loaded", |
28 | ); |
29 | ok( defined( &fieldhashes), |
30 | "fieldhashes imported from Hash::Util", |
31 | ); |
32 | } |
33 | |
34 | package two; |
35 | use Test::More; |
36 | use Hash::Util::FieldHash qw( fieldhashes); |
37 | BEGIN { |
38 | ok( defined( &fieldhashes), |
39 | "fieldhashes imported from Hash::Util::FieldHash", |
40 | ); |
41 | } |
42 | |
43 | use Hash::Util::FieldHash qw( :all); |
44 | BEGIN { |
45 | ok( defined( &fieldhash), |
46 | "fieldhash imported from Hash::Util::FieldHash via :all", |
47 | ); |
48 | } |
49 | |