HTML::...ndJoin(3pm)

πŸ“¦
version 2.07000 Β· 5 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– HTML::FormFu::Filter::CompoundJoin πŸ’–

okay bestie, welcome to the User Contributed Perl Documentation page for HTML::FormFu::Filter::CompoundJoin(3pm) β€” yes that's a whole mouthful, we're just gonna call it the CompoundJoin filter, periodt ✨


✨ NAME ✨

HTML::FormFu::Filter::CompoundJoin β€” the CompoundJoin filter, and that's the whole vibe 🌸


🌟 VERSION 🌟

version 2.07 β€” she's got lore, she's got history, she's iconic πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

here's the whole setup, copy it, don't tweak it, it's perfect:

---
element:
  - type: Multi
    name: address

    elements:
      - name: number
      - name: street

    filter:
      - type: CompoundJoin

and then, to actually get the compound-value back out:

# get the compound-value

my $address = $form->param_value('address');

like... param_value('address') and boom, the joined-up value is yours 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so lowkey the whole point: this filter is for use with a HTML::FormFu::Element::Multi group of fields. that's it, that's the assignment.

what does it actually do? it joins the input from several fields into a single value. several little inputs walk in, one single value walks out. main character energy fr fr πŸ‘‘


πŸ’œ METHODS πŸ’œ

πŸ’« join

  • Arguments: $string
  • Default Value: ' '

this is the string used to join the individually submitted parts. and if you don't say anything? defaults to a single space. so "123" + "Main St" becomes "123 Main St" β€” cute, tidy, no notes 🌈


🌸 field_order

Inherited. bestie, go read "field_order" in HTML::FormFu::Filter::_Compound for the full details, we're not re-explaining it here, we're just showing you the glow-up πŸ’…

---
element:
  - type: Multi
    name: address

    elements:
      - name: street
      - name: number

    filter:
      - type: CompoundJoin
        field_order:
          - number
          - street

see how the elements are listed street then number, but field_order flips it to number then street? yeah. you control the order. you're in charge. slay πŸ’–


⭐ 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. free as in go off, do your thing, no cap πŸ•ŠοΈ


🌈 AUTHOR 🌈

Carl Franks <cpan@fireartist.com>


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.


bestie reminder: that license line is doing real legal work, don't paraphrase it in your own project, okay? πŸ’€

and that's the page!! this one's perl v5.28.1, dated 2019-01-12, brought to you by the HTML::FormFu::Filter::CompoundJoin(3pm) girlies ✨ mwah, go join some fields, you're gonna eat πŸ“πŸ’–

πŸ“¦ where this page comes from