File::F...ule::PPI(3)

πŸ“¦
version 1.07 Β· 2 versions
, in fedora 43

πŸ’– 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 πŸ¦‹


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