| 1 | package File::Find::Rule::Age; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 5 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 5 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 5 | our $VERSION = "0.302"; | |||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 5 | ▶ | use base "File::Find::Rule"; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 5 | ▶ | use Carp 'carp'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | 5 | ▶ | use DateTime; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 12 | 5 | ▶ | use File::stat; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 13 | 5 | ▶ | use Params::Util qw(_STRING _NONNEGINT _INSTANCE); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | 5 | my %mapping = ( | |||||||||||||||||||||||||||
| 16 | "D" => "days", | ||||||||||||||||||||||||||||
| 17 | "W" => "weeks", | ||||||||||||||||||||||||||||
| 18 | "M" => "months", | ||||||||||||||||||||||||||||
| 19 | "Y" => "years", | ||||||||||||||||||||||||||||
| 20 | "h" => "hours", | ||||||||||||||||||||||||||||
| 21 | "m" => "minutes", | ||||||||||||||||||||||||||||
| 22 | "s" => "seconds", | ||||||||||||||||||||||||||||
| 23 | ); | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | 5 | my %criteria = ( | |||||||||||||||||||||||||||
| 26 | older => 1, | ||||||||||||||||||||||||||||
| 27 | newer => 1, | ||||||||||||||||||||||||||||
| 28 | ); | ||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | sub File::Find::Rule::age | ||||||||||||||||||||||||||||
| 31 | 4 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
age: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 32 | 4 | my ( $me, $criterion, $age ) = @_; | |||||||||||||||||||||||||||
| 33 | 4 | my ( $interval, $unit ) = ( $age =~ m/^(\d+)([DWMYhms])$/ ); | |||||||||||||||||||||||||||
| 34 | 4 | ▶ | return carp "Duration or Unit missing" unless ( $interval and $unit ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$interval and $unit
MC/DC50%1/2
$interval and $unit
$interval
$unit
Truth table66%2/3
A and B
A= $intervalB= $unit
| |||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | 3 | $criterion = lc($criterion); | |||||||||||||||||||||||||||
| 37 | 3 | ▶ | defined $criteria{$criterion} or return carp "Invalid criterion: $criterion"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | 2 | my $self = $me->_force_object; | |||||||||||||||||||||||||||
| 40 | my $sub2exec = $criterion eq "older" | ||||||||||||||||||||||||||||
| 41 | 2 | ▶ | ? sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 42 | 2 | my $dt = DateTime->now; | |||||||||||||||||||||||||||
| 43 | 2 | $dt->subtract( $mapping{$unit} => $interval ); | |||||||||||||||||||||||||||
| 44 | 2 | stat($_)->mtime < $dt->epoch; | |||||||||||||||||||||||||||
| 45 | } | ||||||||||||||||||||||||||||
| 46 | 2 | ▶ | : sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 47 | 2 | my $dt = DateTime->now; | |||||||||||||||||||||||||||
| 48 | 2 | $dt->subtract( $mapping{$unit} => $interval ); | |||||||||||||||||||||||||||
| 49 | 2 | stat($_)->mtime > $dt->epoch; | |||||||||||||||||||||||||||
| 50 | 2 | ▶ | }; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 51 | 2 | $self->exec($sub2exec); | |||||||||||||||||||||||||||
| 52 | } | ||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | sub File::Find::Rule::modified_before | ||||||||||||||||||||||||||||
| 55 | 5 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
modified_before: called CC=6 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 56 | 5 | my ( $me, $ts ) = @_; | |||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||
| 58 | 5 | my $self = $me->_force_object; | |||||||||||||||||||||||||||
| 59 | _STRING($ts) and -e $ts and return $self->exec( | ||||||||||||||||||||||||||||
| 60 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 61 | 4 | stat($_)->mtime < stat($ts)->mtime; | |||||||||||||||||||||||||||
| 62 | } | ||||||||||||||||||||||||||||
| 63 | 5 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
&_STRING($ts) and -e $ts
MC/DC100%2/2
&_STRING($ts) and -e $ts
&_STRING($ts)
-e $ts
Truth table100%3/3
A and B
A= &_STRING($ts)B= -e $ts
| |||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||
| 65 | _NONNEGINT($ts) and return $self->exec( | ||||||||||||||||||||||||||||
| 66 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 67 | 4 | stat($_)->mtime < $ts; | |||||||||||||||||||||||||||
| 68 | } | ||||||||||||||||||||||||||||
| 69 | 4 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 70 | _INSTANCE( $ts, "DateTime" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 71 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 72 | 4 | stat($_)->mtime < $ts->epoch; | |||||||||||||||||||||||||||
| 73 | } | ||||||||||||||||||||||||||||
| 74 | 3 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 75 | _INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 76 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 77 | 4 | my $dt = DateTime->now() - $ts; | |||||||||||||||||||||||||||
| 78 | 4 | stat($_)->mtime < $dt->epoch; | |||||||||||||||||||||||||||
| 79 | } | ||||||||||||||||||||||||||||
| 80 | 2 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 81 | 1 | carp "Cannot parse reference"; | |||||||||||||||||||||||||||
| 82 | } | ||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||
| 84 | sub File::Find::Rule::modified_until | ||||||||||||||||||||||||||||
| 85 | 5 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
modified_until: called CC=6 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 86 | 5 | my ( $me, $ts ) = @_; | |||||||||||||||||||||||||||
| 87 | |||||||||||||||||||||||||||||
| 88 | 5 | my $self = $me->_force_object; | |||||||||||||||||||||||||||
| 89 | _STRING($ts) and -e $ts and return $self->exec( | ||||||||||||||||||||||||||||
| 90 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 91 | 4 | stat($_)->mtime <= stat($ts)->mtime; | |||||||||||||||||||||||||||
| 92 | } | ||||||||||||||||||||||||||||
| 93 | 5 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
&_STRING($ts) and -e $ts
MC/DC100%2/2
&_STRING($ts) and -e $ts
&_STRING($ts)
-e $ts
Truth table100%3/3
A and B
A= &_STRING($ts)B= -e $ts
| |||||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||
| 95 | _NONNEGINT($ts) and return $self->exec( | ||||||||||||||||||||||||||||
| 96 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 97 | 4 | stat($_)->mtime <= $ts; | |||||||||||||||||||||||||||
| 98 | } | ||||||||||||||||||||||||||||
| 99 | 4 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 100 | _INSTANCE( $ts, "DateTime" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 101 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 102 | 4 | stat($_)->mtime <= $ts->epoch; | |||||||||||||||||||||||||||
| 103 | } | ||||||||||||||||||||||||||||
| 104 | 3 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 105 | _INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 106 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 107 | 4 | my $dt = DateTime->now() - $ts; | |||||||||||||||||||||||||||
| 108 | 4 | stat($_)->mtime <= $dt->epoch; | |||||||||||||||||||||||||||
| 109 | } | ||||||||||||||||||||||||||||
| 110 | 2 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 111 | 1 | carp "Cannot parse reference"; | |||||||||||||||||||||||||||
| 112 | } | ||||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||
| 114 | sub File::Find::Rule::modified_since | ||||||||||||||||||||||||||||
| 115 | 5 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
modified_since: called CC=6 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 116 | 5 | my ( $me, $ts ) = @_; | |||||||||||||||||||||||||||
| 117 | |||||||||||||||||||||||||||||
| 118 | 5 | my $self = $me->_force_object; | |||||||||||||||||||||||||||
| 119 | _STRING($ts) and -e $ts and return $self->exec( | ||||||||||||||||||||||||||||
| 120 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 121 | 4 | stat($_)->mtime >= stat($ts)->mtime; | |||||||||||||||||||||||||||
| 122 | } | ||||||||||||||||||||||||||||
| 123 | 5 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
&_STRING($ts) and -e $ts
MC/DC100%2/2
&_STRING($ts) and -e $ts
&_STRING($ts)
-e $ts
Truth table100%3/3
A and B
A= &_STRING($ts)B= -e $ts
| |||||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||
| 125 | _NONNEGINT($ts) and return $self->exec( | ||||||||||||||||||||||||||||
| 126 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 127 | 4 | stat($_)->mtime >= $ts; | |||||||||||||||||||||||||||
| 128 | } | ||||||||||||||||||||||||||||
| 129 | 4 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 130 | _INSTANCE( $ts, "DateTime" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 131 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 132 | 4 | stat($_)->mtime >= $ts->epoch; | |||||||||||||||||||||||||||
| 133 | } | ||||||||||||||||||||||||||||
| 134 | 3 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 135 | _INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 136 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 137 | 4 | my $dt = DateTime->now() - $ts; | |||||||||||||||||||||||||||
| 138 | 4 | stat($_)->mtime >= $dt->epoch; | |||||||||||||||||||||||||||
| 139 | } | ||||||||||||||||||||||||||||
| 140 | 2 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 141 | 1 | carp "Cannot parse reference"; | |||||||||||||||||||||||||||
| 142 | } | ||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||
| 144 | sub File::Find::Rule::modified_after | ||||||||||||||||||||||||||||
| 145 | 5 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
modified_after: called CC=6 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 146 | 5 | my ( $me, $ts ) = @_; | |||||||||||||||||||||||||||
| 147 | |||||||||||||||||||||||||||||
| 148 | 5 | my $self = $me->_force_object; | |||||||||||||||||||||||||||
| 149 | _STRING($ts) and -e $ts and return $self->exec( | ||||||||||||||||||||||||||||
| 150 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 151 | 4 | stat($_)->mtime > stat($ts)->mtime; | |||||||||||||||||||||||||||
| 152 | } | ||||||||||||||||||||||||||||
| 153 | 5 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
&_STRING($ts) and -e $ts
MC/DC100%2/2
&_STRING($ts) and -e $ts
&_STRING($ts)
-e $ts
Truth table100%3/3
A and B
A= &_STRING($ts)B= -e $ts
| |||||||||||||||||||||||||||||
| 154 | |||||||||||||||||||||||||||||
| 155 | _NONNEGINT($ts) and return $self->exec( | ||||||||||||||||||||||||||||
| 156 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 157 | 4 | stat($_)->mtime > $ts; | |||||||||||||||||||||||||||
| 158 | } | ||||||||||||||||||||||||||||
| 159 | 4 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 160 | _INSTANCE( $ts, "DateTime" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 161 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 162 | 4 | stat($_)->mtime > $ts->epoch; | |||||||||||||||||||||||||||
| 163 | } | ||||||||||||||||||||||||||||
| 164 | 3 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 165 | _INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 166 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 167 | 4 | my $dt = DateTime->now() - $ts; | |||||||||||||||||||||||||||
| 168 | 4 | stat($_)->mtime > $dt->epoch; | |||||||||||||||||||||||||||
| 169 | } | ||||||||||||||||||||||||||||
| 170 | 2 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 171 | 1 | carp "Cannot parse reference"; | |||||||||||||||||||||||||||
| 172 | } | ||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||
| 174 | ############################################################################# | ||||||||||||||||||||||||||||
| 175 | |||||||||||||||||||||||||||||
| 176 | sub File::Find::Rule::accessed_before | ||||||||||||||||||||||||||||
| 177 | 5 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
accessed_before: called CC=6 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 178 | 5 | my ( $me, $ts ) = @_; | |||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||
| 180 | 5 | my $self = $me->_force_object; | |||||||||||||||||||||||||||
| 181 | _STRING($ts) and -e $ts and return $self->exec( | ||||||||||||||||||||||||||||
| 182 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 183 | 4 | stat($_)->atime < stat($ts)->atime; | |||||||||||||||||||||||||||
| 184 | } | ||||||||||||||||||||||||||||
| 185 | 5 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
&_STRING($ts) and -e $ts
MC/DC100%2/2
&_STRING($ts) and -e $ts
&_STRING($ts)
-e $ts
Truth table100%3/3
A and B
A= &_STRING($ts)B= -e $ts
| |||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||
| 187 | _NONNEGINT($ts) and return $self->exec( | ||||||||||||||||||||||||||||
| 188 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 189 | 4 | stat($_)->atime < $ts; | |||||||||||||||||||||||||||
| 190 | } | ||||||||||||||||||||||||||||
| 191 | 4 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 192 | _INSTANCE( $ts, "DateTime" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 193 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 194 | 4 | stat($_)->atime < $ts->epoch; | |||||||||||||||||||||||||||
| 195 | } | ||||||||||||||||||||||||||||
| 196 | 3 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 197 | _INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 198 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 199 | 4 | my $dt = DateTime->now() - $ts; | |||||||||||||||||||||||||||
| 200 | 4 | stat($_)->atime < $dt->epoch; | |||||||||||||||||||||||||||
| 201 | } | ||||||||||||||||||||||||||||
| 202 | 2 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 203 | 1 | carp "Cannot parse reference"; | |||||||||||||||||||||||||||
| 204 | } | ||||||||||||||||||||||||||||
| 205 | |||||||||||||||||||||||||||||
| 206 | sub File::Find::Rule::accessed_until | ||||||||||||||||||||||||||||
| 207 | 5 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
accessed_until: called CC=6 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 208 | 5 | my ( $me, $ts ) = @_; | |||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||
| 210 | 5 | my $self = $me->_force_object; | |||||||||||||||||||||||||||
| 211 | _STRING($ts) and -e $ts and return $self->exec( | ||||||||||||||||||||||||||||
| 212 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 213 | 4 | stat($_)->atime <= stat($ts)->atime; | |||||||||||||||||||||||||||
| 214 | } | ||||||||||||||||||||||||||||
| 215 | 5 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
&_STRING($ts) and -e $ts
MC/DC100%2/2
&_STRING($ts) and -e $ts
&_STRING($ts)
-e $ts
Truth table100%3/3
A and B
A= &_STRING($ts)B= -e $ts
| |||||||||||||||||||||||||||||
| 216 | |||||||||||||||||||||||||||||
| 217 | _NONNEGINT($ts) and return $self->exec( | ||||||||||||||||||||||||||||
| 218 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 219 | 4 | stat($_)->atime <= $ts; | |||||||||||||||||||||||||||
| 220 | } | ||||||||||||||||||||||||||||
| 221 | 4 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 222 | _INSTANCE( $ts, "DateTime" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 223 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 224 | 4 | stat($_)->atime <= $ts->epoch; | |||||||||||||||||||||||||||
| 225 | } | ||||||||||||||||||||||||||||
| 226 | 3 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 227 | _INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 228 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 229 | 4 | my $dt = DateTime->now() - $ts; | |||||||||||||||||||||||||||
| 230 | 4 | stat($_)->atime <= $dt->epoch; | |||||||||||||||||||||||||||
| 231 | } | ||||||||||||||||||||||||||||
| 232 | 2 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 233 | 1 | carp "Cannot parse reference"; | |||||||||||||||||||||||||||
| 234 | } | ||||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||||
| 236 | sub File::Find::Rule::accessed_since | ||||||||||||||||||||||||||||
| 237 | 5 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
accessed_since: called CC=6 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 238 | 5 | my ( $me, $ts ) = @_; | |||||||||||||||||||||||||||
| 239 | |||||||||||||||||||||||||||||
| 240 | 5 | my $self = $me->_force_object; | |||||||||||||||||||||||||||
| 241 | _STRING($ts) and -e $ts and return $self->exec( | ||||||||||||||||||||||||||||
| 242 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 243 | 4 | stat($_)->atime >= stat($ts)->atime; | |||||||||||||||||||||||||||
| 244 | } | ||||||||||||||||||||||||||||
| 245 | 5 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
&_STRING($ts) and -e $ts
MC/DC100%2/2
&_STRING($ts) and -e $ts
&_STRING($ts)
-e $ts
Truth table100%3/3
A and B
A= &_STRING($ts)B= -e $ts
| |||||||||||||||||||||||||||||
| 246 | |||||||||||||||||||||||||||||
| 247 | _NONNEGINT($ts) and return $self->exec( | ||||||||||||||||||||||||||||
| 248 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 249 | 4 | stat($_)->atime >= $ts; | |||||||||||||||||||||||||||
| 250 | } | ||||||||||||||||||||||||||||
| 251 | 4 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 252 | _INSTANCE( $ts, "DateTime" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 253 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 254 | 4 | stat($_)->atime >= $ts->epoch; | |||||||||||||||||||||||||||
| 255 | } | ||||||||||||||||||||||||||||
| 256 | 3 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 257 | _INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 258 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 259 | 4 | my $dt = DateTime->now() - $ts; | |||||||||||||||||||||||||||
| 260 | 4 | stat($_)->atime >= $dt->epoch; | |||||||||||||||||||||||||||
| 261 | } | ||||||||||||||||||||||||||||
| 262 | 2 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 263 | 1 | carp "Cannot parse reference"; | |||||||||||||||||||||||||||
| 264 | } | ||||||||||||||||||||||||||||
| 265 | |||||||||||||||||||||||||||||
| 266 | sub File::Find::Rule::accessed_after | ||||||||||||||||||||||||||||
| 267 | 5 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
accessed_after: called CC=6 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 268 | 5 | my ( $me, $ts ) = @_; | |||||||||||||||||||||||||||
| 269 | |||||||||||||||||||||||||||||
| 270 | 5 | my $self = $me->_force_object; | |||||||||||||||||||||||||||
| 271 | _STRING($ts) and -e $ts and return $self->exec( | ||||||||||||||||||||||||||||
| 272 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 273 | 4 | stat($_)->atime > stat($ts)->atime; | |||||||||||||||||||||||||||
| 274 | } | ||||||||||||||||||||||||||||
| 275 | 5 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
&_STRING($ts) and -e $ts
MC/DC100%2/2
&_STRING($ts) and -e $ts
&_STRING($ts)
-e $ts
Truth table100%3/3
A and B
A= &_STRING($ts)B= -e $ts
| |||||||||||||||||||||||||||||
| 276 | |||||||||||||||||||||||||||||
| 277 | _NONNEGINT($ts) and return $self->exec( | ||||||||||||||||||||||||||||
| 278 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 279 | 4 | stat($_)->atime > $ts; | |||||||||||||||||||||||||||
| 280 | } | ||||||||||||||||||||||||||||
| 281 | 4 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 282 | _INSTANCE( $ts, "DateTime" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 283 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 284 | 4 | stat($_)->atime > $ts->epoch; | |||||||||||||||||||||||||||
| 285 | } | ||||||||||||||||||||||||||||
| 286 | 3 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 287 | _INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 288 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 289 | 4 | my $dt = DateTime->now() - $ts; | |||||||||||||||||||||||||||
| 290 | 4 | stat($_)->atime > $dt->epoch; | |||||||||||||||||||||||||||
| 291 | } | ||||||||||||||||||||||||||||
| 292 | 2 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 293 | 1 | carp "Cannot parse reference"; | |||||||||||||||||||||||||||
| 294 | } | ||||||||||||||||||||||||||||
| 295 | |||||||||||||||||||||||||||||
| 296 | ############################################################################# | ||||||||||||||||||||||||||||
| 297 | |||||||||||||||||||||||||||||
| 298 | sub File::Find::Rule::created_before | ||||||||||||||||||||||||||||
| 299 | 5 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
created_before: called CC=6 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 300 | 5 | my ( $me, $ts ) = @_; | |||||||||||||||||||||||||||
| 301 | |||||||||||||||||||||||||||||
| 302 | 5 | my $self = $me->_force_object; | |||||||||||||||||||||||||||
| 303 | _STRING($ts) and -e $ts and return $self->exec( | ||||||||||||||||||||||||||||
| 304 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 305 | 4 | stat($_)->ctime < stat($ts)->ctime; | |||||||||||||||||||||||||||
| 306 | } | ||||||||||||||||||||||||||||
| 307 | 5 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
&_STRING($ts) and -e $ts
MC/DC100%2/2
&_STRING($ts) and -e $ts
&_STRING($ts)
-e $ts
Truth table100%3/3
A and B
A= &_STRING($ts)B= -e $ts
| |||||||||||||||||||||||||||||
| 308 | |||||||||||||||||||||||||||||
| 309 | _NONNEGINT($ts) and return $self->exec( | ||||||||||||||||||||||||||||
| 310 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 311 | 4 | stat($_)->ctime < $ts; | |||||||||||||||||||||||||||
| 312 | } | ||||||||||||||||||||||||||||
| 313 | 4 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 314 | _INSTANCE( $ts, "DateTime" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 315 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 316 | 4 | stat($_)->ctime < $ts->epoch; | |||||||||||||||||||||||||||
| 317 | } | ||||||||||||||||||||||||||||
| 318 | 3 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 319 | _INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 320 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 321 | 4 | my $dt = DateTime->now() - $ts; | |||||||||||||||||||||||||||
| 322 | 4 | stat($_)->ctime < $dt->epoch; | |||||||||||||||||||||||||||
| 323 | } | ||||||||||||||||||||||||||||
| 324 | 2 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 325 | 1 | carp "Cannot parse reference"; | |||||||||||||||||||||||||||
| 326 | } | ||||||||||||||||||||||||||||
| 327 | |||||||||||||||||||||||||||||
| 328 | sub File::Find::Rule::created_until | ||||||||||||||||||||||||||||
| 329 | 5 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
created_until: called CC=6 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 330 | 5 | my ( $me, $ts ) = @_; | |||||||||||||||||||||||||||
| 331 | |||||||||||||||||||||||||||||
| 332 | 5 | my $self = $me->_force_object; | |||||||||||||||||||||||||||
| 333 | _STRING($ts) and -e $ts and return $self->exec( | ||||||||||||||||||||||||||||
| 334 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 335 | 4 | stat($_)->ctime <= stat($ts)->ctime; | |||||||||||||||||||||||||||
| 336 | } | ||||||||||||||||||||||||||||
| 337 | 5 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
&_STRING($ts) and -e $ts
MC/DC100%2/2
&_STRING($ts) and -e $ts
&_STRING($ts)
-e $ts
Truth table100%3/3
A and B
A= &_STRING($ts)B= -e $ts
| |||||||||||||||||||||||||||||
| 338 | |||||||||||||||||||||||||||||
| 339 | _NONNEGINT($ts) and return $self->exec( | ||||||||||||||||||||||||||||
| 340 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 341 | 4 | stat($_)->ctime <= $ts; | |||||||||||||||||||||||||||
| 342 | } | ||||||||||||||||||||||||||||
| 343 | 4 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 344 | _INSTANCE( $ts, "DateTime" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 345 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 346 | 4 | stat($_)->ctime <= $ts->epoch; | |||||||||||||||||||||||||||
| 347 | } | ||||||||||||||||||||||||||||
| 348 | 3 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 349 | _INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 350 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 351 | 4 | my $dt = DateTime->now() - $ts; | |||||||||||||||||||||||||||
| 352 | 4 | stat($_)->ctime <= $dt->epoch; | |||||||||||||||||||||||||||
| 353 | } | ||||||||||||||||||||||||||||
| 354 | 2 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 355 | 1 | carp "Cannot parse reference"; | |||||||||||||||||||||||||||
| 356 | } | ||||||||||||||||||||||||||||
| 357 | |||||||||||||||||||||||||||||
| 358 | sub File::Find::Rule::created_since | ||||||||||||||||||||||||||||
| 359 | 5 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
created_since: called CC=6 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 360 | 5 | my ( $me, $ts ) = @_; | |||||||||||||||||||||||||||
| 361 | |||||||||||||||||||||||||||||
| 362 | 5 | my $self = $me->_force_object; | |||||||||||||||||||||||||||
| 363 | _STRING($ts) and -e $ts and return $self->exec( | ||||||||||||||||||||||||||||
| 364 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 365 | 4 | stat($_)->ctime >= stat($ts)->ctime; | |||||||||||||||||||||||||||
| 366 | } | ||||||||||||||||||||||||||||
| 367 | 5 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
&_STRING($ts) and -e $ts
MC/DC100%2/2
&_STRING($ts) and -e $ts
&_STRING($ts)
-e $ts
Truth table100%3/3
A and B
A= &_STRING($ts)B= -e $ts
| |||||||||||||||||||||||||||||
| 368 | |||||||||||||||||||||||||||||
| 369 | _NONNEGINT($ts) and return $self->exec( | ||||||||||||||||||||||||||||
| 370 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 371 | 4 | stat($_)->ctime >= $ts; | |||||||||||||||||||||||||||
| 372 | } | ||||||||||||||||||||||||||||
| 373 | 4 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 374 | _INSTANCE( $ts, "DateTime" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 375 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 376 | 4 | stat($_)->ctime >= $ts->epoch; | |||||||||||||||||||||||||||
| 377 | } | ||||||||||||||||||||||||||||
| 378 | 3 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 379 | _INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 380 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 381 | 4 | my $dt = DateTime->now() - $ts; | |||||||||||||||||||||||||||
| 382 | 4 | stat($_)->ctime >= $dt->epoch; | |||||||||||||||||||||||||||
| 383 | } | ||||||||||||||||||||||||||||
| 384 | 2 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 385 | 1 | carp "Cannot parse reference"; | |||||||||||||||||||||||||||
| 386 | } | ||||||||||||||||||||||||||||
| 387 | |||||||||||||||||||||||||||||
| 388 | sub File::Find::Rule::created_after | ||||||||||||||||||||||||||||
| 389 | 5 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
created_after: called CC=6 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 390 | 5 | my ( $me, $ts ) = @_; | |||||||||||||||||||||||||||
| 391 | |||||||||||||||||||||||||||||
| 392 | 5 | my $self = $me->_force_object; | |||||||||||||||||||||||||||
| 393 | _STRING($ts) and -e $ts and return $self->exec( | ||||||||||||||||||||||||||||
| 394 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 395 | 4 | stat($_)->ctime > stat($ts)->ctime; | |||||||||||||||||||||||||||
| 396 | } | ||||||||||||||||||||||||||||
| 397 | 5 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
&_STRING($ts) and -e $ts
MC/DC100%2/2
&_STRING($ts) and -e $ts
&_STRING($ts)
-e $ts
Truth table100%3/3
A and B
A= &_STRING($ts)B= -e $ts
| |||||||||||||||||||||||||||||
| 398 | |||||||||||||||||||||||||||||
| 399 | _NONNEGINT($ts) and return $self->exec( | ||||||||||||||||||||||||||||
| 400 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 401 | 4 | stat($_)->ctime > $ts; | |||||||||||||||||||||||||||
| 402 | } | ||||||||||||||||||||||||||||
| 403 | 4 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 404 | _INSTANCE( $ts, "DateTime" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 405 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 406 | 4 | stat($_)->ctime > $ts->epoch; | |||||||||||||||||||||||||||
| 407 | } | ||||||||||||||||||||||||||||
| 408 | 3 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 409 | _INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( | ||||||||||||||||||||||||||||
| 410 | 4 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 411 | 4 | my $dt = DateTime->now() - $ts; | |||||||||||||||||||||||||||
| 412 | 4 | stat($_)->ctime > $dt->epoch; | |||||||||||||||||||||||||||
| 413 | } | ||||||||||||||||||||||||||||
| 414 | 2 | ▶ | ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 415 | 1 | carp "Cannot parse reference"; | |||||||||||||||||||||||||||
| 416 | } | ||||||||||||||||||||||||||||
| 417 | |||||||||||||||||||||||||||||
| 418 | ############################################################################# | ||||||||||||||||||||||||||||
| 419 | |||||||||||||||||||||||||||||
| 420 | 5 | 1; | |||||||||||||||||||||||||||
| 421 | __END__ | ||||||||||||||||||||||||||||