line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Config::Yak::RequiredConfig; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$Config::Yak::RequiredConfig::VERSION = '0.23'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
BEGIN { |
6
|
1
|
|
|
1
|
|
1532
|
$Config::Yak::RequiredConfig::AUTHORITY = 'cpan:TEX'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
# ABSTRACT: a role to provide an required config attribute |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
27
|
use 5.010_000; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
37
|
|
11
|
1
|
|
|
1
|
|
5
|
use mro 'c3'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
13
|
|
12
|
1
|
|
|
1
|
|
25
|
use feature ':5.10'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
97
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
752
|
use Moose::Role; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use namespace::autoclean; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# use IO::Handle; |
18
|
|
|
|
|
|
|
# use autodie; |
19
|
|
|
|
|
|
|
# use MooseX::Params::Validate; |
20
|
|
|
|
|
|
|
# use Carp; |
21
|
|
|
|
|
|
|
# use English qw( -no_match_vars ); |
22
|
|
|
|
|
|
|
# use Try::Tiny; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# extends ... |
25
|
|
|
|
|
|
|
# has ... |
26
|
|
|
|
|
|
|
has 'config' => ( |
27
|
|
|
|
|
|
|
'is' => 'rw', |
28
|
|
|
|
|
|
|
'isa' => 'Config::Yak', |
29
|
|
|
|
|
|
|
'required' => 1, |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# with ... |
33
|
|
|
|
|
|
|
# initializers ... |
34
|
|
|
|
|
|
|
# requires ... |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# your code here ... |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
no Moose::Role; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=pod |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=encoding utf-8 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 NAME |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Config::Yak::RequiredConfig - a role to provide an required config attribute |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 SYNOPSIS |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
use Moose; |
55
|
|
|
|
|
|
|
with 'Config::Yak::RequiredConfig'; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 DESCRIPTION |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
This role will require a Config::Yak object. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 NAME |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Config::Yak::RequiredConfig - A role which requires a Config::Yak object |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 AUTHOR |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Dominik Schulz <dominik.schulz@gauner.org> |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
This software is copyright (c) 2012 by Dominik Schulz. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
74
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=cut |