| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package MouseX::AttributeHelpers; |
|
2
|
|
|
|
|
|
|
|
|
3
|
28
|
|
|
28
|
|
1463683
|
use 5.006_002; |
|
|
28
|
|
|
|
|
115
|
|
|
|
28
|
|
|
|
|
1598
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.07'; |
|
5
|
|
|
|
|
|
|
|
|
6
|
28
|
|
|
28
|
|
175
|
use Mouse::Util qw(load_class); |
|
|
28
|
|
|
|
|
52
|
|
|
|
28
|
|
|
|
|
177
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# These submodules are automatically loaded by register_implementation() |
|
9
|
|
|
|
|
|
|
#use MouseX::AttributeHelpers::Counter; |
|
10
|
|
|
|
|
|
|
#use MouseX::AttributeHelpers::Number; |
|
11
|
|
|
|
|
|
|
#use MouseX::AttributeHelpers::String; |
|
12
|
|
|
|
|
|
|
#use MouseX::AttributeHelpers::Bool; |
|
13
|
|
|
|
|
|
|
#use MouseX::AttributeHelpers::Collection::List; |
|
14
|
|
|
|
|
|
|
#use MouseX::AttributeHelpers::Collection::Array; |
|
15
|
|
|
|
|
|
|
#use MouseX::AttributeHelpers::Collection::ImmutableHash; |
|
16
|
|
|
|
|
|
|
#use MouseX::AttributeHelpers::Collection::Hash; |
|
17
|
|
|
|
|
|
|
#use MouseX::AttributeHelpers::Collection::Bag; |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# aliases |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
foreach my $helper(qw( |
|
22
|
|
|
|
|
|
|
Bool Counter Number String |
|
23
|
|
|
|
|
|
|
Collection::List Collection::Array Collection::Bag |
|
24
|
|
|
|
|
|
|
Collection::Hash Collection::ImmutableHash |
|
25
|
|
|
|
|
|
|
)){ |
|
26
|
|
|
|
|
|
|
my $from = 'MouseX::AttributeHelpers::' . $helper; |
|
27
|
|
|
|
|
|
|
my $to = 'Mouse::Meta::Attribute::Custom::' . $helper; |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
my $alias = sub { |
|
30
|
37
|
|
|
37
|
|
185868
|
load_class($from); |
|
31
|
37
|
|
|
|
|
2288
|
return $from; |
|
32
|
|
|
|
|
|
|
}; |
|
33
|
28
|
|
|
28
|
|
3969
|
no strict 'refs'; |
|
|
28
|
|
|
|
|
58
|
|
|
|
28
|
|
|
|
|
1795
|
|
|
34
|
|
|
|
|
|
|
*{$to . '::register_implementation'} = $alias; |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
|
39
|
|
|
|
|
|
|
__END__ |