
Form::Factory::Action::Meta::Attribute::Control - Form control attribute-traits

version 0.020

package MyApp::Action::Foo;
use Form::Factory::Processor;
has_control name => (
control => 'text',
placement => 1,
options => {
label => 'The Name',
},
features => {
required => 1,
length => {
maximum => '20',
},
},
);

Any control attribute created with the "has_control" in Form::Factory::Processor subroutine, will have this trait assigned.

This is the sort order of the controls in an action. Normally, controls will be sorted in the order they appear in the class definition, but this lets you modify that. This is mostly useful when an action is composed of different roles or inherits controls from a parent class. This allows you to order your controls relative to the controls defined in the other classes.
This is the short name of the control. See "CONTROLS" in Form::Factory::Interface for a list of built-in controls.
This is a hash of options to pass to the control constructor.
This is a hash of feature definitions to attach ot the control. Each key is the short name of a control-feature to attach. The value is either a "1" to indicate no additional arguments or a hash reference of arguments to pass to the feature's constructor.

Makes sure that features are setup properly.
Modifies the Moose::Meta::Attribute version to handle the merging of features.


Andrew Sterling Hanenkamp <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.