HTML::...Plugin(3pm)

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

πŸ’– HTML::...Plugin πŸ’–

okay bestie, so this is HTML::FormFu::Plugin, a User Contributed Perl Documentation page, and it's literally the blueprint for building plugins. Think of it as the ✨base class✨ energy β€” the blueprint every plugin inherits from. πŸŽ€


✨ NAME ✨

HTML::FormFu::Plugin β€” it's the base class for plugins, no cap. 🫢

🌸 VERSION 🌸

version 2.07 β€” that's the one, periodt.

πŸ’… DESCRIPTION πŸ’…

So here's the tea: plugins are little add-ons you can slap onto a form or onto any element to modify how they behave. That's the whole vibe. πŸ¦‹

But listen β€” some plugins are designed to only go on a form, and some are designed to only go on an element. It's giving "know your audience". Depending on how the plugin was built, it belongs in one spot, not the other. πŸ™ˆ

πŸ‘‘ METHODS πŸ‘‘

Plugins get to override any of the following method stubs. These are your little hooks, bestie β€” fill 'em in and do your thing. πŸ’–

⭐ process ⭐

okay so, real talk: only plugins that were added to a form, or to a field element that inherits from HTML::FormFu::Role::Element::Field, will actually have their process method run. Everyone else? Nothing. Silent. πŸ’€

  • For form plugins, it's called during process in HTML::FormFu, and that happens before process gets called on any of the elements.
  • For field plugins, it's called during the field's own process call.

⭐ pre_process ⭐

  • For form plugins, this fires immediately after pre_process has been run on the elements.
  • For element plugins, this fires before pre_process is run on form plugins.

⭐ post_process ⭐

  • For form plugins, this fires immediately before process in HTML::FormFu returns.
  • For element plugins, this fires before post_process is run on form plugins.

⭐ render ⭐

Only plugins that were added to a form will have their render method run. Element plugins? Not invited to this one. πŸ™ˆ

It's called during render in HTML::FormFu, before the render_method in HTML::FormFu gets called.

⭐ post_render ⭐

Again β€” only plugins added to a form will have their post_render method run.

It's called during render in HTML::FormFu, immediately before render in HTML::FormFu returns.

And guess what, it gets passed a reference to the return value of render_method in HTML::FormFu. Iconic behaviour, honestly. πŸ’…

🌈 CORE PLUGINS 🌈

The one and only core plugin on the roster:

  • HTML::FormFu::Plugin::StashValid

πŸ’œ AUTHOR πŸ’œ

Carl Franks, cfranks@cpan.org β€” thank you for your service, king. πŸ‘‘

πŸ“ LICENSE πŸ“

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. slay. ✨

πŸ’œ AUTHOR πŸ’œ

Carl Franks <cpan@fireartist.com> β€” yes bestie, he's listed twice, it's a whole moment.

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 was generated from perl v5.28.1, dated 2019-01-12, for HTML::...Plugin(3pm). go forth and write plugins, you absolute main character. πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from