DirWatch/New.pm

filter: Statementstmt 100% 16 / 16 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 21 / 21 CC 2 SCAR 4.1
CC
2
Cov
100%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« DirWatch/Modified.pm ↑ Summary DirWatch/Role/Signatures.pm »
1 package POE::Component::DirWatch::New;
2  
3 2 ▶use POE;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = "0.300001";
7  
8 2 extends 'POE::Component::DirWatch';
9 2 with 'POE::Component::DirWatch::Role::Signatures';
10  
11 #--------#---------#---------#---------#---------#---------#---------#---------
12  
13 around _file_callback => sub {
14 4 ▶ my $orig = shift;
Subroutine __ANON__: called CC=2 SCAR=6.9
15 4 my ($self, $file) = @_[OBJECT, ARG0];
16 4 ▶ return if exists $self->signatures->{"$file"};
Branch: 1 branch
BranchTrueFalseTotal
if exists $self->signatures->{"$file"} 2 2 4
17 2 $orig->(@_);
18 2 };
19  
20 2 __PACKAGE__->meta->make_immutable;
21  
22 2 1;
23  
24 __END__;
25  
26 #--------#---------#---------#---------#---------#---------#---------#---------
27  
28 =head1 NAME
29  
30 POE::Component::DirWatch::New
31  
32 =head1 DESCRIPTION
33  
34 DirWatch::New extends DirWatch to exclude previously seen files.
35  
36 This module consumes the L<POE::Component::DirWatch::Role::Signatures> role,
37 please see its documentation for information about methods or attributes
38 it provides or extends.
39  
40 =head1 METHODS
41  
42 =head2 file_callback
43  
44 C<around '_file_callback'> Don't call the callback if file has been seen.
45  
46 =head2 meta
47  
48 Keeping tests happy.
49  
50 =head1 SEE ALSO
51  
52 L<POE::Component::DirWatch>, L<Moose>
53  
54 =head1 COPYRIGHT
55  
56 Copyright 2006-2008 Guillermo Roditi. This is free software; you may
57 redistribute it and/or modify it under the same terms as Perl itself.
58  
59 =cut
60  
« DirWatch/Modified.pm ↑ Summary DirWatch/Role/Signatures.pm »