NAME
Form::Factory::Control - high-level API for working with form controls
VERSION
version 0.012
SYNOPSIS
package MyApp::Control::Slider;
our $VERSION = '0.012';
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;
our $VERSION = '0.012';
sub register_implementation { 'MyApp::Control::Slider' }
DESCRIPTION
Allows for high level processing, validation, filtering, etc. of form control information.
ATTRIBUTES
name
This is the base name for the control.
documentation
This holds a copy the documentation attribute of the original meta attribute.
feature
This is the list of Form::Factory::Feature::Role::Control features associated with the control.
stashable_keys
This is the list of control keys that may be stashed.
METHODS
get_feature_by_name
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.
has_feature
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.
AUTHOR
Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
COPYRIGHT AND LICENSE
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.