Pod::A...:Filter(3pm)

πŸ“¦
version 0.26 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– 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 a Pod::Abstract::Node tree 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 your filter method produce a Node tree if you're able to, because that keeps interoperability with other Pod::Abstract based 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 (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 the Pod::A...:Filter page, bestie!! this beauty is sittin' pretty at perl v5.40.1, dated 2025-11-16 πŸ’œ see you in the next manpage, mwah πŸŽ€βœ¨
πŸ“¦ where this page comes from