| HTML-FormFu documentation | Contained in the HTML-FormFu distribution. |
HTML::FormFu::Plugin - base class for plugins
Plugins can be added to a form or any element to modify their behaviour. Some plugins should only be added to either a form, or an element, depending on their design.
Plugins can override any of the following method stubs.
Only plugins added to a form or a field element inheriting from
HTML::FormFu::Element::_Field will have their process method run.
For form plugins, is called during process in HTML::FormFu, before process
is called on any elements.
For field plugins, is called during the field's process call.
For form plugins, is called immediately after pre_process
is run on the elements.
For element plugins, is called before pre_process is run on form plugins.
For form plugins, is called immediately before process in HTML::FormFu returns.
For element plugins, is called before post_process is run on form plugins.
Only plugins added to a form will have their render method run.
Is called during render in HTML::FormFu before the render_method in HTML::FormFu is called.
Only plugins added to a form will have their post_render method run.
Is called during render in HTML::FormFu immediately before render in HTML::FormFu return.
Is passed a reference to the return value of render_method in HTML::FormFu.
Carl Franks, cfranks@cpan.org
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
| HTML-FormFu documentation | Contained in the HTML-FormFu distribution. |
package HTML::FormFu::Plugin; use Moose; with 'HTML::FormFu::Role::HasParent', 'HTML::FormFu::Role::Populate'; use HTML::FormFu::ObjectUtil qw( form parent ); use Scalar::Util qw( refaddr reftype ); use Carp qw( croak ); has type => ( is => 'rw', traits => ['Chained'] ); sub pre_process { } sub process { } sub post_process { } sub render { } sub post_render { } sub clone { my ($self) = @_; my %new = %$self; return bless \%new, ref $self; } __PACKAGE__->meta->make_immutable; 1; __END__