line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Code::TidyAll::Role::HasIgnore; |
2
|
|
|
|
|
|
|
|
3
|
27
|
|
|
27
|
|
138769
|
use strict; |
|
27
|
|
|
|
|
105
|
|
|
27
|
|
|
|
|
869
|
|
4
|
27
|
|
|
27
|
|
158
|
use warnings; |
|
27
|
|
|
|
|
69
|
|
|
27
|
|
|
|
|
802
|
|
5
|
|
|
|
|
|
|
|
6
|
27
|
|
|
27
|
|
181
|
use Code::TidyAll::Util::Zglob qw(zglobs_to_regex); |
|
27
|
|
|
|
|
60
|
|
|
27
|
|
|
|
|
1311
|
|
7
|
27
|
|
|
27
|
|
163
|
use Specio::Library::Builtins; |
|
27
|
|
|
|
|
56
|
|
|
27
|
|
|
|
|
628
|
|
8
|
27
|
|
|
27
|
|
261966
|
use Specio::Library::String; |
|
27
|
|
|
|
|
90
|
|
|
27
|
|
|
|
|
186
|
|
9
|
|
|
|
|
|
|
|
10
|
27
|
|
|
27
|
|
59170
|
use Moo::Role; |
|
27
|
|
|
|
|
69
|
|
|
27
|
|
|
|
|
190
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '0.83'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has ignore => ( |
15
|
|
|
|
|
|
|
is => 'ro', |
16
|
|
|
|
|
|
|
isa => t( 'ArrayRef', of => t('NonEmptyStr') ), |
17
|
|
|
|
|
|
|
default => sub { [] }, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has ignore_regex => ( |
21
|
|
|
|
|
|
|
is => 'lazy', |
22
|
|
|
|
|
|
|
isa => t('RegexpRef'), |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has ignores => ( |
26
|
|
|
|
|
|
|
is => 'lazy', |
27
|
|
|
|
|
|
|
isa => t( 'ArrayRef', of => t('NonEmptyStr') ), |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
has select => ( |
31
|
|
|
|
|
|
|
is => 'ro', |
32
|
|
|
|
|
|
|
isa => t( 'ArrayRef', of => t('NonEmptyStr') ), |
33
|
|
|
|
|
|
|
default => sub { [] }, |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub _build_ignores { |
37
|
135
|
|
|
135
|
|
1435
|
my ($self) = @_; |
38
|
135
|
|
|
|
|
535
|
return $self->_parse_zglob_list( $self->ignore ); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub _parse_zglob_list { |
42
|
210
|
|
|
210
|
|
1092
|
my ( $self, $zglobs ) = @_; |
43
|
210
|
50
|
|
|
|
361
|
if ( my ($bad_zglob) = ( grep {m{^/}} @{$zglobs} ) ) { |
|
104
|
|
|
|
|
553
|
|
|
210
|
|
|
|
|
572
|
|
44
|
0
|
|
|
|
|
0
|
die qq{zglob '$bad_zglob' should not begin with slash}; |
45
|
|
|
|
|
|
|
} |
46
|
210
|
|
|
|
|
3407
|
return $zglobs; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub _build_ignore_regex { |
50
|
87
|
|
|
87
|
|
6446
|
my ($self) = @_; |
51
|
87
|
|
|
|
|
137
|
return zglobs_to_regex( @{ $self->ignores } ); |
|
87
|
|
|
|
|
1450
|
|
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# ABSTRACT: A role for any class that has a list of ignored paths specified in zglob syntax |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=pod |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=encoding UTF-8 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 NAME |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Code::TidyAll::Role::HasIgnore - A role for any class that has a list of ignored paths specified in zglob syntax |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 VERSION |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
version 0.83 |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 SUPPORT |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Bugs may be submitted at L<https://github.com/houseabsolute/perl-code-tidyall/issues>. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 SOURCE |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
The source code repository for Code-TidyAll can be found at L<https://github.com/houseabsolute/perl-code-tidyall>. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 AUTHORS |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=over 4 |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item * |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Jonathan Swartz <swartz@pobox.com> |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item * |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=back |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This software is copyright (c) 2011 - 2022 by Jonathan Swartz. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
99
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
The full text of the license can be found in the |
102
|
|
|
|
|
|
|
F<LICENSE> file included with this distribution. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=cut |