Form::Factory::Control - high-level API for working with form controls
version 0.008
package MyApp::Control::Slider; use Moose; with qw( Form::Feature::Control Form::Feature::Control::Role::ScalarValue ); has minimum_value => ( is => 'rw', isa => 'Num', required => 1, default => 0, ); has maximum_value => ( is => 'rw', isa => 'Num', required => 1, default => 100, ); has value => ( is => 'rw', isa => 'Num', required => 1, default => 50, ); sub current_value { my $self = shift if (@_) { $self->value(shift) } return $self->value; } package Form::Factory::Control::Custom::Slider; sub register_implementation { 'MyApp::Control::Slider' }
Allows for high level processing, validation, filtering, etc. of form control information.
This is the base name for the control.
This holds a copy the documentation attribute of the original meta attribute.
This is the list of Form::Factory::Feature::Role::Control features associated with the control.
This is the list of control keys that may be stashed.
my $feature = $control->get_feature_by_name($name);
Given a feature name, it returns the named feature object. Returns undef if no such feature is attached to this control.
undef
if ($control->has_feature($name)) { # do something about it... }
Returns a true value if the named feature is attached to this control. Returns false otherwise.
Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
<hanenkamp@cpan.org>
Copyright 2009 Qubling Software LLC.
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.
To install Form::Factory, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Form::Factory
CPAN shell
perl -MCPAN -e shell install Form::Factory
For more information on module installation, please visit the detailed CPAN module installation guide.