line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
4334
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
2
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
50
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package App::Embra::Plugin::PruneFiles; |
5
|
|
|
|
|
|
|
$App::Embra::Plugin::PruneFiles::VERSION = '0.001'; # TRIAL |
6
|
|
|
|
|
|
|
# ABSTRACT: exclude files from the site |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
4
|
use List::MoreUtils qw< any >; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
12
|
|
9
|
1
|
|
|
1
|
|
297
|
use Method::Signatures; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
8
|
|
10
|
1
|
|
|
1
|
|
346
|
use Moo; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has 'filename' => ( |
15
|
|
|
|
|
|
|
is => 'ro', |
16
|
|
|
|
|
|
|
default => sub { [] }, |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
1
|
50
|
|
1
|
|
2962
|
method mvp_multivalue_args() { qw< filename >; } |
|
1
|
|
|
1
|
|
169
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
24
|
|
20
|
|
|
|
|
|
|
|
21
|
1
|
50
|
|
1
|
|
2576
|
method exclude_file( $file ) { |
|
3
|
50
|
|
3
|
|
2
|
|
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
4
|
|
22
|
3
|
100
|
|
3
|
|
6
|
return 1 if any { $_ eq $file->name } @{ $self->filename }; |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
10
|
|
23
|
2
|
|
|
|
|
6
|
return; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
with 'App::Embra::Role::FilePruner'; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=pod |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=encoding UTF-8 |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 NAME |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
App::Embra::Plugin::PruneFiles - exclude files from the site |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 VERSION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
version 0.001 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 DESCRIPTION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
This plugin will remove files from the site and prevent them from being processed. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
In your F<embra.ini>: |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
[PruneFiles] |
51
|
|
|
|
|
|
|
filename = not_this_file |
52
|
|
|
|
|
|
|
filename = dont_even_think_about_publishing_this |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 filename |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Name of file to exclude. May be used multiple times to exclude multiple files. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 AUTHOR |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Daniel Holz <dgholz@gmail.com> |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This software is copyright (c) 2015 by Daniel Holz. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
69
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |