1File::Find::Rule::PPI(3U)ser Contributed Perl DocumentatiFoinle::Find::Rule::PPI(3)
2
3
4
6 File::Find::Rule::PPI - Add support for PPI queries to File::Find::Rule
7
9 use File::Find::Rule ();
10 use File::Find::Rule::PPI ();
11
12 # Find all perl modules that use here-docs
13 my $Find = File::Find::Rule->file
14 ->name('*.pm')
15 ->ppi_find_any('Token::HereDoc');
16 my @heredoc = $Find->in( $dir );
17
19 File::Find::Rule::PPI allows you to integrate PPI content queries into
20 your File::Find::Rule searches.
21
22 Initially, it provides the one additional method "ppi_find_any", which
23 takes an argument identical to the PPI::Node method "find_any" and
24 checks each file as a perl document to see if matches the query.
25
27 ppi_find_any $condition | $PPI::Find
28 The "ppi_find_any" method causes a query identical to (and implemented
29 using) PPI::Node's "find_any" method.
30
31 It takes as argument any condition that would also be valid for the
32 above method.
33
34 In addition, it can also take as argument an instantiated PPI::Find
35 object, and will use that object's "any_matches" method to achieve the
36 same effect.
37
38 If you provide no or an illegal condition to ppi_find_any, the check
39 will always fail, and no files will be returned when you execute the
40 search.
41
43 Bugs should always be submitted via the CPAN bug tracker
44
45 http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Find-Rule-PPI
46 <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Find-Rule-PPI>
47
48 For other issues, contact the maintainer
49
51 Adam Kennedy <adamk@cpan.org>
52
54 Funding provided by The Perl Foundation
55
57 <http://ali.as/>, File::Find::Rule, PPI
58
60 Copyright 2005, 2006 Adam Kennedy.
61
62 This program is free software; you can redistribute it and/or modify it
63 under the same terms as Perl itself.
64
65 The full text of the license can be found in the LICENSE file included
66 with this module.
67
68
69
70perl v5.12.0 2006-09-10 File::Find::Rule::PPI(3)