@@ -19,13 +19,18 @@ use MooseX::Types -declare => [ qw(
19
19
20
20
subtype Module, as ArrayRef [ Type [' MetaCPAN::Document::Module' ] ];
21
21
coerce Module, from ArrayRef, via {
22
+ require MetaCPAN::Document::Module;
22
23
[ map { ref $_ eq ' HASH' ? MetaCPAN::Document::Module-> new($_ ) : $_ }
23
24
@$_ ];
24
25
};
25
- coerce Module, from HashRef, via { [ MetaCPAN::Document::Module-> new($_ ) ] };
26
+ coerce Module, from HashRef, via {
27
+ require MetaCPAN::Document::Module;
28
+ [ MetaCPAN::Document::Module-> new($_ ) ];
29
+ };
26
30
27
31
subtype Identity, as ArrayRef [ Type [' MetaCPAN::Model::User::Identity' ] ];
28
32
coerce Identity, from ArrayRef, via {
33
+ require MetaCPAN::Model::User::Identity;
29
34
[
30
35
map {
31
36
ref $_ eq ' HASH'
@@ -34,11 +39,14 @@ coerce Identity, from ArrayRef, via {
34
39
} @$_
35
40
];
36
41
};
37
- coerce Identity, from HashRef,
38
- via { [ MetaCPAN::Model::User::Identity-> new($_ ) ] };
42
+ coerce Identity, from HashRef, via {
43
+ require MetaCPAN::Model::User::Identity;
44
+ [ MetaCPAN::Model::User::Identity-> new($_ ) ];
45
+ };
39
46
40
47
subtype Dependency, as ArrayRef [ Type [' MetaCPAN::Document::Dependency' ] ];
41
48
coerce Dependency, from ArrayRef, via {
49
+ require MetaCPAN::Document::Dependency;
42
50
[
43
51
map {
44
52
ref $_ eq ' HASH'
@@ -47,11 +55,14 @@ coerce Dependency, from ArrayRef, via {
47
55
} @$_
48
56
];
49
57
};
50
- coerce Dependency, from HashRef,
51
- via { [ MetaCPAN::Document::Dependency-> new($_ ) ] };
58
+ coerce Dependency, from HashRef, via {
59
+ require MetaCPAN::Document::Dependency;
60
+ [ MetaCPAN::Document::Dependency-> new($_ ) ];
61
+ };
52
62
53
63
subtype Profile, as ArrayRef [ Type [' MetaCPAN::Document::Author::Profile' ] ];
54
64
coerce Profile, from ArrayRef, via {
65
+ require MetaCPAN::Document::Author::Profile;
55
66
[
56
67
map {
57
68
ref $_ eq ' HASH'
@@ -60,8 +71,10 @@ coerce Profile, from ArrayRef, via {
60
71
} @$_
61
72
];
62
73
};
63
- coerce Profile, from HashRef,
64
- via { [ MetaCPAN::Document::Author::Profile-> new($_ ) ] };
74
+ coerce Profile, from HashRef, via {
75
+ require MetaCPAN::Document::Author::Profile;
76
+ [ MetaCPAN::Document::Author::Profile-> new($_ ) ];
77
+ };
65
78
66
79
MooseX::Getopt::OptionTypeMap-> add_option_type_to_map(
67
80
' MooseX::Types::ElasticSearch::ES' => ' =s' );
0 commit comments