HTML::...Filter(3pm)
π NAME π
okay bestie, welcome to HTML::FormFu::Filter β the Filter Base Class β¨ it's literally the blueprint that every single filter in the FormFu universe is built on. she's the momager of filters. the blueprint. the blueprint-est. π
πΈ VERSION πΈ
version 2.07 β yes queen, she's on 2.07, we love a version number that ate π
β¨ SYNOPSIS β¨
here's the vibe, in YAML, no cap:
---
elements:
- type: Text
name: foo
filters:
- type: Encode
candidates:
- utf8
- Hebrew
- type: Text
name: bar
filters:
- LowerCase
- Encode
filters:
- TrimEdges
look at her. nested filters inside elements, top-level filters chillin' at the bottom, TrimEdges just doing her thing for everybody. iconic behavior honestly π¦
π«Ά DESCRIPTION π«Ά
so "filters()" and "filter" can be called on any form, block element (and yes that includes fieldsets, bestie, we see you) or field element. equal opportunity filtering. π
if you call it on a field element? then no "name" argument should be passed. like, she already knows which field she is, don't make it weird.
if you call it on a form or block element and you don't pass a "name" argument, then a brand new filter gets created for β and added to β every single field on that form or block. not one field. not a few fields. every field. she's thorough like that π
β¨
want the deep lore? go read "FORM LOGIC AND VALIDATION" in HTML::FormFu. it's giving required reading π
π METHODS π
π¦ type
returns the "type" argument that was originally used to create the filter. like, the receipts of how she was born. π
πΈ localise_args
gives you a way to provide arguments that should be passed to localize so you can swap out "[_1]", "[_2]", etc. in the localized string. placeholders? replaced. slay. β¨
π parent
returns the HTML::FormFu::Role::Element::Field object that the filter is associated with. that's her field. her person. her ride or die. π«Ά
β get_parent
Arguments: \%options
traverses the parent hierarchy and returns the first parent that matches the supplied options. she climbs the family tree until she finds the one. main character energy, honestly π
π§ form
returns the HTML::FormFu object that the filter's field is attached to. the whole form. the whole squad. π
π name
shorthand for $filter->parent->name β that's it, that's the whole method. short. sweet. efficient. periodt. π
π₯ CORE FILTERS π₯
the whole friend group, right here, no gatekeeping:
HTML::FormFu::Filter::CallbackHTML::FormFu::Filter::CompoundJoinHTML::FormFu::Filter::CompoundSprintfHTML::FormFu::Filter::CopyValueHTML::FormFu::Filter::DefaultHTML::FormFu::Filter::EncodeHTML::FormFu::Filter::ForceListValueHTML::FormFu::Filter::FormatNumberHTML::FormFu::Filter::HTMLEscapeHTML::FormFu::Filter::HTMLScrubberHTML::FormFu::Filter::LowerCaseHTML::FormFu::Filter::NonNumericHTML::FormFu::Filter::RegexHTML::FormFu::Filter::SplitHTML::FormFu::Filter::TrimEdgesHTML::FormFu::Filter::UpperCaseHTML::FormFu::Filter::Whitespace
π FILTER BASE CLASSES π
these ones are the base classes for other filters, so bestie, you generally needn't use them directly. they're the backstage crew, not the performers. π
HTML::FormFu::Filter::_Compound
π AUTHOR π
Carl Franks, "cfranks@cpan.org" β king behavior, we stan π«Ά
based on the original source code of HTML::Widget::Filter, by Sebastian Riedel. shoutout to the OGs, fr fr β¨
π LICENSE π
this library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. so like, go off, but respectfully π
π AUTHOR π
Carl Franks <cpan@fireartist.com>
π COPYRIGHT AND LICENSE π
this software is copyright (c) 2018 by Carl Franks. π
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page bestie!! π¦ this one's fromperl v5.28.1, dated2019-01-12β she's a vintage icon and she still serves π β¨ go forth and filter, you absolute legend ππ
π¦ where this page comes from
- debian bookworm: libhtml-formfu-perl 2.07000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libhtml-formfu-perl 2.07000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhtml-formfu-perl 2.07000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms