line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bread::Board::Service::WithConstructor; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:STEVAN'; |
3
|
|
|
|
|
|
|
$Bread::Board::Service::WithConstructor::VERSION = '0.37'; |
4
|
62
|
|
|
62
|
|
36958
|
use Moose::Role; |
|
62
|
|
|
|
|
162
|
|
|
62
|
|
|
|
|
568
|
|
5
|
|
|
|
|
|
|
|
6
|
62
|
|
|
62
|
|
314881
|
use Try::Tiny; |
|
62
|
|
|
|
|
164
|
|
|
62
|
|
|
|
|
11489
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'Bread::Board::Service::WithClass'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has 'constructor_name' => ( |
11
|
|
|
|
|
|
|
is => 'rw', |
12
|
|
|
|
|
|
|
isa => 'Str', |
13
|
|
|
|
|
|
|
lazy => 1, |
14
|
|
|
|
|
|
|
builder => '_build_constructor_name', |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _build_constructor_name { |
18
|
121
|
|
|
121
|
|
263
|
my $self = shift; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# using Class::MOP::class_of on a Moo |
21
|
|
|
|
|
|
|
# object causes mayhem, so we take care of that |
22
|
|
|
|
|
|
|
# special case first. See GH#61 |
23
|
121
|
100
|
|
121
|
|
6911
|
try { $self->class->isa('Moo::Object') && 'new' } |
24
|
118
|
|
|
118
|
|
7855
|
|| try { Class::MOP::class_of($self->class)->constructor_name } |
25
|
121
|
50
|
66
|
|
|
878
|
|| 'new'; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
62
|
|
|
62
|
|
510
|
no Moose; 1; |
|
62
|
|
|
|
|
160
|
|
|
62
|
|
|
|
|
374
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=pod |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=encoding UTF-8 |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 NAME |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Bread::Board::Service::WithConstructor |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 VERSION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
version 0.37 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 DESCRIPTION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 METHODS |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=over 4 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=item B<constructor_name> |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=back |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 BUGS |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
All complex software has bugs lurking in it, and this module is no |
57
|
|
|
|
|
|
|
exception. If you find a bug please either email me, or add the bug |
58
|
|
|
|
|
|
|
to cpan-RT. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 AUTHOR |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Stevan Little <stevan@iinteractive.com> |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 BUGS |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Please report any bugs or feature requests on the bugtracker website |
67
|
|
|
|
|
|
|
https://github.com/stevan/BreadBoard/issues |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
When submitting a bug or request, please include a test-file or a |
70
|
|
|
|
|
|
|
patch to an existing test-file that illustrates the bug or desired |
71
|
|
|
|
|
|
|
feature. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
This software is copyright (c) 2019, 2017, 2016, 2015, 2014, 2013, 2011, 2009 by Infinity Interactive. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
78
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=cut |