File::F...ule::PPI(3)
π File::Find::Rule::PPI π
okay bestie, so this is File::Find::Rule::PPI β part of the User Contributed Perl Documentation, and it's literally the cutest little glue module that lets you mix PPI content queries into your File::Find::Rule searches. no cap. π¦
β¨ SYNOPSIS β¨
use File::Find::Rule ();
use File::Find::Rule::PPI ();
# Find all perl modules that use here-docs
my $Find = File::Find::Rule->file
->name('*.pm')
->ppi_find_any('Token::HereDoc');
my @heredoc = $Find->in( $dir );
like look at her. she's finding every .pm in $dir that's got a here-doc in it and dumping them into @heredoc. main character behavior fr fr. π
πΈ DESCRIPTION πΈ
File::Find::Rule::PPI lets you smoosh PPI content queries right into your File::Find::Rule searches. it's giving "best of both worlds" energy.
right now it ships with exactly one extra method β ppi_find_any β and what it does is take an argument that's identical to what the PPI::Node method find_any wants, then checks each file as a perl document to see if it matches your query. obsessed. π
π§ METHODS π§
π ppi_find_any $condition | $PPI::Find
the ppi_find_any method fires off a query that's identical to β and literally implemented using β PPI::Node's own find_any method. iykyk.
it takes as its argument any condition that would also be valid for that method. same rules, same vibe. β
bonus: it can also take an already-instantiated PPI::Find object as its argument, and in that case it'll use that object's any_matches method to get the same effect. slay.
π«Ά real talk though: if you hand ppi_find_any no condition, or an illegal one, the check will always fail β meaning your search returns no files at all. so like... give her something to work with, bestie. π
π SUPPORT π
bugs should always be submitted via the CPAN bug tracker:
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Find-Rule-PPI>
for anything else that isn't a bug, hmu with the maintainer. π«Ά
π AUTHOR π
Adam Kennedy <adamk@cpan.org>
π ACKNOWLEDGMENTS π
funding was provided by The Perl Foundation. iconic of them honestly. β¨
π¦ SEE ALSO π¦
<http://ali.as/>File::Find::RulePPI
π COPYRIGHT π
Copyright 2005 - 2010 Adam Kennedy.
this program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
the full text of the license can be found in the LICENSE file included with this module. π
and that's the whole page, bestie β this one's from perl v5.42.0, dated 2025-07-25, and it ate. no notes. go find some here-docs. ππΈβ¨
π¦ where this page comes from
- fedora 43: perl-File-Find-Rule-PPI 1.07-7.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms