Debian Codegraph @

TODO

raw
1 ## -*- cperl -*-
2
3 ## update _run from the article (which did it better)
4
5 ## and vice versa... reference the article from the See Also
6
7 use File::Finder qw(contains foo bar);
8 # pulls in File::Finder::Plugin::contains etc
9
10 ## oval: like eval, but operates on open file handle
11 ## (like a more general "contains")
12
13 ## from ovid:
14 my %status = (
15 links => sub { (stat(_))[3] },
16 inum => sub { (stat(_))[1] },
17 atime => sub { int(-A _) },
18 mtime => sub { int(-M _) },
19 ctime => sub { int(-C _) },
20 );
21 while (my ($function,$op) = each %status) {
22 no strict 'refs';
23 *$function = sub {
24 my $self = shift;
25 my ($prefix, $n) = shift =~ qr/^(\+|-|)(.*)/;
26 return sub {
27 _n($prefix, $n, $op->());
28 };
29 }
30 }