HTML::...Sprintf(3pm)
π HTML::FormFu::Filter::CompoundSprintf β CompoundSprintf filter π
okay bestie, this is the manual page for HTML::FormFu::Filter::CompoundSprintf, coming at you from the User Contributed Perl Documentation (that's the 3pm situation, iykyk). Let's get into it β¨
πΈ VERSION πΈ
version 2.07 β she's serving, she's stable, she's on the current release π
π¦ SYNOPSIS π¦
---
element:
- type: Multi
name: date
elements:
- name: day
- name: month
- name: year
filter:
- type: CompoundSprintf
sprintf: '%02d-%02d-%04d'
and then, like, to actually get the compound-value back out:
# get the compound-value
my $date = $form->param_value('date');
no cap, that's the whole vibe π«Ά
π DESCRIPTION π
So this filter is for when you're rolling with a HTML::FormFu::Element::Multi group of fields β you know, the squad of inputs that all belong to one little crew π
What it does is: it takes a sprintf pattern and uses it to join up the input from several fields into one single value. Multiple boxes in, one cute little string out. iconic behavior honestly π
π METHODS π
β¨ sprintf β¨
Arguments: $string
This is the sprintf pattern that joins the individually submitted parts together. And ngl, the pattern gets passed straight to the perl-core sprintf function β no middleman, no edits, just straight through π₯
β¨ field_order β¨
Inherited, bestie. For the details you gotta see "field_order" in HTML::FormFu::Filter::_Compound.
Here's what it looks like in the wild:
---
element:
- type: Multi
name: date
elements:
- name: month
- name: day
- name year
filter:
- type: CompoundSprintf
field_order:
- day
- month
- year
(yes, - name year is written exactly like that up there, we do not touch the source material π)
π AUTHOR π
Carl Franks, "cfranks@cpan.org"
π LICENSE π
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
π 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 a wrap, gorgeous β¨ this page came to you on perl v5.28.1, dated 2019-01-12, and it's the HTML::...Sprintf(3pm) page β slay, go build your compound fields, mwah π
π¦ 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