1File::Find::Object::RulUes:e:rPrCoocnetdruirbault(e3d)PFeirlle:D:oFciunmde:n:tOabtjieocnt::Rule::Procedural(3)
2
3
4
6 File::Find::Object::Rule::Procedural - File::Find::Object::Rule's
7 procedural interface
8
10 version 0.0312
11
13 use File::Find::Object::Rule;
14
15 # find all .pm files, procedurally
16 my @files = find(file => name => '*.pm', in => \@INC);
17
19 In addition to the regular object-oriented interface,
20 File::Find::Object::Rule provides two subroutines for you to use.
21
22 "find( @clauses )"
23 "rule( @clauses )"
24 "find" and "rule" can be used to invoke any methods available to
25 the OO version. "rule" is a synonym for "find"
26
27 Passing more than one value to a clause is done with an anonymous
28 array:
29
30 my $finder = find( name => [ '*.mp3', '*.ogg' ] );
31
32 "find" and "rule" both return a File::Find::Object::Rule instance,
33 unless one of the arguments is "in", in which case it returns a list of
34 things that match the rule.
35
36 my @files = find( name => [ '*.mp3', '*.ogg' ], in => $ENV{HOME} );
37
38 Please note that "in" will be the last clause evaluated, and so this
39 code will search for mp3s regardless of size.
40
41 my @files = find( name => '*.mp3', in => $ENV{HOME}, size => '<2k' );
42 ^
43 |
44 Clause processing stopped here ------/
45
46 It is also possible to invert a single rule by prefixing it with "!"
47 like so:
48
49 # large files that aren't videos
50 my @files = find( file =>
51 '!name' => [ '*.avi', '*.mov' ],
52 size => '>20M',
53 in => $ENV{HOME} );
54
56 Richard Clamp <richardc@unixbeard.net>
57
59 Copyright (C) 2003 Richard Clamp. All Rights Reserved.
60
61 This module is free software; you can redistribute it and/or modify it
62 under the same terms as Perl itself.
63
65 File::Find::Object::Rule
66
68 Websites
69 The following websites have more information about this module, and may
70 be of help to you. As always, in addition to those websites please use
71 your favorite search engine to discover more resources.
72
73 • MetaCPAN
74
75 A modern, open-source CPAN search engine, useful to view POD in
76 HTML format.
77
78 <https://metacpan.org/release/File-Find-Object-Rule>
79
80 • Search CPAN
81
82 The default CPAN search engine, useful to view POD in HTML format.
83
84 <http://search.cpan.org/dist/File-Find-Object-Rule>
85
86 • RT: CPAN's Bug Tracker
87
88 The RT ( Request Tracker ) website is the default bug/issue
89 tracking system for CPAN.
90
91 <https://rt.cpan.org/Public/Dist/Display.html?Name=File-Find-Object-Rule>
92
93 • CPAN Ratings
94
95 The CPAN Ratings is a website that allows community ratings and
96 reviews of Perl modules.
97
98 <http://cpanratings.perl.org/d/File-Find-Object-Rule>
99
100 • CPANTS
101
102 The CPANTS is a website that analyzes the Kwalitee ( code metrics )
103 of a distribution.
104
105 <http://cpants.cpanauthors.org/dist/File-Find-Object-Rule>
106
107 • CPAN Testers
108
109 The CPAN Testers is a network of smoke testers who run automated
110 tests on uploaded CPAN distributions.
111
112 <http://www.cpantesters.org/distro/F/File-Find-Object-Rule>
113
114 • CPAN Testers Matrix
115
116 The CPAN Testers Matrix is a website that provides a visual
117 overview of the test results for a distribution on various
118 Perls/platforms.
119
120 <http://matrix.cpantesters.org/?dist=File-Find-Object-Rule>
121
122 • CPAN Testers Dependencies
123
124 The CPAN Testers Dependencies is a website that shows a chart of
125 the test results of all dependencies for a distribution.
126
127 <http://deps.cpantesters.org/?module=File::Find::Object::Rule>
128
129 Bugs / Feature Requests
130 Please report any bugs or feature requests by email to
131 "bug-file-find-object-rule at rt.cpan.org", or through the web
132 interface at
133 <https://rt.cpan.org/Public/Bug/Report.html?Queue=File-Find-Object-Rule>.
134 You will be automatically notified of any progress on the request by
135 the system.
136
137 Source Code
138 The code is open to the world, and available for you to hack on. Please
139 feel free to browse it and play with it, or whatever. If you want to
140 contribute patches, please send me a diff or prod me to pull from your
141 repository :)
142
143 <https://github.com/shlomif/http://bitbucket.org/shlomif/perl-file-find-object-rule>
144
145 git clone git://github.com/shlomif/http://bitbucket.org/shlomif/perl-file-find-object-rule.git
146
148 • Richard Clamp <richardc@unixbeard.net>
149
150 • Andy Lester andy@petdance.com.
151
153 Please report any bugs or feature requests on the bugtracker website
154 <https://github.com/shlomif/http://bitbucket.org/shlomif/perl-file-find-object-rule/issues>
155
156 When submitting a bug or request, please include a test-file or a patch
157 to an existing test-file that illustrates the bug or desired feature.
158
160 This software is copyright (c) 2020 by Richard Clamp.
161
162 This is free software; you can redistribute it and/or modify it under
163 the same terms as the Perl 5 programming language system itself.
164
165
166
167perl v5.32.1 2021-0F1i-l2e7::Find::Object::Rule::Procedural(3)