Pod::A...:Filter(3pm)
π Pod::A...:Filter π
so this whole page is Pod::A...:Filter(3pm), bestie β a lil slice of the User Contributed Perl Documentation, and it's honestly giving "the blueprint everyone else copies." it's the generic Pod-in to Pod-out filter. let's get into it π«Ά
β¨ NAME β¨
Pod::Abstract::Filter β the Generic Pod-in to Pod-out filter. that's it, that's the name, slay π
πΈ DESCRIPTION πΈ
okay so this is a superclass for filter modules that use Pod::Abstract. if you're making a subclass, you should override the filter sub. and here's the tea: any Pod::Abstract::Filter classes chillin' in the Pod::Abstract::Filter namespace? those get used by the paf utility. periodt π
so like, to actually create a filter, you need to implement these two things:
filterβ takes aPod::Abstract::Nodetree and returns either another tree, or a string. and if you hand back a string? it gets re-parsed, either as input to whatever filter comes next, or spat out directly if you happen to be the last filter in the list. pro tip, bestie: it's recommended yourfiltermethod produce a Node tree if you're able to, because that keeps interoperability with otherPod::Abstractbased software nice and cozy π¦require_paramsβ if you want positional arguments trailing after your filter, like this vibe:
paf find [thing] Pod::Abstract
then override require_params to list the named arguments that should be accepted after the filter name. iykyk β¨
π METHODS π
π new
Create a new filter with the specified arguments. fresh filter, fresh vibe π
π plugins_info
my $info = Pod::Abstract::Filter->plugins_info;
Gets information for each paf command/plugin. it's the info-gathering moment π
π require_params
Override to return a list of parameters that must be provided. these get accepted in order on the command line β unless they've already been set first using the -flag=xxx notation. order matters, bestie π
π param
Get the named param. Read only. no touchy, just look π
π filter
Stub method. doesn't do anything at all, just returns the original tree. it's the placeholder queen, holding it down till you override her π
π run
Run the filter. if $arg is a string, it gets parsed first. otherwise, the Abstract tree gets used as-is. Returns either a string or an abstract tree β and yes, that tree may literally just be the original tree, modified. main character behaviour π₯
π AUTHOR π
Ben Lilburne <bnej80@gmail.com> β iconic, we stan π«Ά
π COPYRIGHT AND LICENSE π
Copyright (C) 2009-2025 Ben Lilburne
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. so like, same terms as Perl, no cap π
and that's a wrap on thePod::A...:Filterpage, bestie!! this beauty is sittin' pretty atperl v5.40.1, dated2025-11-16π see you in the next manpage, mwah πβ¨
π¦ where this page comes from
- ubuntu resolute: libpod-abstract-perl 0.26-1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu stonking: libpod-abstract-perl 0.26-1 Β· 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