line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::OpenSky::Moose; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: MooseX::Extended::Custom for WebService::OpenSky |
4
|
|
|
|
|
|
|
|
5
|
9
|
|
|
9
|
|
4137
|
use MooseX::Extended::Custom; |
|
9
|
|
|
|
|
7344238
|
|
|
9
|
|
|
|
|
46
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.3'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# If $^P is true, we're running under the debugger. |
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
# When running under the debugger, we disable __PACKAGE__->meta->make_immutable |
11
|
|
|
|
|
|
|
# because the way the debugger works with B::Hooks::AtRuntime will cause |
12
|
|
|
|
|
|
|
# the class to be made immutable before the we apply everything we need. This |
13
|
|
|
|
|
|
|
# causes the code to die. |
14
|
|
|
|
|
|
|
sub import { |
15
|
73
|
|
|
73
|
|
220
|
my ( $class, %args ) = @_; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# we exclude strictconstructor because, otherwise, the delayed param trick |
18
|
|
|
|
|
|
|
# for OpenSky::API::Core will fail. |
19
|
73
|
|
|
|
|
178
|
my @excludes = 'StrictConstructor'; |
20
|
73
|
50
|
|
|
|
325
|
if ($^P) { |
21
|
73
|
|
|
|
|
107
|
state $warned; |
22
|
73
|
100
|
|
|
|
218
|
unless ($warned) { |
23
|
9
|
|
|
|
|
21
|
$warned++; |
24
|
9
|
|
|
|
|
1237
|
say STDERR "Running under the debugger. Excluding make_immutable\n"; |
25
|
|
|
|
|
|
|
} |
26
|
73
|
|
|
|
|
182
|
push @excludes => 'immutable'; |
27
|
|
|
|
|
|
|
} |
28
|
73
|
50
|
|
|
|
206
|
push @excludes => 'immutable' unless $^P; |
29
|
73
|
|
|
|
|
542
|
MooseX::Extended::Custom->create( |
30
|
|
|
|
|
|
|
includes => [ 'method', 'try' ], |
31
|
|
|
|
|
|
|
excludes => \@excludes, |
32
|
|
|
|
|
|
|
%args # you need this to allow customization of your customization |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=pod |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=encoding UTF-8 |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 NAME |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
WebService::OpenSky::Moose - MooseX::Extended::Custom for WebService::OpenSky |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 VERSION |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
version 0.3 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 DESCRIPTION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
No user-serviceable parts inside. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 AUTHOR |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Curtis "Ovid" Poe <curtis.poe@gmail.com> |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
This software is Copyright (c) 2023 by Curtis "Ovid" Poe. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This is free software, licensed under: |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |