HTML-FormFu-2.05000755000765000024 012775731227 12777 5ustar00nigelstaff000000000000README100644000765000024 15563312775731227 14015 0ustar00nigelstaff000000000000HTML-FormFu-2.05NAME HTML::FormFu - HTML Form Creation, Rendering and Validation Framework VERSION version 2.05 SYNOPSIS Note: These examples make use of HTML::FormFu::Model::DBIC. As of HTML::FormFu v02.005, the HTML::FormFu::Model::DBIC module is not bundled with HTML::FormFu and is available in a stand-alone distribution. use HTML::FormFu; my $form = HTML::FormFu->new; $form->load_config_file('form.yml'); $form->process( $cgi_query ); if ( $form->submitted_and_valid ) { # do something with $form->params } else { # display the form $template->param( form => $form ); } If you're using Catalyst, a more suitable example might be: package MyApp::Controller::User; use Moose; extends 'Catalyst::Controller::HTML::FormFu'; sub user : FormFuChained CaptureArgs(1) { my ( $self, $c, $id ) = @_; my $rs = $c->model('Schema')->resultset('User'); $c->stash->{user} = $rs->find( $id ); return; } sub edit : FormFuChained('user') Args(0) FormConfig { my ( $self, $c ) = @_; my $form = $c->stash->{form}; my $user = $c->stash->{user}; if ( $form->submitted_and_valid ) { $form->model->update( $user ); $c->res->redirect( $c->uri_for( "/user/$id" ) ); return; } $form->model->default_values( $user ) if ! $form->submitted; } Note: Because "process" is automatically called for you by the Catalyst controller; if you make any modifications to the form within your action method, such as adding or changing elements, adding constraints, etc; you must call "process" again yourself before using "submitted_and_valid", any of the methods listed under "SUBMITTED FORM VALUES AND ERRORS" or "MODIFYING A SUBMITTED FORM", or rendering the form. Here's an example of a config file to create a basic login form (all examples here are YAML, but you can use any format supported by Config::Any), you can also create forms directly in your perl code, rather than using an external config file. --- action: /login indicator: submit auto_fieldset: 1 elements: - type: Text name: user constraints: - Required - type: Password name: pass constraints: - Required - type: Submit name: submit constraints: - SingleValue DESCRIPTION HTML::FormFu is a HTML form framework which aims to be as easy as possible to use for basic web forms, but with the power and flexibility to do anything else you might want to do (as long as it involves forms). You can configure almost any part of formfu's behaviour and output. By default formfu renders "XHTML 1.0 Strict" compliant markup, with as little extra markup as possible, but with sufficient CSS class names to allow for a wide-range of output styles to be generated by changing only the CSS. All methods listed below (except "new") can either be called as a normal method on your $form object, or as an option in your config file. Examples will mainly be shown in YAML config syntax. This documentation follows the convention that method arguments surrounded by square brackets [] are optional, and all other arguments are required. BUILDING A FORM new Arguments: [\%options] Return Value: $form Create a new HTML::FormFu object. Any method which can be called on the HTML::FormFu object may instead be passed as an argument to "new". my $form = HTML::FormFu->new({ action => '/search', method => 'GET', auto_fieldset => 1, }); load_config_file Arguments: $filename Arguments: \@filenames Return Value: $form Accepts a filename or list of file names, whose filetypes should be of any format recognized by Config::Any. The content of each config file is passed to "populate", and so are added to the form. "load_config_file" may be called in a config file itself, so as to allow common settings to be kept in a single config file which may be loaded by any form. --- load_config_file: - file1 - file2 YAML multiple documents within a single file. The document start marker is a line containing 3 dashes. Multiple documents will be applied in order, just as if multiple filenames had been given. In the following example, multiple documents are taken advantage of to load another config file after the elements are added. (If this were a single document, the load_config_file would be called before elements, regardless of its position in the file). --- elements: - name: one - name: two --- load_config_file: ext.yml Relative paths are resolved from the "config_file_path" directory if it is set, otherwise from the current working directory. See "BEST PRACTICES" for advice on organising config files. config_callback Arguments: \%options If defined, the arguments are used to create a Data::Visitor::Callback object during "load_config_file" which may be used to pre-process the config before it is sent to "populate". For example, the code below adds a callback to a form that will dynamically alter any config value ending in ".yml" to end in ".yaml" when you call "load_config_file": $form->config_callback({ plain_value => sub { my( $visitor, $data ) = @_; s/\.yml/.yaml/; } }); Default Value: not defined This method is a special 'inherited accessor', which means it can be set on the form, a block element or a single element. When the value is read, if no value is defined it automatically traverses the element's hierarchy of parents, through any block elements and up to the form, searching for a defined value. populate Arguments: \%options Return Value: $form Each option key/value passed may be any HTML::FormFu method-name and arguments. Provides a simple way to set multiple values, or add multiple elements to a form with a single method-call. Attempts to call the method-names in a semi-intelligent order (see the source of populate() in HTML::FormFu::ObjectUtil for details). default_values Arguments: \%defaults Return Value: $form Set multiple field's default values from a single hash-ref. The hash-ref's keys correspond to a form field's name, and the value is passed to the field's default method. This should be called after all fields have been added to the form, and before "process" is called (otherwise, call "process" again before rendering the form). config_file_path Arguments: $directory_name "config_file_path" defines where configuration files will be searched for, if an absolute path is not given to "load_config_file". Default Value: not defined This method is a special 'inherited accessor', which means it can be set on the form, a block element or a single element. When the value is read, if no value is defined it automatically traverses the element's hierarchy of parents, through any block elements and up to the form, searching for a defined value. Is an inheriting accessor. indicator Arguments: $field_name Arguments: \&coderef If "indicator" is set to a fieldname, "submitted" will return true if a value for that fieldname was submitted. If "indicator" is set to a code-ref, it will be called as a subroutine with the two arguments $form and $query, and its return value will be used as the return value for "submitted". If "indicator" is not set, "submitted" will return true if a value for any known fieldname was submitted. auto_fieldset Arguments: 1 Arguments: \%options Return Value: $fieldset This setting is suitable for most basic forms, and means you can generally ignore adding fieldsets yourself. Calling $form->auto_fieldset(1) immediately adds a fieldset element to the form. Thereafter, $form->elements() will add all elements (except fieldsets) to that fieldset, rather than directly to the form. To be specific, the elements are added to the last fieldset on the form, so if you add another fieldset, any further elements will be added to that fieldset. Also, you may pass a hashref to auto_fieldset(), and this will be used to set defaults for the first fieldset created. A few examples and their output, to demonstrate: 2 elements with no fieldset. --- elements: - type: Text name: foo - type: Text name: bar
2 elements with an "auto_fieldset". --- auto_fieldset: 1 elements: - type: Text name: foo - type: Text name: bar
The 3rd element is within a new fieldset --- auto_fieldset: { id: fs } elements: - type: Text name: foo - type: Text name: bar - type: Fieldset - type: Text name: baz
Because of this behaviour, if you want nested fieldsets you will have to add each nested fieldset directly to its intended parent. my $parent = $form->get_element({ type => 'Fieldset' }); $parent->element('fieldset'); form_error_message Arguments: $string Normally, input errors cause an error message to be displayed alongside the appropriate form field. If you'd also like a general error message to be displayed at the top of the form, you can set the message with "form_error_message". To set the CSS class for the message, see "form_error_message_class". To change the markup used to display the message, edit the form_error_message template file. See "render_method". Is an output accessor. force_error_message If true, forces the "form_error_message" to be displayed even if there are no field errors. default_args Arguments: \%defaults Set defaults which will be added to every element, constraint, etc. of the given type which is subsequently added to the form. For example, to make every Text element automatically have a size of 10, and make every Strftime deflator automatically get its strftime set to %d/%m/%Y: default_args: elements: Text: size: 10 deflators: Strftime: strftime: '%d/%m/%Y' An example to make all DateTime elements automatically get an appropriate Strftime deflator and a DateTime inflator: default_args: elements: DateTime: deflators: type: Strftime strftime: '%d-%m-%Y' inflators: type: DateTime parser: strptime: '%d-%m-%Y' Pseudo types As a special case, you can also use the elements keys Block, Field and Input to match any element which inherits from HTML::FormFu::Element::Block or which does HTML::FormFu::Role::Element::Field or HTML::FormFu::Role::Element::Input. Alternatives Each elements key can contain an any list using the | divider: e.g. # apply the given class to any Element of type Password or Button default_args: elements: 'Password|Button': attrs: class: novalidate Match ancestor Each elements key list can contain a type starting with + to only match elements with an ancestor of the given type: e.g. # only apple the given class to an Input field within a Multi block default_args: elements: 'Input|+Multi': attrs: class: novalidate Don't match ancestor Each elements key list can contain a type starting with - to only match elements who do not have an ancestor of the given type: e.g. # apply the given class only to Input fields that are not in a Multi block default_args: elements: 'Input|-Multi': attrs: clasS: validate Order The arguments are applied in least- to most-specific order: Block, Field, Input, $type. Within each of these, arguments are applied in order of shortest-first to longest-last. The type key must match the value returned by type, e.g. "type" in HTML::FormFu::Element. If, for example, you have a custom element outside of the HTML::FormFu::Element::* namespace, which you load via $form->element({ type => '+My::Custom::Element' }), the key given to "default_args" should not include the leading +, as that is stripped-out of the returned type() value. Example: # don't include the leading '+' here default_args: elements: 'My::Custom::Element': attrs: class: whatever # do include the leading '+' here elements: - type: +My::Custom::Element Clashes "default_args" generates a single hashref to pass to "populate", merging arguments for each type in turn - meaning "populate" is only called once in total - not once for each type. Because scalar values are not merged - this means later values will override earlier values: e.g. # Normally, calling $field->add_attrs({ class => 'input' }) # then calling $field->add_attrs({ class => 'not-in-multi' }) # would result in both values being retained: # class="input not-in-multi" # # However, default_args() creates a single data-structure to pass once # to populate(), so any scalar values will overwrite earlier ones # before they reach populate(). # # The below example would result in the longest-matching key # overwriting any others: # class="not-in-multi" # default_args: elements: Input: add_attrs: class: input 'Input:-Multi': add_attrs: class: not-in-multi Strictness Note: Unlike the proper methods which have aliases, for example "elements" which is an alias for "element" - the keys given to default_args must be of the plural form, e.g.: default_args: elements: {} deflators: {} filters: {} constraints: {} inflators: {} validators: {} transformers: {} output_processors: {} javascript If set, the contents will be rendered within a script tag, inside the top of the form. javascript_src Arguments: $url Arguments: \@urls Adds a script tag for each URL, immediately before any "javascript" section. stash Arguments: [\%private_stash] Return Value: \%stash Provides a hash-ref in which you can store any data you might want to associate with the form. --- stash: foo: value bar: value elements element Arguments: $type Arguments: \%options Return Value: $element Arguments: \@arrayref_of_types_or_options Return Value: @elements Adds a new element to the form. See "CORE FORM FIELDS" in HTML::FormFu::Element and "OTHER CORE ELEMENTS" in HTML::FormFu::Element for a list of core elements. If you want to load an element from a namespace other than HTML::FormFu::Element::, you can use a fully qualified package-name by prefixing it with +. --- elements: - type: +MyApp::CustomElement name: foo If a type is not provided in the \%options, the default Text will be used. "element" is an alias for "elements". deflators deflator Arguments: $type Arguments: \%options Return Value: $deflator Arguments: \@arrayref_of_types_or_options Return Value: @deflators A deflator may be associated with any form field, and allows you to provide $field->default with a value which may be an object. If an object doesn't stringify to a suitable value for display, the deflator can ensure that the form field receives a suitable string value instead. See "CORE DEFLATORS" in HTML::FormFu::Deflator for a list of core deflators. If a name attribute isn't provided, a new deflator is created for and added to every field on the form. If you want to load a deflator in a namespace other than HTML::FormFu::Deflator::, you can use a fully qualified package-name by prefixing it with +. "deflator" is an alias for "deflators". insert_before Arguments: $new_element, $existing_element Return Value: $new_element The 1st argument must be the element you want added, the 2nd argument must be the existing element that the new element should be placed before. my $new = $form->element(\%specs); my $position = $form->get_element({ type => $type, name => $name }); $form->insert_before( $new, $position ); In the first line of the above example, the $new element is initially added to the end of the form. However, the insert_before method reparents the $new element, so it will no longer be on the end of the form. Because of this, if you try to copy an element from one form to another, it will 'steal' the element, instead of copying it. In this case, you must use clone: my $new = $form1->get_element({ type => $type1, name => $name1 }) ->clone; my $position = $form2->get_element({ type => $type2, name => $name2 }); $form2->insert_before( $new, $position ); insert_after Arguments: $new_element, $existing_element Return Value: $new_element The 1st argument must be the element you want added, the 2nd argument must be the existing element that the new element should be placed after. my $new = $form->element(\%specs); my $position = $form->get_element({ type => $type, name => $name }); $form->insert_after( $new, $position ); In the first line of the above example, the $new element is initially added to the end of the form. However, the insert_after method reparents the $new element, so it will no longer be on the end of the form. Because of this, if you try to copy an element from one form to another, it will 'steal' the element, instead of copying it. In this case, you must use clone: my $new = $form1->get_element({ type => $type1, name => $name1 }) ->clone; my $position = $form2->get_element({ type => $type2, name => $name2 }); $form2->insert_after( $new, $position ); remove_element Arguments: $element Return Value: $element Removes the $element from the form or block's array of children. $form->remove_element( $element ); The orphaned element cannot be usefully used for anything until it is re-attached to a form or block with "insert_before" or "insert_after". FORM LOGIC AND VALIDATION HTML::FormFu provides several stages for what is traditionally described as validation. These are: HTML::FormFu::Filter HTML::FormFu::Constraint HTML::FormFu::Inflator HTML::FormFu::Validator HTML::FormFu::Transformer The first stage, the filters, allow for cleanup of user-input, such as encoding, or removing leading/trailing whitespace, or removing non-digit characters from a creditcard number. All of the following stages allow for more complex processing, and each of them have a mechanism to allow exceptions to be thrown, to represent input errors. In each stage, all form fields must be processed without error for the next stage to proceed. If there were any errors, the form should be re-displayed to the user, to allow them to input correct values. Constraints are intended for low-level validation of values, such as "is this an integer?", "is this value within bounds?" or "is this a valid email address?". Inflators are intended to allow a value to be turned into an appropriate object. The resulting object will be passed to subsequent Validators and Transformers, and will also be returned by "params" and "param". Validators are intended for higher-level validation, such as business-logic and database constraints such as "is this username unique?". Validators are only run if all Constraints and Inflators have run without errors. It is expected that most Validators will be application-specific, and so each will be implemented as a separate class written by the HTML::FormFu user. filters filter Arguments: $type Arguments: \%options Return Value: $filter Arguments: \@arrayref_of_types_or_options Return Value: @filters If you provide a name or names value, the filter will be added to just that named field. If you do not provide a name or names value, the filter will be added to all fields already attached to the form. See "CORE FILTERS" in HTML::FormFu::Filter for a list of core filters. If you want to load a filter in a namespace other than HTML::FormFu::Filter::, you can use a fully qualified package-name by prefixing it with +. "filter" is an alias for "filters". constraints constraint Arguments: $type Arguments: \%options Return Value: $constraint Arguments: \@arrayref_of_types_or_options Return Value: @constraints See "CORE CONSTRAINTS" in HTML::FormFu::Constraint for a list of core constraints. If a name attribute isn't provided, a new constraint is created for and added to every field on the form. If you want to load a constraint in a namespace other than HTML::FormFu::Constraint::, you can use a fully qualified package-name by prefixing it with +. "constraint" is an alias for "constraints". inflators inflator Arguments: $type Arguments: \%options Return Value: $inflator Arguments: \@arrayref_of_types_or_options Return Value: @inflators See "CORE INFLATORS" in HTML::FormFu::Inflator for a list of core inflators. If a name attribute isn't provided, a new inflator is created for and added to every field on the form. If you want to load an inflator in a namespace other than HTML::FormFu::Inflator::, you can use a fully qualified package-name by prefixing it with +. "inflator" is an alias for "inflators". validators validator Arguments: $type Arguments: \%options Return Value: $validator Arguments: \@arrayref_of_types_or_options Return Value: @validators See "CORE VALIDATORS" in HTML::FormFu::Validator for a list of core validators. If a name attribute isn't provided, a new validator is created for and added to every field on the form. If you want to load a validator in a namespace other than HTML::FormFu::Validator::, you can use a fully qualified package-name by prefixing it with +. "validator" is an alias for "validators". transformers transformer Arguments: $type Arguments: \%options Return Value: $transformer Arguments: \@arrayref_of_types_or_options Return Value: @transformers See "CORE TRANSFORMERS" in HTML::FormFu::Transformer for a list of core transformers. If a name attribute isn't provided, a new transformer is created for and added to every field on the form. If you want to load a transformer in a namespace other than HTML::FormFu::Transformer::, you can use a fully qualified package-name by prefixing it with +. "transformer" is an alias for "transformers". CHANGING DEFAULT BEHAVIOUR render_processed_value The default behaviour when re-displaying a form after a submission, is that the field contains the original unchanged user-submitted value. If "render_processed_value" is true, the field value will be the final result after all Filters, Inflators and Transformers have been run. Deflators will also be run on the value. If you set this on a field with an Inflator, but without an equivalent Deflator, you should ensure that the Inflators stringify back to a usable value, so as not to confuse / annoy the user. Default Value: false This method is a special 'inherited accessor', which means it can be set on the form, a block element or a single element. When the value is read, if no value is defined it automatically traverses the element's hierarchy of parents, through any block elements and up to the form, searching for a defined value. Is an inheriting accessor. force_errors Force a constraint to fail, regardless of user input. If this is called at runtime, after the form has already been processed, you must called "process" in HTML::FormFu again before redisplaying the form to the user. Default Value: false This method is a special 'inherited accessor', which means it can be set on the form, a block element, an element or a single constraint. When the value is read, if no value is defined it automatically traverses the element's hierarchy of parents, through any block elements and up to the form, searching for a defined value. Is an inheriting accessor. params_ignore_underscore If true, causes "params", "param" and "valid" to ignore any fields whose name starts with an underscore _. The field is still processed as normal, and errors will cause "submitted_and_valid" to return false. Default Value: false FORM ATTRIBUTES All attributes are added to the rendered form's start tag. attributes # Example --- attributes: id: form class: fancy_form Is an attribute accessor. id Is an attribute short-cut. action Default Value: "" Get or set the action associated with the form. The default is no action, which causes most browsers to submit to the current URI. Is an attribute short-cut. enctype Get or set the encoding type of the form. Valid values are application/x-www-form-urlencoded and multipart/form-data. If the form contains a File element, the enctype is automatically set to multipart/form-data. Is an attribute short-cut. method Default Value: "post" Get or set the method used to submit the form. Can be set to either "post" or "get". Is an attribute short-cut. title Get or set the form's title attribute. Is an attribute short-cut. CSS CLASSES form_error_message_class Class attribute for the error message displayed at the top of the form. See "form_error_message" LOCALIZATION languages Arguments: [\@languages] A list of languages which will be passed to the localization object. Default Value: ['en'] localize_class Arguments: [$class_name] Classname to be used for the default localization object. Default Value: 'HTML::FormFu::I18N' localize loc Arguments: [$key, @arguments] Compatible with the maketext method in Locale::Maketext. locale Arguments: $locale Currently only used by HTML::FormFu::Deflator::FormatNumber and HTML::FormFu::Filter::FormatNumber. This method is a special 'inherited accessor', which means it can be set on the form, a block element or a single element. When the value is read, if no value is defined it automatically traverses the element's hierarchy of parents, through any block elements and up to the form, searching for a defined value. Is an inheriting accessor. PROCESSING A FORM query Arguments: [$query_object] Arguments: \%params Provide a CGI compatible query object or a hash-ref of submitted names/values. Alternatively, the query object can be passed directly to the "process" object. query_type Arguments: [$query_type] Set which module is being used to provide the "query". The Catalyst::Controller::HTML::FormFu automatically sets this to Catalyst. Valid values are CGI, Catalyst and CGI::Simple. Default Value: 'CGI' process Arguments: [$query_object] Arguments: [\%params] Process the provided query object or input values. process must be called before calling any of the methods listed under "SUBMITTED FORM VALUES AND ERRORS" and "MODIFYING A SUBMITTED FORM". process must also be called at least once before printing the form or calling "render" or "render_data". Note to users of Catalyst::Controller::HTML::FormFu: Because "process" is automatically called for you by the Catalyst controller; if you make any modifications to the form within your action method, such as adding or changing elements, adding constraints, etc; you must call "process" again yourself before using "submitted_and_valid", any of the methods listed under "SUBMITTED FORM VALUES AND ERRORS" or "MODIFYING A SUBMITTED FORM", or rendering the form. SUBMITTED FORM VALUES AND ERRORS submitted Returns true if the form has been submitted. See "indicator" for details on how this is computed. submitted_and_valid Shorthand for $form->submitted && !$form->has_errors params Return Value: \%params Returns a hash-ref of all valid input for which there were no errors. param_value Arguments: $field_name A more reliable, recommended version of "param". Guaranteed to always return a single value, regardless of whether it's called in list context or not. If multiple values were submitted, this only returns the first value. If the value is invalid or the form was not submitted, it returns undef. This makes it suitable for use in list context, where a single value is required. $db->update({ name => $form->param_value('name'), address => $form->param_value('address), }); param_array Arguments: $field_name Guaranteed to always return an array-ref of values, regardless of context and regardless of whether multiple values were submitted or not. If the value is invalid or the form was not submitted, it returns an empty array-ref. param_list Arguments: $field_name Guaranteed to always return a list of values, regardless of context. If the value is invalid or the form was not submitted, it returns an empty list. param Arguments: [$field_name] Return Value: $input_value Return Value: @valid_names No longer recommended for use, as its behaviour is hard to predict. Use "param_value", "param_array" or "param_list" instead. A (readonly) method similar to that of CGI's. If a field name is given, in list-context returns any valid values submitted for that field, and in scalar-context returns only the first of any valid values submitted for that field. If no argument is given, returns a list of all valid input field names without errors. Passing more than 1 argument is a fatal error. valid Arguments: [$field_name] Return Value: @valid_names Return Value: $bool If a field name if given, returns true if that field had no errors and false if there were errors. If no argument is given, returns a list of all valid input field names without errors. has_errors Arguments: [$field_name] Return Value: @names Return Value: $bool If a field name if given, returns true if that field had errors and false if there were no errors. If no argument is given, returns a list of all input field names with errors. get_errors Arguments: [%options] Arguments: [\%options] Return Value: \@errors Returns an array-ref of exception objects from all fields in the form. Accepts both name, type and stage arguments to narrow the returned results. $form->get_errors({ name => 'foo', type => 'Regex', stage => 'constraint' }); get_error Arguments: [%options] Arguments: [\%options] Return Value: $error Accepts the same arguments as "get_errors", but only returns the first error found. MODEL / DATABASE INTERACTION See HTML::FormFu::Model for further details and available models. default_model Arguments: $model_name Default Value: 'DBIC' model Arguments: [$model_name] Return Value: $model model_config Arguments: \%config MODIFYING A SUBMITTED FORM add_valid Arguments: $name, $value Return Value: $value The provided value replaces any current value for the named field. This value will be returned in subsequent calls to "params" and "param" and the named field will be included in calculations for "valid". clear_errors Deletes all errors from a submitted form. RENDERING A FORM render Return Value: $string You must call "process" once after building the form, and before calling "render". start Return Value: $string Returns the form start tag, and any output of "form_error_message" and "javascript". end Return Value: $string Returns the form end tag. hidden_fields Return Value: $string Returns all hidden form fields. PLUGIN SYSTEM HTML::FormFu provides a plugin-system that allows plugins to be easily added to a form or element, to change the default behaviour or output. See HTML::FormFu::Plugin for details. ADVANCED CUSTOMISATION By default, formfu renders "XHTML 1.0 Strict" compliant markup, with as little extra markup as possible. Many hooks are provided to add programatically-generated CSS class names, to allow for a wide-range of output styles to be generated by changing only the CSS. Basic customisation of the markup is possible via the layout and multi_layout methods. This allows you to reorder the position of various parts of each field - such as the label, comment, error messages and the input tag - as well as inserting any other arbitrary tags you may wish. If this is not sufficient, you can make completely personalise the markup by telling HTML::FormFu to use an external rendering engine, such as Template Toolkit or Template::Alloy. See "render_method" and "tt_module" for details. Even if you set HTML::FormFu to use Template::Toolkit to render, the forms, HTML::FormFu can still be used in conjunction with whichever other templating system you prefer to use for your own page layouts, whether it's HTML::Template: , Petal:
or Template::Magic: . As of HTML::FormFu v1.00, TT is no longer listed a required prerequisite - so you'll need to install it manually if you with to use the template files. render_method Default Value: string Can be set to tt to generate the form with external template files. To customise the markup, you'll need a copy of the template files, local to your application. See "Installing the TT templates" in HTML::FormFu::Manual::Cookbook for further details. You can customise the markup for a single element by setting that element's "render_method" to tt, while the rest of the form uses the default string render-method. Note though, that if you try setting the form or a Block's "render_method" to tt, and then set a child element's "render_method" to string, that setting will be ignored, and the child elements will still use the tt render-method. --- elements: - name: foo render_method: tt filename: custom_field - name: bar # in this example, 'foo' will use a custom template, # while bar will use the default 'string' rendering method This method is a special 'inherited accessor', which means it can be set on the form, a block element or a single element. When the value is read, if no value is defined it automatically traverses the element's hierarchy of parents, through any block elements and up to the form, searching for a defined value. Is an inheriting accessor. filename Change the template filename used for the form. Default Value: "form" tt_args Arguments: [\%constructor_arguments] Accepts a hash-ref of arguments passed to "render_method", which is called internally by "render". Within tt_args, the keys RELATIVE and RECURSION are overridden to always be true, as these are a basic requirement for the Template engine. The system directory containing HTML::FormFu's template files is always added to the end of INCLUDE_PATH, so that the core template files will be found. You only need to set this yourself if you have your own copy of the template files for customisation purposes. This method is a special 'inherited accessor', which means it can be set on the form, a block element or a single element. When the value is read, if no value is defined it automatically traverses the element's hierarchy of parents, through any block elements and up to the form, searching for a defined value. add_tt_args Arguments: [\%constructor_arguments] Ensures that the hash-ref argument is merged with any existing hash-ref value of "tt_args". tt_module Default Value: Template The module used when "render_method" is set to tt. Should provide an interface compatible with Template. This method is a special 'inherited accessor', which means it can be set on the form, a block element or a single element. When the value is read, if no value is defined it automatically traverses the element's hierarchy of parents, through any block elements and up to the form, searching for a defined value. render_data Usually called implicitly by "render". Returns the data structure that would normally be passed onto the string or tt render-methods. As with "render", you must call "process" once after building the form, and before calling "render_data". render_data_non_recursive Like "render_data", but doesn't include the data for any child-elements. INTROSPECTION get_fields Arguments: [%options] Arguments: [\%options] Return Value: \@elements Returns all fields in the form (specifically, all elements which have a true "is_field" in HTML::FormFu::Element value). Accepts both name and type arguments to narrow the returned results. $form->get_fields({ name => 'foo', type => 'Radio', }); Accepts also an Regexp to search for results. $form->get_elements({ name => qr/oo/, }); get_field Arguments: [%options] Arguments: [\%options] Return Value: $element Accepts the same arguments as "get_fields", but only returns the first field found. get_elements Arguments: [%options] Arguments: [\%options] Return Value: \@elements Returns all top-level elements in the form (not recursive). See "get_all_elements" for a recursive version. Accepts both name and type arguments to narrow the returned results. $form->get_elements({ name => 'foo', type => 'Radio', }); Accepts also an Regexp to search for results. $form->get_elements({ name => qr/oo/, }); get_element Arguments: [%options] Arguments: [\%options] Return Value: $element Accepts the same arguments as "get_elements", but only returns the first element found. See "get_all_element" for a recursive version. get_all_elements Arguments: [%options] Arguments: [\%options] Return Value: \@elements Returns all elements in the form recursively. Optionally accepts both name and type arguments to narrow the returned results. # return all Text elements $form->get_all_elements({ type => 'Text', }); Accepts also an Regexp to search for results. $form->get_elements({ name => qr/oo/, }); See "get_elements" for a non-recursive version. get_all_element Arguments: [%options] Arguments: [\%options] Return Value: $element Accepts the same arguments as "get_all_elements", but only returns the first element found. # return the first Text field found, regardless of whether it's # within a fieldset or not $form->get_all_element({ type => 'Text', }); Accepts also an Regexp to search for results. $form->get_elements({ name => qr/oo/, }); See "get_all_elements" for a non-recursive version. get_deflators Arguments: [%options] Arguments: [\%options] Return Value: \@deflators Returns all top-level deflators from all fields. Accepts both name and type arguments to narrow the returned results. $form->get_deflators({ name => 'foo', type => 'Strftime', }); get_deflator Arguments: [%options] Arguments: [\%options] Return Value: $element Accepts the same arguments as "get_deflators", but only returns the first deflator found. get_filters Arguments: [%options] Arguments: [\%options] Return Value: \@filters Returns all top-level filters from all fields. Accepts both name and type arguments to narrow the returned results. $form->get_filters({ name => 'foo', type => 'LowerCase', }); get_filter Arguments: [%options] Arguments: [\%options] Return Value: $filter Accepts the same arguments as "get_filters", but only returns the first filter found. get_constraints Arguments: [%options] Arguments: [\%options] Return Value: \@constraints Returns all constraints from all fields. Accepts both name and type arguments to narrow the returned results. $form->get_constraints({ name => 'foo', type => 'Equal', }); get_constraint Arguments: [%options] Arguments: [\%options] Return Value: $constraint Accepts the same arguments as "get_constraints", but only returns the first constraint found. get_inflators Arguments: [%options] Arguments: [\%options] Return Value: \@inflators Returns all inflators from all fields. Accepts both name and type arguments to narrow the returned results. $form->get_inflators({ name => 'foo', type => 'DateTime', }); get_inflator Arguments: [%options] Arguments: [\%options] Return Value: $inflator Accepts the same arguments as "get_inflators", but only returns the first inflator found. get_validators Arguments: [%options] Arguments: [\%options] Return Value: \@validators Returns all validators from all fields. Accepts both name and type arguments to narrow the returned results. $form->get_validators({ name => 'foo', type => 'Callback', }); get_validator Arguments: [%options] Arguments: [\%options] Return Value: $validator Accepts the same arguments as "get_validators", but only returns the first validator found. get_transformers Arguments: [%options] Arguments: [\%options] Return Value: \@transformers Returns all transformers from all fields. Accepts both name and type arguments to narrow the returned results. $form->get_transformers({ name => 'foo', type => 'Callback', }); get_transformer Arguments: [%options] Arguments: [\%options] Return Value: $transformer Accepts the same arguments as "get_transformers", but only returns the first transformer found. clone Returns a deep clone of the <$form> object. Because of scoping issues, code references (such as in Callback constraints) are copied instead of cloned. ATTRIBUTE ACCESSORS For the basic method, e.g. /attributes: Arguments: [%attributes] Arguments: [\%attributes] Return Value: $form As a special case, if no arguments are passed, the attributes hash-ref is returned. This allows the following idioms. # set a value $form->attributes->{id} = 'form'; # delete all attributes %{ $form->attributes } = (); All methods documented as 'attribute accessors' also have the following variants generated: *_xml can be used as a setter, and ensures that its argument is not XML-escaped in the rendered form. *_loc can he used as a setter, and passes the arguments through "localize". add_* can be used to append a word to an attribute without overwriting any already-existing value. # Example $form->attributes({ class => 'fancy' }); $form->add_attributes({ class => 'pants' }); # class="fancy pants" add_*_xml, like add_*, but ensures it doesn't get XML-escaped. add_*_loc, like add_*, but passing the arguments through "localize". del_* can be used to remove a word from an attribute value. # Example $form->attributes({ class => 'fancy pants' }); $form->del_attributes({ class => 'pants' }); # class="fancy" del_*_xml, like del_*, but ensures it doesn't get XML-escaped. del_*_loc, like del_*, but passing the arguments through "localize". Also, any attribute method-name which contains the word attributes also has aliases created for all these variants, with the word attributes replaced by attrs. # For example, the attributes() method would have all these variant # methods available $form->attributes({ class => 'fancy' }); $form->attributes_xml({ title => 'fancy' }); $form->attributes_loc({ title => 'fancy' }); $form->add_attributes({ class => 'fancy' }); $form->add_attributes_xml({ title => 'fancy' }); $form->add_attributes_loc({ title => 'fancy' }); $form->del_attributes({ class => 'fancy' }); $form->del_attributes_xml({ title => 'fancy' }); $form->del_attributes_loc({ title => 'fancy' }); # Because the method contains the word 'attributes', it also gets the # following short-forms $form->attrs({ class => 'fancy' }); $form->attrs_xml({ title => 'fancy' }); $form->attrs_loc({ title => 'fancy' }); $form->add_attrs({ class => 'fancy' }); $form->add_attrs_xml({ title => 'fancy' }); $form->add_attrs_loc({ title => 'fancy' }); $form->del_attrs({ class => 'fancy' }); $form->del_attrs_xml({ title => 'fancy' }); $form->del_attrs_loc({ title => 'fancy' }); ATTRIBUTE SHORT-CUTS All methods documented as 'attribute short-cuts' are short-cuts to directly access individual attribute key/values. # Example $form->id( 'login' ); $id = $form->id; # is equivalent to: $form->attributes({ id => 'login' }); $id = $form->attributes->{id}; All attribute short-cuts also have a *_xml variant. # Example $form->id_xml( $xml ); # is equivalent to: $form->attributes_xml({ id => $xml }); All attribute short-cuts also have a *_loc variant. # Example $form->title_loc( $key ); # is equivalent to: $form->attributes_loc({ title => $key }); INHERITING ACCESSORS All methods documented as 'inheriting accessors' can be set on the form, a block element or a single field element. When the value is read, if no value is defined it automatically traverses the element's hierarchy of parents, searching for a defined value. All inherited accessors also have a *_no_inherit variant, which can be used as a getter to fetch any defined value, without traversing the hierarchy of parents. This variant cannot be used as a setter. E.g., the "auto_id" has a variant named auto_id_no_inherit. OUTPUT ACCESSORS All methods documented as 'output accessors' also have *_xml and *_loc variants. The *_xml variant can be used as a setter, and ensures that its argument is not XML-escaped in the rendered form. The *_loc variant can be used as a setter, and passes the arguments through "localize". E.g., the label method has variants named label_xml and label_loc. BOOLEAN ATTRIBUTE ACCESSORS To support boolean attributes, whose value should either be equal to the attribute name, or empty. Any true value will switch the attribute 'on', any false value will remove the attribute. # Example $field->autofocus(1); # equivalent to: $field->attributes({ autofocus => 'autofocus' }); $field->autofocus(0);; # equivalent to: delete $field->attributes->{autofocus}; ATTRIBUTE SUBSTITUTIONS Some attributes support character substitutions: the following substitutions are possible: %f # $form->id %n # $field->name %t # lc( $field->type ) %r # $block->repeatable_count %s # $error->stage These allow each field to have consistent attributes, while remaining unique. DEPRECATION POLICY We try our best to not make incompatible changes, but if they're required we'll make every effort possible to provide backwards compatibility for several release-cycles, issuing a warnings about the changes, before removing the legacy features. RESTORING LEGACY HTML CLASSES v1.00 dropped most of the default HTML class-names, with the intention that each application should define just what it needs, without needing to reset unwanted options first. We also gain the benefit of less markup being generated, speeding up both render and HTTP transfers. To restore the previous behaviour, set the following options. If you're using best practices, you'll only need to set these once per-application in your app-wide config file. --- auto_container_class: '%t' auto_container_label_class: 'label' auto_container_comment_class: 'comment' auto_comment_class: 'comment' auto_container_error_class: 'error' auto_container_per_error_class: 'error_%s_%t' auto_error_class: 'error_message error_%s_%t' DEPRECATED METHODS See "DEPRECATED METHODS" in HTML::FormFu::Role::Element::Field. REMOVED METHODS See also "REMOVED METHODS" in HTML::FormFu::Element. element_defaults Has been removed; see "default_args" instead. model_class Has been removed; use "default_model" instead. defaults_from_model Has been removed; use "default_values" in HTML::FormFu::Model instead. save_to_model Has been removed; use "update" in HTML::FormFu::Model instead. BEST PRACTICES It is advisable to keep application-wide (or global) settings in a single config file, which should be loaded by each form. See "load_config_file". COOKBOOK HTML::FormFu::Manual::Cookbook UNICODE HTML::FormFu::Manual::Unicode EXAMPLES vertically-aligned CSS The distribution directory examples/vertically-aligned contains a form with example CSS for a "vertically aligned" theme. This can be viewed by opening the file vertically-aligned.html in a web-browser. If you wish to experiment with making changes, the form is defined in file vertically-aligned.yml, and the HTML file can be updated with any changes by running the following command (while in the distribution root directory). perl examples/vertically-aligned/vertically-aligned.pl This uses the Template Toolkit file vertically-aligned.tt, and the CSS is defined in files vertically-aligned.css and vertically-aligned-ie.css. SUPPORT Project Page: http://code.google.com/p/html-formfu/ Mailing list: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu Mailing list archives: http://lists.scsys.co.uk/pipermail/html-formfu/ IRC: irc.perl.org, channel #formfu The HTML::Widget archives http://lists.scsys.co.uk/pipermail/html-widget/ between January and May 2007 also contain discussion regarding HTML::FormFu. BUGS Please submit bugs / feature requests to http://code.google.com/p/html-formfu/issues/list (preferred) or http://rt.perl.org. PATCHES To help patches be applied quickly, please send them to the mailing list; attached, rather than inline; against subversion, rather than a cpan version (run svn diff > patchfile); mention which svn version it's against. Mailing list messages are limited to 256KB, so gzip the patch if necessary. GITHUB REPOSITORY This module's sourcecode is maintained in a git repository at git://github.com/fireartist/HTML-FormFu.git The project page is https://github.com/fireartist/HTML-FormFu SEE ALSO HTML::FormFu::Imager Catalyst::Controller::HTML::FormFu HTML::FormFu::Model::DBIC AUTHORS Carl Franks CONTRIBUTORS Brian Cassidy Ozum Eldogan Ruben Fonseca Ronald Kimball Daisuke Maki Andreas Marienborg Mario Minati Steve Nolte Moritz Onken Doug Orleans Matthias Dietrich Dean Hamstead Karen Etheridge Nigel Metheringham Based on the original source code of HTML::Widget, by Sebastian Riedel, sri@oook.de. LICENSE This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. PERL GAME Play the MMO written in perl: http://www.lacunaexpanse.com! Changes100644000765000024 7104212775731227 14377 0ustar00nigelstaff000000000000HTML-FormFu-2.052.05 2016-10-07 15:34:52+01:00 Europe/London - Release machinery - dzil transition to @Starter and simplification 2.04 2016-09-30 - HTML::FormFu::Validator::Callback now passes the $params hash to callback subs. - No longer use Test::Aggregate - RT#117137 - Update list of contributors - Code tidying (Karen Etheridge):- - remove duplicate "use" lines - remove unused exports - use subs from List::Util preferentially (which is in core) - fix some pod markup - properly document core validators (RT#118022) - preserve the exception message in case of validation error - Spelling fixes from Debian - RT#115812 - [Release of 2.04 was a trial/devel release only] 2.03 2016-06-24 - Bug fix: RT#109159 Number formatting tests can fail - Bug fix: RT#112582 Date tests fail on leap day - Minor packaging fixups 2.02 2016-06-01 - Public release of 2.02 2.01_03 2016-05-25 - cleanup unused modules and functions - fix indirect object notation - add label functionality - ensure disabled attributes are ignored - strip excessive/trailing whitespace - fix inflator bug RT76034 - avoid warnings from CGI - enable more author/release tests - it language fixes - Remove link to old website - now unrelated/NSFW - avoid emitting unecessary warnings - enable use of Travis CI & coverage tests - fixes to ensure we pass all the additional author tests 2.01 2014-05-05 - Avoid uninitialized warning 2.00 2014-04-11 - New layout() method for customizing output of fields. Any custom elements which override string() will likely need modified. - Deprecated: reverse_single() and reverse_multi() are deprecated, and warn when used. If the new layout() is used, and there is no simple way to replicate the behaviour, these methods will have no affect. - TT template files changed - update them if you use a local copy. Files updated: field New files: field_layout, field_layout_block, field_layout_checkboxgroup_field, field_layout_comment, field_layout_contentbutton_field, field_layout_errors, field_layout_field, field_layout_javascript, field_layout_label, field_layout_label_field, field_layout_label_text, field_layout_multi_field, field_layout_parser, field_layout_select_field, field_layout_textarea_field. Files deleted due to layout() changes: checkboxgroup_tag, content_button, errors, input, input_tag, label, label_element, multi, select_tag, textarea_tag Unused files deleted: checkboxgroup. - New Filter::ForceListValue addresses rt bug #90813 - render_label() and render_field() no longer require TT. Include render_label() in tests. - Fix typo in I18N::ja (Yusuke Watase). - Bundle our own (renamed) copy of MooseX::Attribute::Chained to avoid warnings under perl 5.19.x 1.00 2013-12-16 - TT template files changed - update them if you use a local copy. Template file 'label_tag' renamed to 'label_element' - old file can be deleted. 'field' file changed. New 'errors' file. - TT no longer listed as a prerequisite. If you use the TT files, you must add 'Template' to your own app's prereqs. - Element::reCAPTCHA and Constraint::reCAPTCHA moved out to separate distribution. - HTML::FormFu::MultiForm moved out to separate distribution. - auto_container_class(), auto_label_class(), auto_comment_class(), auto_container_error_class(), auto_container_per_error_class(), auto_error_class() no longer have default values. See "RESTORING LEGACY HTML CLASSES" in HTML::FormFu docs to restore previous behaviour. - auto_label_class() no longer adds class to container. auto_label_class() now adds class to label tag. new auto_container_label_class() adds class to container. See "RESTORING LEGACY HTML CLASSES" in HTML::FormFu docs to restore previous behaviour. - auto_comment_class() no longer adds class to both container and comment. auto_comment_class() now only adds class to comment tag. new auto_container_comment_class() adds class to container. See "RESTORING LEGACY HTML CLASSES" in HTML::FormFu docs to restore previous behaviour. - Bug fix: param_value() form method now matches documented behaviour - returns undef when field has errors. (Reported by Hailin Hu). - New Element::Email and Element::URL HTML5 input fields. - Role::Element::Input has new datalist_options(), datalist_values(), datalist_id() and auto_datalist_id() methods to support HTML5 datalists. auto_datalist_id() is an inherited accessor which can be set on the Form, MultiForm, or Block. - Form and Elements has new title() attribute short-cut. - Constraint::Regex has new anchored() accessor. - New Input attribute accessors: placeholder(), pattern(), autocomplete(). - New Input boolean attribute accessors: autofocus(), multiple(), required(). - New Field inherited accessors: auto_container_per_error_class(), auto_error_container_class(), auto_error_container_per_error_class(), error_tag(), error_container_tag - Constraints have new experimental method fetch_error_message(). - All field elements have new method error_filename(). - default_args() now supports 'Block', 'Field', 'Input' pseudo-elements, '|' alternatives, and '+' and '-' ancestor modifiers. - New Czech (cs) I18N translation by Jan Grmela. - mk_inherited_accessors() now also creates a *_no_inherit() method. - Experimental new roles() form method. - form methods start(), end() now respect render_method - no longer force use of tt templates. - Bug fix: del_attribute() on empty attribute no longer sets the attribute. - All attribute accessors generated with mk_attrs() now have *_loc variants. - form methods start(), end() now respect render_method - no longer force use of tt templates. - Tests now always require Test::Aggregate::Nested. Re-enable aggregate tests on Win32. Don't run all tests twice under both aggregate and t/ (doh!) 0.09010 2012-10-05 - Internal changes - all Repeatable/nested_name munging is moved out of HTML::FormFu::Element::Repeatable into individual constraints 0.09009 2012-09-29 - Make sure object can('checked') before calling checked() (colinnewell) - Updated Repeatable control to update id_field on DBIC::Unique if present - ComboBox new get_select_field_nested_name(), get_text_field_nested_name() accessors. - Fieldset new legend_attributes() method. - New form_error_message_class() method. - Constraint 'when' callback now receives $constraint as 2nd argument. 0.09007 2012-01-23 - bump MooseX::Attribute::Chained version 0.09006 2012-01-23 - fixed deprecation warnings of MX::Attribute::Chained (bricas) - Added placeholder attributes for types Text and Textarea with L10N support. - Added L10N support for 'prefix' attributes for types Date and DateTime. - Added 'attributes' support to types Date and DateTime. 0.09005 2011-09-06 - bump version of prereq CGI to 3.37 to make all tests pass 0.09004 2011-08-26 - skip aggregate.t on Win32 - no functional changes to HTML::FormFu 0.09003_02 2011-08-25 - disable Test::Aggregate on Win32 0.09003_01 2011-05-11 - using Test::Aggregate for the test suite if installed tests finish now in seconds instead of minutes 0.09003 2011-05-10 - fixed regression in Model::HashRef introduced in 0.09000 0.09002 2011-03-21 - Hopefully fix IO::Interactive dependency properly 0.09001 2011-03-31 - Fix IO::Interactive dependency 0.09000 2011-03-29 - Codebase changed to use Moose - massive internal changes - any custom Elements, Constraints, etc will require changes. See advice on mailing list: http://www.mail-archive.com/html-formfu@lists.scsys.co.uk/msg02325.html Or ask for help on the mailing list: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu - Bug fix: was a fatal error when a value was submitted for Label element (code called delete_nested_hash_value instead of deleted_nested_hash_key). - Bug fix: RT#65728 Filter::Split shouldn't return a value if no value was submitted. - Bug fix: Element::Date now uses default() in preference to default_natural(). RT#65727 - DateTime elements, minutes and seconds have new 'interval' option. - Now only delete submitted value if there's no other field on the form with the same name. - load_config_file(stem) now honours the include path order, to mimic TT behaviour. 0.08002 2010-09-22 - Incompatible Change: removed all previously deprecated methods. - Incompatible Change: HTML::FormFu::QueryType::Catalyst File uploads under Catalyst no longer have copy_to(), link_to() and catalyst_upload() methods - Deprecated passing multiple arguments to many methods, where they were being implicitly converted to a hash-ref or array-ref. A warning is now issued. - Fix: Constraint::Equal with not(1) set no longer sets an error when both field values are empty strings. - Fix: An empty block with nested_name set, containing Label elements and no other fields, was causing the block's nested_name to be added to $form->valid(). RT #54967 - Constraints that inherit from HTML::FormFu::Constraint::_others have a new 'other_siblings' option, which auto-generates the 'others' list. - Constraint 'when' condition now supports new 'fields' and 'any_field' options. - Bumped required version of DateTime to 0.54 - needed to pass tests under Test::More 0.96. 0.07003 2010-08-02 - Fix: Group element now escapes each items attributes, label_attributes and container attributes (based on by patch by Jeff Dairiki). - Fix: If using default_natural, use default_datetime_args{set_time_zone} if it's also set (Radek). - Filter::HTMLScrubber extra functionality. - Update _merge_hashes() so it can also merge arrays and hashes into a new array. This is necessary to allow default_args() to define a different ref-type than the element or processor which uses its values. - Update Element::reCAPTCHA tests after changes to Captcha::reCAPTHCA (bump dependency version). 0.07002 2010-06-24 - Fix: Use MRO::Compat before mro to support perl 5.8 - Fix: Date and ComboBox elements need to run deflators before trying to use any default value - reported by Matija Grabnar. - Overloading comparisons no longer assume both arguments are a blessed object - change needed for latest Test::More (Test-Simple-0.95_02) (RT#57747) - Change Element::Date to not use deprecated DateTime::Locale methods. - Bump DateTime::Locale and DateTime::Format::Strptime required versions as DateTime::Locale Changes file has no mention of when the methods we're now using were added. - Removed Regexp::Copy from prereqs. 0.07001 2010-05-16 - No changes - cpan indexer failed for last release 0.07000 2010-05-16 - Change of behaviour: default_args() values are now applied to any object inheriting from the specified type, rather than just an instance of that type. Old behaviour is still supported with a minor change, see docs for details. - (Daniel Hilton) - Change of behaviour: default_args() key/values are now applied in order of inheritance, rather than the random order returned by keys() - New reverse_single attribute for all field elements. New reverse_group attribute for Checkboxgroup and Radiogroup elements. (Ronald Kimball) - New default_datetime_args() method on Date and DateTime elements. - Element::DateTime now supports a 'second' select menu. - Allow empty string as default value for Date element. (Ronald Kimball) - Now use Clone instead of Storable (ntyni@iki.fi). - Change from Class::C3 to mro, to get built-in support in perl >= 5.9 - New Bulgarian translation (Kamen Naydenov). - Fix bad links and markup in POD. (Ronald Kimball) - Fix spelling errors in POD (Ansgar Burchardt) - Documented Element::Textarea cols() and rows() methods. - Bump Config::Any requirement to version 0.18 for YAML::XS support - Refactored ObjectUtil (Daniel Hilton) 0.06001 2010-01-08 - Fixed issue with Model::HashRef where form fields with an underscore and overlapping name (e.g. 'foo' and 'foo_bar') were causing problems - Fix test suite year issue. 0.06000 2009-12-10 - New get_parent() method that traverses the parent hierarchy, returning the first parent that matches the supplied options. - Date element, year menu now supports 'reverse' option to reverse order of year list. - patch from Ozum Eldogan. - New Element::Block method auto_block_id(). - New only_on_reps() method for constraints on fields within a Repeatable element. Causes the constraint to only be run if the field's repeatable_count() matches one of the set values. - New Repeatable::Any constraint. - Bugfix: after submission, group-type fields were getting the wrong value when multiple fields had the same name. - patch by Doug Orleans. - Bugfix: If a field in a Repeatable block had an error, all copies of that field were displaying the error. - report by Doug Orleans. - Repeatable elements inside a Repeatable element, now works without having nested_name set. - Performance fix: change all uses of eval() to check for array/hash-refs to Scalar::Util::reftype() instead. - Was causing a hit for group-type fields with large numbers of options. - initial patch by Steve Nolte. - Bump required version of Data::Visitor to 0.26 - Minor pod fixes. 0.05004 2009-12-02 - No changes - last release was built on Windows and didn't pass pause's indexer checks. 0.05003 2009-11-29 - Fix YAML test files for YAML::XS compatibility 0.05002 2009-11-25 - Fix handling of counter_name in nested-repeatables. - Element::reCAPTCHA new constraint_args() method to pass options to the automatically-created Constraint::reCAPTCHA. - Model::HashRef->create() now works with submitted input. - Kwalitee updates. (RT #47998) - Pod fixes. (RT #49120, #49114, #46363) 0.05001 2009-07-03 - get_field(s), get_element(s), get_all_elements() now support a Regex object for any conditional argument. - Model::Hashref now searches for Multi and Repeatable elements using the regexes qr/Multi/ and qr/Repeatable/ to all for custom/derived classes. - New $form->add_localize_object_from_class() method. - New Element::Label. - Bugfix: DateTime element, hour/minute select menus didn't display correct value when hour/minute value was less than 10, and $form->process() wasn't called after $form->model->default_values(). - Silence "undef value in string eq" warnings. 0.05000 2009-05-26 - Nested repeatable blocks now create field names such as 'foo_1.bar_1' rather than 'foo.bar_1_1', to assist client-side scripting. 0.04002 2009-05-08 - Incompatible Change: Element::Repeatable->repeat() now defaults to 1 instead of 0. This allows empty Repeatables. - Fix test failures on Win32. - During Element::Repeatable->process() call children's process() before $self->repeat(). - Support nested Repeatable elements. - Ensure plugins are correctly cloned. 0.04001 2009-04-15 - Fix handling of arguments to plugin(). - HTML::FormFu::Model::HashRef supports now empty repeatable elements. - vertically-aligned CSS example updated. 0.04000 2009-03-26 - Incompatible Change: plugins process() method is now run *after* elements' process() method. - Incompatible Change: Button element no longer sets retain_default(1) - now sets force_default(1). Fixes bug where multiple buttons with same name were getting the wrong value after being redisplayed after errors. - New pre_process() plugin method that runs at the same time as the old process() hook. - New Model::HashRef. - New inherited method locale() available on forms, blocks and fields. - New Element::Number. - New Deflators: FormatNumber, PathClassFile, Callback. - New Filter::FormatNumber. - New Inflator::Callback. - New Norwegian I18N translation. - Updated vertically-aligned CSS. - config_file_path() now supports a list of directories. - Checkboxgroup + Radiogroup elements others() method now supports 'container_attributes' hash-key - Constraint when() condition no longer demands a 'value' or 'values' key - if it's missing, the constraint will pass on any true value. - Bugfix: _Group elements - ensure 'empty_first' gets set before any 'options', 'values', 'value_range'. - Bugfixes for constraint attach_errors_to_base(), attach_errors_to_others(). - Bugfix: Repeatable blocks now correctly rename nested-names in constraints' others(). - Bugfix: Repeatable blocks now rename field names in constraints' when(). - Bugfix: Repeatable blocks now reparent fields' plugins. 0.03007 2008-12-08 - Remove Test::Aggregate - seeing test failures under perl 5.8.x 0.03006 2008-12-03 - New DateTime element. - New MinRange, MaxRange, File::MinSize, File::MaxSize constraints to provide more specific error messages. - New File::Size constraint methods: min_kilobyte(), max_kilobyte(), min_megabyte(), max_megabyte(). - New config_file_path() method, used by load_config_file() and load_config_filestem(). - New field_order() method for Date elements. - New I18N translations for Romanian, Russian, Ukranian. - New MultiForm system for multi-page forms (not yet documented, file upload tests skipped due to test problems on MS Win32). - Length, Range and File::Size constraints now pass min() and max() values as I18N args, for use in strings. - DependOn and Equal constraints now pass the root field label as I18N arg, for use in strings. - Checkbox + Radio elements now default to value(1). - Constraint when() method now works with nested_names(). - Using test aggregate to speed-up tests. 0.03005 2008-09-08 - New ComboBox element. - Don't use Pod::Help - some people were getting test failures. 0.03004 2008-09-03 - New reCAPTCHA element. - New pt_br (Brazilian Portuguese) translation from Daniel Nicoletti. - New load_config_filestem() method for loading config files without having to specify the file extension. - New html_formfu_dumpconf.pl script, for viewing config files structure. - Assorted optimizations, providing over 20% runtime speedup. - Radio element now inherits from Checkbox, to remove duplicated code. - Radiogroup element now inherits from Checkboxgroup, to remove duplicated code. - checkboxgroup_tag template file has been removed - Checkboxgroup now just uses radiogroup_tag file. - All non-english I18N packages now correctly "use utf8;" - load_config_file() now switches on Config-General's UTF8, so that files are correctly decoded. - Regex filter now has an eval() method, which if true, eval's the contents of replace(), to allow the use of $1 variables or any other perl expression. - Allow languages() to be a single value, rather than just an arrayref. - CompoundJoin filter now ignores empty values. - examples/unicode updated. - Manual-Unicode cat. config examples changed to use MyApp->config(). - Stop warnings for undefined attributes - reported by Rod Taylor. - Documentation improvements by Ansgar Burchardt. 0.03003 2008-08-21 - Form and elements inside template files now have access to original object via self.object - Having a named Multi block within a Block with nested_name set, now works. - New Element method is_block() which is true for Block elements. - Multi no longers sets is_field(0) - it's now true for both is_field() and is_block(). - prereqs - set minimum version of Exporter.pm that exports import() 0.03002 2008-08-11 - Deprecate element_defaults() method. - New default_args() method. - New CompoundSprintf filter. - New DateTime constraint. - New field method default_empty_value(). - New I18N translations for Danish, French and Italian. - Added time_zone support to Inflator::DateTime - Documented that process() must be called before render() - this has been the case since 0.03000. 0.03001 2008-06-20 - Require version 0.38 of DateTime, for string overloading support. 0.03000 2008-06-19 - Field container_tag() now defaults to 'div' rather than 'span' to provide better layout without CSS. - Multi block no longer sets container_tag() to 'span' - defaults to 'div'. - HTML::FormFu::Model::DBIC moved out into a separate distribution. - Models now accessed through new form method: model(), with accompanying methods: default_model() and model_config. - Deprecated form methods: model_class(), defaults_from_model(), save_to_model(). - Model methods renamed to: default_model(), default_values() and update(). - New model method: create(). - Deprecated element method: db(). - Bugfixes for perl 5.10.0 (missing imports). - Bugfix: insert_before() and insert_after() now check if the object is already a child, and if so, removes it first. Reported by Ferruccio Zamuner. - Bugfix: update() many_to_many multi-value fields where 'default_column' included the table name (or 'me.') failed. - Bugfix: make inflators work with multiple submitted values. - Bugfix for Bool constraint: use '?' quantifier, not '*'. - Bugfix in Email constraint: ensure Email::Valid->address() is called in scalar context. - New Split and CompoundJoin filters. - New CompoundDateTime inflator. - New CompoundSplit and CompoundDateTime deflators. - New Plugin system (see tests, not yet documented) and StashValid plugin. - New form methods: stash_valid(), params_ignore_underscore() and tmp_upload_dir(). - New method for _Group fields: empty_first_label(). - Multi->render_data() now builds itself before it's children, so that deflators on the Multi work. - insert_before() and insert_after() now first removes the object if it's already a child of the target. - Callback filter and transformers now receive $params as a 2nd argument. - _Group field options() now supports value_xml, value_loc, label_xml and label_loc args. - get_* methods (fields, elements, constraints, etc) now accept any valid method-name as a search parameter. - add default_natural() method to Date element, allowing the use of DateTime::Format::Natural to parse dates such as "today" or "yesterday". - when() method for Constraints can now accept a callback - Transformer callbacks now get $params as second argument (as Constraints aready were getting) - Form method add_valid() now expects a full nested-name. - auto_id() now translates "%n" into the full nested-name. - Add a END block to DBICTestLib that cleans up the t/test.db 0.02004 2008-02-22 - Incompatible Change: $upload->headers no longer returns a hashref, it now returns a HTTP::Headers object. Tests for $upload->headers->{'Content-Type'} changed to $upload->headers->content_type. Tests for $upload->headers->{'Content-Length'} changed to $upload->headers->content_length. - Catalyst upload object now provides basename(), copy_to(), link_to(), size(), tempname() and type() methods which delegate to the Catalyst::Request::Upload object. - The original Catalyst::Request::Upload objects can be retrived with the catalyst_upload() method. - CGI and CGI::Simple upload objects provide size() and type() methods. - New Constraints: File::Size, File::MIME and File. - 'Required' and other constraints now work with file uploads. - Spanish I18N added. - Support for DBIx::Class schema methods which don't correspond to a database column or relationship. - Fixed test failures due to hardcoded date element output expecting the year 2007. - Fixed circular references in upload objects. 0.02003 2007-12-20 - Bugfix for has-many rels in defaults_from_model() - Added Template.pm back into prereqs - Repeatable element, increment_field_names() is now true by default - Fixed javascript rendering in _Field 0.02002 2007-12-12 - Fixes required for perl 5.10.0 0.02001 2007-12-12 - Bugfix for save_to_model() in HTML::FormFu::Model::DBIC 0.02000 2007-12-12 - New HTML::FormFu::Model::DBIC module to replace DBIx::Class::HTML::FormFu - New Repeatable block element - New "nested" params support. Form and Block elements have a new nested_name() method. Field elements have new nested(), nested_name() and nested_names() methods. Doesn't require CGI::Expand or Catalyst::Plugin::NestedParams - Uses new "string" renderer by default - doesn't use template files, Generated markup still exactly the same, Set render_method("tt") to use the template files (old behaviour), render_class_args() renamed to tt_args(), Template files now installed into @INC path by File::ShareDir, INCLUDE_PATH no longer set by default - New Checkboxgroup element. Works much like Radiogroup, but with checkboxes - Support multiple yaml documents in a single file - calls populate() once for each document - Date element now uses names of the form "date_day" instead of "date.day", so as to not conflict with the new nested-params. This should only affect you if your client-side code (CSS, JS) references the field names - Group elements (Select, Radiogroup, Checkboxgroup) now support a 'label_loc' argument, to provide the item labels via localize() - *_loc() methods now accept an arrayref argument, to allowing setting in YAML config files - render() now returns a string, not an object. $form->render->start_form() must be changed to $form->start(), $form->render->end_form() must be changed to $form->end, $form->render->field('foo') must be changed to $form->get_field('foo'), $form->render->hidden_fields() must be changed to $form->hidden_fields() - Bugfix: OutputProcessor::Indent was indenting closing tag, when it's value was empty (RT 30239) - Bugfix: Objects were getting wrong parents during clone() and auto_fieldset() 0.01006 2007-10-23 - render_class_args->{INCLUDE_PATH} now defaults to 'root' if it's not set - previously was only set if the entire render_class_args hashref was empty - New StripWhitespace OutputProcessor - New CopyValue Filter - New Cookbook and Unicode manual pages - New unicode example Catalyst application - New portuguese I18N translation - Callback Filters, Constraints and Validators now accept a fully qualified subroutine name instead of a code-ref - Date element month names from DateTime::Locale are run through ucfirst - Documentation improvements - Bugfix: forced errors are now displayed 0.01005 2007-09-21 - New Indent "output processor" to pretty-print output - New force_default() method on fields - New when() method for all Constraints - Behaviour change for MinMaxFields Constraint 0.01004 2007-09-12 - New html_formfu_deploy.pl helper program - AutoSet Constraint now works with Select optgroups - Added vertically-aligned CSS example - Fix circular reference / memory leak - Documentations fixes / additions - require v0.7901 of DateTime::Format::Builder to fix memory leak 0.01003 2007-08-22 - Add missing prereq to Makefile.PL 0.01002 2007-08-22 - Fixed missing imports causing errors with perl 5.9.x 0.01001 2007-08-22 - First non-dev release - All Element names now follow CamelCase convention - Key format of I18N files changed - New Date element - Use Class::C3 instead of SUPER - Automatically set UTF-8 encoding on TT - Support for Template::Alloy instead of TT 0.01000_02 2007-07-02 - Updated templates in tt_files.pm - 0.01000_02 was out of date 0.01000_02 2007-07-02 - Added YAML::Syck to dependencies - Pod fix 0.01000_01 2007-06-29 - First CPAN dev release LICENSE100644000765000024 4365212775731227 14117 0ustar00nigelstaff000000000000HTML-FormFu-2.05This software is copyright (c) 2016 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. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2016 by Carl Franks. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2016 by Carl Franks. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End dist.ini100644000765000024 611112775731227 14523 0ustar00nigelstaff000000000000HTML-FormFu-2.05name = HTML-FormFu author = Carl Franks license = Perl_5 copyright_holder = Carl Franks copyright_year = 2016 main_module = lib/HTML/FormFu.pm [Prereqs] ;;; Although we believe this will work on perl 5.8 versions, other dependancies ;;; such as Number::Format have been forcing a minimum version of 5.10 since ;;; 2011. Testing new versions against 5.8.x is getting impractical ;;perl = 5.008001 perl = 5.010 ; this is the lowest version of Exporter I can identify that exports import() ; it's bundled with perl 5.83 ; version 5.567 that ships with perl 5.82 is no good Exporter = 5.57 Carp = 0 Class::MOP::Method = 0 Clone = 0.31 Config::Any = 0.18 ; 0.10 - supports multi-doc config files ; 0.18 - prefers YAML::XS for YAML Cwd = 0 Data::Visitor = 0.26 ; when it dumped Any::Moose for Moose Data::Visitor::Callback = 0 DateTime = 0.54 ; required for string overloading DateTime::Format::Strptime = 1.2000 DateTime::Format::Builder = 0.7901 ; fixes memory leaks DateTime::Format::Natural = 0 DateTime::Locale = 0.45 Email::Valid = 0 Encode = 0 Fatal = 0 File::Copy = 0 File::Find = 0 File::ShareDir = 0 File::Spec = 0 File::Temp = 0 Hash::Flatten = 0 HTML::Scrubber = 0 HTML::TokeParser::Simple = 3.14 HTTP::Headers = 1.64 IO::File = 0 List::MoreUtils = 0 List::Util = 1.45 Locale::Maketext = 0 Module::Pluggable = 0 Moose = 1.00 ; Reasonable default until we get test results Moose::Role = 0 Moose::Util = 0 MooseX::Aliases = 0 ; MooseX::Attribute::Chained = 1.0.1 ; we're currently using a forked copy to avoid 'deprecated' warnings Number::Format = 0 Readonly = 0 Regexp::Common = 0 Path::Class::File = 0 Scalar::Util = 0 Storable = 0 Task::Weaken = 0 ; to ensure Scalar::Util was built with weaken() YAML::XS = 0.32 [Prereqs / TestRequires] CGI = 3.37 ; for file POST tests POSIX = 0 Regexp::Assemble = 0 Test::More = 0.92 Test::Exception = 0 Test::Memory::Cycle = 0 ; for the xt/circular_reference.t ;; -- ;; -- Sets of additional tests we want to do as part of release [Test::Perl::Critic] [MetaTests] ;; [PodCoverageTests] ; Currently we comprehensively fail these [OurPkgVersion] [PodVersion] [Test::Kwalitee] [Test::EOL] finder = :InstallModules ; prevents test inputs being flagged [Test::PAUSE::Permissions] ; if doing a release make sure we have PAUSE perms ;; -- Additional git [Git::GatherDir] [Git::NextVersion] ; Get the next version tag from git [Git::CheckFor::CorrectBranch] ; ensure on master branch for release [Git::Remote::Check] ; ensure our branch is ahead of remote ;; -- We base the release stuff on the starter module, and tweak a bit [@Starter] -remove = GatherDir ; this is replaced by [Git::GatherDir] ReadmeAnyFromPod.source_filename = lib/HTML/FormFu.pm [ReadmeAnyFromPod / Pod_Readme] type = pod location = root ; do not include pod readmes in the build! [@Git] changelog = Changes allow_dirty = dist.ini allow_dirty = README.pod allow_dirty = Changes [GithubMeta] ; Grab the repo metadata [NextRelease] ; Mark up the next release in changes META.yml100644000765000024 6706012775731227 14362 0ustar00nigelstaff000000000000HTML-FormFu-2.05--- abstract: 'HTML Form Creation, Rendering and Validation Framework' author: - 'Carl Franks ' build_requires: CGI: '3.37' ExtUtils::MakeMaker: '0' File::Spec: '0' POSIX: '0' Regexp::Assemble: '0' Test::Exception: '0' Test::Memory::Cycle: '0' Test::More: '0.92' configure_requires: ExtUtils::MakeMaker: '0' File::ShareDir::Install: '0.06' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.007, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: HTML-FormFu no_index: directory: - eg - examples - inc - share - t - xt provides: HTML::FormFu: file: lib/HTML/FormFu.pm version: '2.05' HTML::FormFu::Attribute: file: lib/HTML/FormFu/Attribute.pm version: '2.05' HTML::FormFu::Constants: file: lib/HTML/FormFu/Constants.pm version: '2.05' HTML::FormFu::Constraint: file: lib/HTML/FormFu/Constraint.pm version: '2.05' HTML::FormFu::Constraint::ASCII: file: lib/HTML/FormFu/Constraint/ASCII.pm version: '2.05' HTML::FormFu::Constraint::AllOrNone: file: lib/HTML/FormFu/Constraint/AllOrNone.pm version: '2.05' HTML::FormFu::Constraint::AutoSet: file: lib/HTML/FormFu/Constraint/AutoSet.pm version: '2.05' HTML::FormFu::Constraint::Bool: file: lib/HTML/FormFu/Constraint/Bool.pm version: '2.05' HTML::FormFu::Constraint::Callback: file: lib/HTML/FormFu/Constraint/Callback.pm version: '2.05' HTML::FormFu::Constraint::CallbackOnce: file: lib/HTML/FormFu/Constraint/CallbackOnce.pm version: '2.05' HTML::FormFu::Constraint::DateTime: file: lib/HTML/FormFu/Constraint/DateTime.pm version: '2.05' HTML::FormFu::Constraint::DependOn: file: lib/HTML/FormFu/Constraint/DependOn.pm version: '2.05' HTML::FormFu::Constraint::Email: file: lib/HTML/FormFu/Constraint/Email.pm version: '2.05' HTML::FormFu::Constraint::Equal: file: lib/HTML/FormFu/Constraint/Equal.pm version: '2.05' HTML::FormFu::Constraint::File: file: lib/HTML/FormFu/Constraint/File.pm version: '2.05' HTML::FormFu::Constraint::File::MIME: file: lib/HTML/FormFu/Constraint/File/MIME.pm version: '2.05' HTML::FormFu::Constraint::File::MaxSize: file: lib/HTML/FormFu/Constraint/File/MaxSize.pm version: '2.05' HTML::FormFu::Constraint::File::MinSize: file: lib/HTML/FormFu/Constraint/File/MinSize.pm version: '2.05' HTML::FormFu::Constraint::File::Size: file: lib/HTML/FormFu/Constraint/File/Size.pm version: '2.05' HTML::FormFu::Constraint::Integer: file: lib/HTML/FormFu/Constraint/Integer.pm version: '2.05' HTML::FormFu::Constraint::Length: file: lib/HTML/FormFu/Constraint/Length.pm version: '2.05' HTML::FormFu::Constraint::MaxLength: file: lib/HTML/FormFu/Constraint/MaxLength.pm version: '2.05' HTML::FormFu::Constraint::MaxRange: file: lib/HTML/FormFu/Constraint/MaxRange.pm version: '2.05' HTML::FormFu::Constraint::MinLength: file: lib/HTML/FormFu/Constraint/MinLength.pm version: '2.05' HTML::FormFu::Constraint::MinMaxFields: file: lib/HTML/FormFu/Constraint/MinMaxFields.pm version: '2.05' HTML::FormFu::Constraint::MinRange: file: lib/HTML/FormFu/Constraint/MinRange.pm version: '2.05' HTML::FormFu::Constraint::Number: file: lib/HTML/FormFu/Constraint/Number.pm version: '2.05' HTML::FormFu::Constraint::Printable: file: lib/HTML/FormFu/Constraint/Printable.pm version: '2.05' HTML::FormFu::Constraint::Range: file: lib/HTML/FormFu/Constraint/Range.pm version: '2.05' HTML::FormFu::Constraint::Regex: file: lib/HTML/FormFu/Constraint/Regex.pm version: '2.05' HTML::FormFu::Constraint::Repeatable::Any: file: lib/HTML/FormFu/Constraint/Repeatable/Any.pm version: '2.05' HTML::FormFu::Constraint::Required: file: lib/HTML/FormFu/Constraint/Required.pm version: '2.05' HTML::FormFu::Constraint::Set: file: lib/HTML/FormFu/Constraint/Set.pm version: '2.05' HTML::FormFu::Constraint::SingleValue: file: lib/HTML/FormFu/Constraint/SingleValue.pm version: '2.05' HTML::FormFu::Constraint::Word: file: lib/HTML/FormFu/Constraint/Word.pm version: '2.05' HTML::FormFu::Deflator: file: lib/HTML/FormFu/Deflator.pm version: '2.05' HTML::FormFu::Deflator::Callback: file: lib/HTML/FormFu/Deflator/Callback.pm version: '2.05' HTML::FormFu::Deflator::CompoundDateTime: file: lib/HTML/FormFu/Deflator/CompoundDateTime.pm version: '2.05' HTML::FormFu::Deflator::CompoundSplit: file: lib/HTML/FormFu/Deflator/CompoundSplit.pm version: '2.05' HTML::FormFu::Deflator::FormatNumber: file: lib/HTML/FormFu/Deflator/FormatNumber.pm version: '2.05' HTML::FormFu::Deflator::PathClassFile: file: lib/HTML/FormFu/Deflator/PathClassFile.pm version: '2.05' HTML::FormFu::Deflator::Strftime: file: lib/HTML/FormFu/Deflator/Strftime.pm version: '2.05' HTML::FormFu::Deploy: file: lib/HTML/FormFu/Deploy.pm version: '2.05' HTML::FormFu::Element: file: lib/HTML/FormFu/Element.pm version: '2.05' HTML::FormFu::Element::Blank: file: lib/HTML/FormFu/Element/Blank.pm version: '2.05' HTML::FormFu::Element::Block: file: lib/HTML/FormFu/Element/Block.pm version: '2.05' HTML::FormFu::Element::Button: file: lib/HTML/FormFu/Element/Button.pm version: '2.05' HTML::FormFu::Element::Checkbox: file: lib/HTML/FormFu/Element/Checkbox.pm version: '2.05' HTML::FormFu::Element::Checkboxgroup: file: lib/HTML/FormFu/Element/Checkboxgroup.pm version: '2.05' HTML::FormFu::Element::ComboBox: file: lib/HTML/FormFu/Element/ComboBox.pm version: '2.05' HTML::FormFu::Element::ContentButton: file: lib/HTML/FormFu/Element/ContentButton.pm version: '2.05' HTML::FormFu::Element::Date: file: lib/HTML/FormFu/Element/Date.pm version: '2.05' HTML::FormFu::Element::DateTime: file: lib/HTML/FormFu/Element/DateTime.pm version: '2.05' HTML::FormFu::Element::Email: file: lib/HTML/FormFu/Element/Email.pm version: '2.05' HTML::FormFu::Element::Fieldset: file: lib/HTML/FormFu/Element/Fieldset.pm version: '2.05' HTML::FormFu::Element::File: file: lib/HTML/FormFu/Element/File.pm version: '2.05' HTML::FormFu::Element::Hidden: file: lib/HTML/FormFu/Element/Hidden.pm version: '2.05' HTML::FormFu::Element::Hr: file: lib/HTML/FormFu/Element/Hr.pm version: '2.05' HTML::FormFu::Element::Image: file: lib/HTML/FormFu/Element/Image.pm version: '2.05' HTML::FormFu::Element::Label: file: lib/HTML/FormFu/Element/Label.pm version: '2.05' HTML::FormFu::Element::Multi: file: lib/HTML/FormFu/Element/Multi.pm version: '2.05' HTML::FormFu::Element::Number: file: lib/HTML/FormFu/Element/Number.pm version: '2.05' HTML::FormFu::Element::Password: file: lib/HTML/FormFu/Element/Password.pm version: '2.05' HTML::FormFu::Element::Radio: file: lib/HTML/FormFu/Element/Radio.pm version: '2.05' HTML::FormFu::Element::Radiogroup: file: lib/HTML/FormFu/Element/Radiogroup.pm version: '2.05' HTML::FormFu::Element::Repeatable: file: lib/HTML/FormFu/Element/Repeatable.pm version: '2.05' HTML::FormFu::Element::Reset: file: lib/HTML/FormFu/Element/Reset.pm version: '2.05' HTML::FormFu::Element::Select: file: lib/HTML/FormFu/Element/Select.pm version: '2.05' HTML::FormFu::Element::SimpleTable: file: lib/HTML/FormFu/Element/SimpleTable.pm version: '2.05' HTML::FormFu::Element::Src: file: lib/HTML/FormFu/Element/Src.pm version: '2.05' HTML::FormFu::Element::Submit: file: lib/HTML/FormFu/Element/Submit.pm version: '2.05' HTML::FormFu::Element::Text: file: lib/HTML/FormFu/Element/Text.pm version: '2.05' HTML::FormFu::Element::Textarea: file: lib/HTML/FormFu/Element/Textarea.pm version: '2.05' HTML::FormFu::Element::URL: file: lib/HTML/FormFu/Element/URL.pm version: '2.05' HTML::FormFu::Exception: file: lib/HTML/FormFu/Exception.pm version: '2.05' HTML::FormFu::Exception::Constraint: file: lib/HTML/FormFu/Exception/Constraint.pm version: '2.05' HTML::FormFu::Exception::Inflator: file: lib/HTML/FormFu/Exception/Inflator.pm version: '2.05' HTML::FormFu::Exception::Input: file: lib/HTML/FormFu/Exception/Input.pm version: '2.05' HTML::FormFu::Exception::Transformer: file: lib/HTML/FormFu/Exception/Transformer.pm version: '2.05' HTML::FormFu::Exception::Validator: file: lib/HTML/FormFu/Exception/Validator.pm version: '2.05' HTML::FormFu::FakeQuery: file: lib/HTML/FormFu/FakeQuery.pm version: '2.05' HTML::FormFu::Filter: file: lib/HTML/FormFu/Filter.pm version: '2.05' HTML::FormFu::Filter::Callback: file: lib/HTML/FormFu/Filter/Callback.pm version: '2.05' HTML::FormFu::Filter::CompoundJoin: file: lib/HTML/FormFu/Filter/CompoundJoin.pm version: '2.05' HTML::FormFu::Filter::CompoundSprintf: file: lib/HTML/FormFu/Filter/CompoundSprintf.pm version: '2.05' HTML::FormFu::Filter::CopyValue: file: lib/HTML/FormFu/Filter/CopyValue.pm version: '2.05' HTML::FormFu::Filter::Encode: file: lib/HTML/FormFu/Filter/Encode.pm version: '2.05' HTML::FormFu::Filter::ForceListValue: file: lib/HTML/FormFu/Filter/ForceListValue.pm version: '2.05' HTML::FormFu::Filter::FormatNumber: file: lib/HTML/FormFu/Filter/FormatNumber.pm version: '2.05' HTML::FormFu::Filter::HTMLEscape: file: lib/HTML/FormFu/Filter/HTMLEscape.pm version: '2.05' HTML::FormFu::Filter::HTMLScrubber: file: lib/HTML/FormFu/Filter/HTMLScrubber.pm version: '2.05' HTML::FormFu::Filter::LowerCase: file: lib/HTML/FormFu/Filter/LowerCase.pm version: '2.05' HTML::FormFu::Filter::NonNumeric: file: lib/HTML/FormFu/Filter/NonNumeric.pm version: '2.05' HTML::FormFu::Filter::Regex: file: lib/HTML/FormFu/Filter/Regex.pm version: '2.05' HTML::FormFu::Filter::Split: file: lib/HTML/FormFu/Filter/Split.pm version: '2.05' HTML::FormFu::Filter::TrimEdges: file: lib/HTML/FormFu/Filter/TrimEdges.pm version: '2.05' HTML::FormFu::Filter::UpperCase: file: lib/HTML/FormFu/Filter/UpperCase.pm version: '2.05' HTML::FormFu::Filter::Whitespace: file: lib/HTML/FormFu/Filter/Whitespace.pm version: '2.05' HTML::FormFu::I18N: file: lib/HTML/FormFu/I18N.pm version: '2.05' HTML::FormFu::I18N::bg: file: lib/HTML/FormFu/I18N/bg.pm version: '2.05' HTML::FormFu::I18N::cs: file: lib/HTML/FormFu/I18N/cs.pm version: '2.05' HTML::FormFu::I18N::da: file: lib/HTML/FormFu/I18N/da.pm version: '2.05' HTML::FormFu::I18N::de: file: lib/HTML/FormFu/I18N/de.pm version: '2.05' HTML::FormFu::I18N::en: file: lib/HTML/FormFu/I18N/en.pm version: '2.05' HTML::FormFu::I18N::es: file: lib/HTML/FormFu/I18N/es.pm version: '2.05' HTML::FormFu::I18N::fr: file: lib/HTML/FormFu/I18N/fr.pm version: '2.05' HTML::FormFu::I18N::hu: file: lib/HTML/FormFu/I18N/hu.pm version: '2.05' HTML::FormFu::I18N::it: file: lib/HTML/FormFu/I18N/it.pm version: '2.05' HTML::FormFu::I18N::ja: file: lib/HTML/FormFu/I18N/ja.pm version: '2.05' HTML::FormFu::I18N::no: file: lib/HTML/FormFu/I18N/no.pm version: '2.05' HTML::FormFu::I18N::pt_br: file: lib/HTML/FormFu/I18N/pt_br.pm version: '2.05' HTML::FormFu::I18N::pt_pt: file: lib/HTML/FormFu/I18N/pt_pt.pm version: '2.05' HTML::FormFu::I18N::ro: file: lib/HTML/FormFu/I18N/ro.pm version: '2.05' HTML::FormFu::I18N::ru: file: lib/HTML/FormFu/I18N/ru.pm version: '2.05' HTML::FormFu::I18N::ua: file: lib/HTML/FormFu/I18N/ua.pm version: '2.05' HTML::FormFu::I18N::zh_cn: file: lib/HTML/FormFu/I18N/zh_cn.pm version: '2.05' HTML::FormFu::Inflator: file: lib/HTML/FormFu/Inflator.pm version: '2.05' HTML::FormFu::Inflator::Callback: file: lib/HTML/FormFu/Inflator/Callback.pm version: '2.05' HTML::FormFu::Inflator::CompoundDateTime: file: lib/HTML/FormFu/Inflator/CompoundDateTime.pm version: '2.05' HTML::FormFu::Inflator::DateTime: file: lib/HTML/FormFu/Inflator/DateTime.pm version: '2.05' HTML::FormFu::Literal: file: lib/HTML/FormFu/Literal.pm version: '2.05' HTML::FormFu::Localize: file: lib/HTML/FormFu/Localize.pm version: '2.05' HTML::FormFu::Model: file: lib/HTML/FormFu/Model.pm version: '2.05' HTML::FormFu::Model::HashRef: file: lib/HTML/FormFu/Model/HashRef.pm version: '2.05' HTML::FormFu::ObjectUtil: file: lib/HTML/FormFu/ObjectUtil.pm version: '2.05' HTML::FormFu::OutputProcessor: file: lib/HTML/FormFu/OutputProcessor.pm version: '2.05' HTML::FormFu::OutputProcessor::Indent: file: lib/HTML/FormFu/OutputProcessor/Indent.pm version: '2.05' HTML::FormFu::OutputProcessor::StripWhitespace: file: lib/HTML/FormFu/OutputProcessor/StripWhitespace.pm version: '2.05' HTML::FormFu::Plugin: file: lib/HTML/FormFu/Plugin.pm version: '2.05' HTML::FormFu::Plugin::StashValid: file: lib/HTML/FormFu/Plugin/StashValid.pm version: '2.05' HTML::FormFu::Preload: file: lib/HTML/FormFu/Preload.pm version: '2.05' HTML::FormFu::Processor: file: lib/HTML/FormFu/Processor.pm version: '2.05' HTML::FormFu::QueryType::CGI: file: lib/HTML/FormFu/QueryType/CGI.pm version: '2.05' HTML::FormFu::QueryType::CGI::Simple: file: lib/HTML/FormFu/QueryType/CGI/Simple.pm version: '2.05' HTML::FormFu::QueryType::Catalyst: file: lib/HTML/FormFu/QueryType/Catalyst.pm version: '2.05' HTML::FormFu::Role::Constraint::Others: file: lib/HTML/FormFu/Role/Constraint/Others.pm version: '2.05' HTML::FormFu::Role::ContainsElements: file: lib/HTML/FormFu/Role/ContainsElements.pm version: '2.05' HTML::FormFu::Role::ContainsElementsSharedWithField: file: lib/HTML/FormFu/Role/ContainsElementsSharedWithField.pm version: '2.05' HTML::FormFu::Role::CreateChildren: file: lib/HTML/FormFu/Role/CreateChildren.pm version: '2.05' HTML::FormFu::Role::CustomRoles: file: lib/HTML/FormFu/Role/CustomRoles.pm version: '2.05' HTML::FormFu::Role::Element::Coercible: file: lib/HTML/FormFu/Role/Element/Coercible.pm version: '2.05' HTML::FormFu::Role::Element::Field: file: lib/HTML/FormFu/Role/Element/Field.pm version: '2.05' HTML::FormFu::Role::Element::FieldMethods: file: lib/HTML/FormFu/Role/Element/FieldMethods.pm version: '2.05' HTML::FormFu::Role::Element::Group: file: lib/HTML/FormFu/Role/Element/Group.pm version: '2.05' HTML::FormFu::Role::Element::Input: file: lib/HTML/FormFu/Role/Element/Input.pm version: '2.05' HTML::FormFu::Role::Element::Layout: file: lib/HTML/FormFu/Role/Element/Layout.pm version: '2.05' HTML::FormFu::Role::Element::MultiElement: file: lib/HTML/FormFu/Role/Element/MultiElement.pm version: '2.05' HTML::FormFu::Role::Element::NonBlock: file: lib/HTML/FormFu/Role/Element/NonBlock.pm version: '2.05' HTML::FormFu::Role::Element::ProcessOptionsFromModel: file: lib/HTML/FormFu/Role/Element/ProcessOptionsFromModel.pm version: '2.05' HTML::FormFu::Role::Element::SingleValueField: file: lib/HTML/FormFu/Role/Element/SingleValueField.pm version: '2.05' HTML::FormFu::Role::Filter::Compound: file: lib/HTML/FormFu/Role/Filter/Compound.pm version: '2.05' HTML::FormFu::Role::FormAndBlockMethods: file: lib/HTML/FormFu/Role/FormAndBlockMethods.pm version: '2.05' HTML::FormFu::Role::FormAndElementMethods: file: lib/HTML/FormFu/Role/FormAndElementMethods.pm version: '2.05' HTML::FormFu::Role::FormBlockAndFieldMethods: file: lib/HTML/FormFu/Role/FormBlockAndFieldMethods.pm version: '2.05' HTML::FormFu::Role::GetProcessors: file: lib/HTML/FormFu/Role/GetProcessors.pm version: '2.05' HTML::FormFu::Role::HasParent: file: lib/HTML/FormFu/Role/HasParent.pm version: '2.05' HTML::FormFu::Role::NestedHashUtils: file: lib/HTML/FormFu/Role/NestedHashUtils.pm version: '2.05' HTML::FormFu::Role::Populate: file: lib/HTML/FormFu/Role/Populate.pm version: '2.05' HTML::FormFu::Role::Render: file: lib/HTML/FormFu/Role/Render.pm version: '2.05' HTML::FormFu::Transformer: file: lib/HTML/FormFu/Transformer.pm version: '2.05' HTML::FormFu::Transformer::Callback: file: lib/HTML/FormFu/Transformer/Callback.pm version: '2.05' HTML::FormFu::Upload: file: lib/HTML/FormFu/Upload.pm version: '2.05' HTML::FormFu::UploadParam: file: lib/HTML/FormFu/UploadParam.pm version: '2.05' HTML::FormFu::Util: file: lib/HTML/FormFu/Util.pm version: '2.05' HTML::FormFu::Validator: file: lib/HTML/FormFu/Validator.pm version: '2.05' HTML::FormFu::Validator::Callback: file: lib/HTML/FormFu/Validator/Callback.pm version: '2.05' MooseX::Attribute::FormFuChained: file: lib/MooseX/Attribute/FormFuChained.pm version: '2.05' MooseX::Attribute::FormFuChained::Method::Accessor: file: lib/MooseX/Attribute/FormFuChained.pm version: '2.05' MooseX::FormFuChainedAccessors: file: lib/MooseX/FormFuChainedAccessors.pm version: '2.05' MooseX::Traits::Attribute::FormFuChained: file: lib/MooseX/Attribute/FormFuChained.pm version: '2.05' requires: Carp: '0' Class::MOP::Method: '0' Clone: '0.31' Config::Any: '0.18' Cwd: '0' Data::Visitor: '0.26' Data::Visitor::Callback: '0' DateTime: '0.54' DateTime::Format::Builder: '0.7901' DateTime::Format::Natural: '0' DateTime::Format::Strptime: '1.2000' DateTime::Locale: '0.45' Email::Valid: '0' Encode: '0' Exporter: '5.57' Fatal: '0' File::Copy: '0' File::Find: '0' File::ShareDir: '0' File::Spec: '0' File::Temp: '0' HTML::Scrubber: '0' HTML::TokeParser::Simple: '3.14' HTTP::Headers: '1.64' Hash::Flatten: '0' IO::File: '0' List::MoreUtils: '0' List::Util: '1.45' Locale::Maketext: '0' Module::Pluggable: '0' Moose: '1.00' Moose::Role: '0' Moose::Util: '0' MooseX::Aliases: '0' Number::Format: '0' Path::Class::File: '0' Readonly: '0' Regexp::Common: '0' Scalar::Util: '0' Storable: '0' Task::Weaken: '0' YAML::XS: '0.32' perl: '5.010' resources: homepage: https://github.com/fireartist/HTML-FormFu repository: https://github.com/fireartist/HTML-FormFu.git version: '2.05' x_Dist_Zilla: perl: version: '5.024000' plugins: - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: requires name: Prereqs version: '6.007' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: test type: requires name: TestRequires version: '6.007' - class: Dist::Zilla::Plugin::Test::Perl::Critic name: Test::Perl::Critic version: '3.000' - class: Dist::Zilla::Plugin::MetaTests name: MetaTests version: '6.007' - class: Dist::Zilla::Plugin::OurPkgVersion name: OurPkgVersion version: '0.10' - class: Dist::Zilla::Plugin::PodVersion name: PodVersion version: '6.007' - class: Dist::Zilla::Plugin::Test::Kwalitee config: Dist::Zilla::Plugin::Test::Kwalitee: filename: xt/release/kwalitee.t skiptest: [] name: Test::Kwalitee version: '2.12' - class: Dist::Zilla::Plugin::Test::EOL config: Dist::Zilla::Plugin::Test::EOL: filename: xt/author/eol.t finder: - ':InstallModules' trailing_whitespace: 1 name: Test::EOL version: '0.19' - class: Dist::Zilla::Plugin::Test::PAUSE::Permissions name: Test::PAUSE::Permissions version: '0.003' - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: [] exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: Git::GatherDir version: '2.039' - class: Dist::Zilla::Plugin::Git::NextVersion config: Dist::Zilla::Plugin::Git::NextVersion: first_version: '0.001' version_by_branch: 0 version_regexp: (?^:^v(.+)$) Dist::Zilla::Role::Git::Repo: repo_root: . name: Git::NextVersion version: '2.039' - class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch config: Dist::Zilla::Role::Git::Repo: repo_root: . name: Git::CheckFor::CorrectBranch version: '0.013' - class: Dist::Zilla::Plugin::Git::Remote::Check name: Git::Remote::Check version: 0.1.2 - class: Dist::Zilla::Plugin::PruneCruft name: '@Starter/PruneCruft' version: '6.007' - class: Dist::Zilla::Plugin::ManifestSkip name: '@Starter/ManifestSkip' version: '6.007' - class: Dist::Zilla::Plugin::MetaConfig name: '@Starter/MetaConfig' version: '6.007' - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder_objects: - class: Dist::Zilla::Plugin::FinderCode name: '@Starter/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '6.007' include_underscores: 0 Dist::Zilla::Role::MetaProvider::Provider: $Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.002003' inherit_missing: '1' inherit_version: '1' meta_noindex: '1' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000031' version: '0.004' name: '@Starter/MetaProvides::Package' version: '2.004002' - class: Dist::Zilla::Plugin::MetaNoIndex name: '@Starter/MetaNoIndex' version: '6.007' - class: Dist::Zilla::Plugin::MetaYAML name: '@Starter/MetaYAML' version: '6.007' - class: Dist::Zilla::Plugin::MetaJSON name: '@Starter/MetaJSON' version: '6.007' - class: Dist::Zilla::Plugin::License name: '@Starter/License' version: '6.007' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: '@Starter/ReadmeAnyFromPod' version: '0.161170' - class: Dist::Zilla::Plugin::ExecDir name: '@Starter/ExecDir' version: '6.007' - class: Dist::Zilla::Plugin::ShareDir name: '@Starter/ShareDir' version: '6.007' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Starter/PodSyntaxTests' version: '6.007' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@Starter/Test::ReportPrereqs' version: '0.025' - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: bail_out_on_fail: '0' fail_on_warning: author fake_home: 0 filename: xt/author/00-compile.t module_finder: - ':InstallModules' needs_display: 0 phase: develop script_finder: - ':PerlExecFiles' skips: [] name: '@Starter/Test::Compile' version: '2.054' - class: Dist::Zilla::Plugin::MakeMaker config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@Starter/MakeMaker' version: '6.007' - class: Dist::Zilla::Plugin::Manifest name: '@Starter/Manifest' version: '6.007' - class: Dist::Zilla::Plugin::TestRelease name: '@Starter/TestRelease' version: '6.007' - class: Dist::Zilla::Plugin::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@Starter/RunExtraTests' version: '0.029' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Starter/ConfirmRelease' version: '6.007' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Starter/UploadToCPAN' version: '6.007' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: Pod_Readme version: '0.161170' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes - README.pod - dist.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Git/Check' version: '2.039' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: v%v%n%n%c Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes - README.pod - dist.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Git/Commit' version: '2.039' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: v2.05 tag_format: v%v tag_message: v%v Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Git/Tag' version: '2.039' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Git/Push' version: '2.039' - class: Dist::Zilla::Plugin::GithubMeta name: GithubMeta version: '0.54' - class: Dist::Zilla::Plugin::NextRelease name: NextRelease version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: '@Starter/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '6.007' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '6.007' x_serialization_backend: 'YAML::Tiny version 1.69' MANIFEST100644000765000024 6615012775731227 14241 0ustar00nigelstaff000000000000HTML-FormFu-2.05# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.007. Changes LICENSE MANIFEST MANIFEST.SKIP META.json META.yml Makefile.PL README bin/html_formfu_deploy.pl bin/html_formfu_dumpconf.pl dist.ini examples/unicode/Changes examples/unicode/Makefile.PL examples/unicode/README examples/unicode/database.sql examples/unicode/lib/unicode.pm examples/unicode/lib/unicode/Controller/Root.pm examples/unicode/lib/unicode/Model/DB.pm examples/unicode/lib/unicode/Schema.pm examples/unicode/lib/unicode/Schema/Unicode.pm examples/unicode/lib/unicode/View/TT.pm examples/unicode/lib/unicode/View/TT/Alloy.pm examples/unicode/root/favicon.ico examples/unicode/root/formfu/block examples/unicode/root/formfu/checkboxgroup examples/unicode/root/formfu/checkboxgroup_tag examples/unicode/root/formfu/content_button examples/unicode/root/formfu/end_block examples/unicode/root/formfu/end_form examples/unicode/root/formfu/field examples/unicode/root/formfu/form examples/unicode/root/formfu/input examples/unicode/root/formfu/input_tag examples/unicode/root/formfu/label examples/unicode/root/formfu/multi examples/unicode/root/formfu/non_block examples/unicode/root/formfu/recaptcha examples/unicode/root/formfu/repeatable examples/unicode/root/formfu/select_tag examples/unicode/root/formfu/start_block examples/unicode/root/formfu/start_form examples/unicode/root/formfu/textarea_tag examples/unicode/root/forms/index.yml examples/unicode/root/forms/view.conf examples/unicode/root/forms/view.yml examples/unicode/root/index.tt examples/unicode/root/static/images/btn_120x50_built.png examples/unicode/root/static/images/btn_120x50_built_shadow.png examples/unicode/root/static/images/btn_120x50_powered.png examples/unicode/root/static/images/btn_120x50_powered_shadow.png examples/unicode/root/static/images/btn_88x31_built.png examples/unicode/root/static/images/btn_88x31_built_shadow.png examples/unicode/root/static/images/btn_88x31_powered.png examples/unicode/root/static/images/btn_88x31_powered_shadow.png examples/unicode/root/static/images/catalyst_logo.png examples/unicode/root/vertically-aligned.css examples/unicode/root/view.tt examples/unicode/script/unicode_cgi.pl examples/unicode/script/unicode_create.pl examples/unicode/script/unicode_fastcgi.pl examples/unicode/script/unicode_server.pl examples/unicode/script/unicode_test.pl examples/unicode/t/01app.t examples/unicode/t/02pod.t examples/unicode/t/03podcoverage.t examples/unicode/t/model_DB.t examples/unicode/t/view_TT-Alloy.t examples/unicode/t/view_TT.t examples/unicode/unicode.db examples/unicode/unicode.yml examples/vertically-aligned-css/test.jpg examples/vertically-aligned-css/vertically-aligned-ie.css examples/vertically-aligned-css/vertically-aligned.css examples/vertically-aligned-css/vertically-aligned.html examples/vertically-aligned-css/vertically-aligned.pl examples/vertically-aligned-css/vertically-aligned.tt examples/vertically-aligned-css/vertically-aligned.yml lib/HTML/FormFu.pm lib/HTML/FormFu/Attribute.pm lib/HTML/FormFu/Constants.pm lib/HTML/FormFu/Constraint.pm lib/HTML/FormFu/Constraint/ASCII.pm lib/HTML/FormFu/Constraint/AllOrNone.pm lib/HTML/FormFu/Constraint/AutoSet.pm lib/HTML/FormFu/Constraint/Bool.pm lib/HTML/FormFu/Constraint/Callback.pm lib/HTML/FormFu/Constraint/CallbackOnce.pm lib/HTML/FormFu/Constraint/DateTime.pm lib/HTML/FormFu/Constraint/DependOn.pm lib/HTML/FormFu/Constraint/Email.pm lib/HTML/FormFu/Constraint/Equal.pm lib/HTML/FormFu/Constraint/File.pm lib/HTML/FormFu/Constraint/File/MIME.pm lib/HTML/FormFu/Constraint/File/MaxSize.pm lib/HTML/FormFu/Constraint/File/MinSize.pm lib/HTML/FormFu/Constraint/File/Size.pm lib/HTML/FormFu/Constraint/Integer.pm lib/HTML/FormFu/Constraint/Length.pm lib/HTML/FormFu/Constraint/MaxLength.pm lib/HTML/FormFu/Constraint/MaxRange.pm lib/HTML/FormFu/Constraint/MinLength.pm lib/HTML/FormFu/Constraint/MinMaxFields.pm lib/HTML/FormFu/Constraint/MinRange.pm lib/HTML/FormFu/Constraint/Number.pm lib/HTML/FormFu/Constraint/Printable.pm lib/HTML/FormFu/Constraint/Range.pm lib/HTML/FormFu/Constraint/Regex.pm lib/HTML/FormFu/Constraint/Repeatable/Any.pm lib/HTML/FormFu/Constraint/Required.pm lib/HTML/FormFu/Constraint/Set.pm lib/HTML/FormFu/Constraint/SingleValue.pm lib/HTML/FormFu/Constraint/Word.pm lib/HTML/FormFu/Deflator.pm lib/HTML/FormFu/Deflator/Callback.pm lib/HTML/FormFu/Deflator/CompoundDateTime.pm lib/HTML/FormFu/Deflator/CompoundSplit.pm lib/HTML/FormFu/Deflator/FormatNumber.pm lib/HTML/FormFu/Deflator/PathClassFile.pm lib/HTML/FormFu/Deflator/Strftime.pm lib/HTML/FormFu/Deploy.pm lib/HTML/FormFu/Element.pm lib/HTML/FormFu/Element/Blank.pm lib/HTML/FormFu/Element/Block.pm lib/HTML/FormFu/Element/Button.pm lib/HTML/FormFu/Element/Checkbox.pm lib/HTML/FormFu/Element/Checkboxgroup.pm lib/HTML/FormFu/Element/ComboBox.pm lib/HTML/FormFu/Element/ContentButton.pm lib/HTML/FormFu/Element/Date.pm lib/HTML/FormFu/Element/DateTime.pm lib/HTML/FormFu/Element/Email.pm lib/HTML/FormFu/Element/Fieldset.pm lib/HTML/FormFu/Element/File.pm lib/HTML/FormFu/Element/Hidden.pm lib/HTML/FormFu/Element/Hr.pm lib/HTML/FormFu/Element/Image.pm lib/HTML/FormFu/Element/Label.pm lib/HTML/FormFu/Element/Multi.pm lib/HTML/FormFu/Element/Number.pm lib/HTML/FormFu/Element/Password.pm lib/HTML/FormFu/Element/Radio.pm lib/HTML/FormFu/Element/Radiogroup.pm lib/HTML/FormFu/Element/Repeatable.pm lib/HTML/FormFu/Element/Reset.pm lib/HTML/FormFu/Element/Select.pm lib/HTML/FormFu/Element/SimpleTable.pm lib/HTML/FormFu/Element/Src.pm lib/HTML/FormFu/Element/Submit.pm lib/HTML/FormFu/Element/Text.pm lib/HTML/FormFu/Element/Textarea.pm lib/HTML/FormFu/Element/URL.pm lib/HTML/FormFu/Exception.pm lib/HTML/FormFu/Exception/Constraint.pm lib/HTML/FormFu/Exception/Inflator.pm lib/HTML/FormFu/Exception/Input.pm lib/HTML/FormFu/Exception/Transformer.pm lib/HTML/FormFu/Exception/Validator.pm lib/HTML/FormFu/FakeQuery.pm lib/HTML/FormFu/Filter.pm lib/HTML/FormFu/Filter/Callback.pm lib/HTML/FormFu/Filter/CompoundJoin.pm lib/HTML/FormFu/Filter/CompoundSprintf.pm lib/HTML/FormFu/Filter/CopyValue.pm lib/HTML/FormFu/Filter/Encode.pm lib/HTML/FormFu/Filter/ForceListValue.pm lib/HTML/FormFu/Filter/FormatNumber.pm lib/HTML/FormFu/Filter/HTMLEscape.pm lib/HTML/FormFu/Filter/HTMLScrubber.pm lib/HTML/FormFu/Filter/LowerCase.pm lib/HTML/FormFu/Filter/NonNumeric.pm lib/HTML/FormFu/Filter/Regex.pm lib/HTML/FormFu/Filter/Split.pm lib/HTML/FormFu/Filter/TrimEdges.pm lib/HTML/FormFu/Filter/UpperCase.pm lib/HTML/FormFu/Filter/Whitespace.pm lib/HTML/FormFu/I18N.pm lib/HTML/FormFu/I18N/bg.pm lib/HTML/FormFu/I18N/cs.pm lib/HTML/FormFu/I18N/da.pm lib/HTML/FormFu/I18N/de.pm lib/HTML/FormFu/I18N/en.pm lib/HTML/FormFu/I18N/es.pm lib/HTML/FormFu/I18N/fr.pm lib/HTML/FormFu/I18N/hu.pm lib/HTML/FormFu/I18N/it.pm lib/HTML/FormFu/I18N/ja.pm lib/HTML/FormFu/I18N/no.pm lib/HTML/FormFu/I18N/pt_br.pm lib/HTML/FormFu/I18N/pt_pt.pm lib/HTML/FormFu/I18N/ro.pm lib/HTML/FormFu/I18N/ru.pm lib/HTML/FormFu/I18N/ua.pm lib/HTML/FormFu/I18N/zh_cn.pm lib/HTML/FormFu/Inflator.pm lib/HTML/FormFu/Inflator/Callback.pm lib/HTML/FormFu/Inflator/CompoundDateTime.pm lib/HTML/FormFu/Inflator/DateTime.pm lib/HTML/FormFu/Literal.pm lib/HTML/FormFu/Localize.pm lib/HTML/FormFu/Manual/Cookbook.pod lib/HTML/FormFu/Manual/Unicode.pod lib/HTML/FormFu/Model.pm lib/HTML/FormFu/Model/HashRef.pm lib/HTML/FormFu/ObjectUtil.pm lib/HTML/FormFu/OutputProcessor.pm lib/HTML/FormFu/OutputProcessor/Indent.pm lib/HTML/FormFu/OutputProcessor/StripWhitespace.pm lib/HTML/FormFu/Plugin.pm lib/HTML/FormFu/Plugin/StashValid.pm lib/HTML/FormFu/Preload.pm lib/HTML/FormFu/Processor.pm lib/HTML/FormFu/QueryType/CGI.pm lib/HTML/FormFu/QueryType/CGI/Simple.pm lib/HTML/FormFu/QueryType/Catalyst.pm lib/HTML/FormFu/Role/Constraint/Others.pm lib/HTML/FormFu/Role/ContainsElements.pm lib/HTML/FormFu/Role/ContainsElementsSharedWithField.pm lib/HTML/FormFu/Role/CreateChildren.pm lib/HTML/FormFu/Role/CustomRoles.pm lib/HTML/FormFu/Role/Element/Coercible.pm lib/HTML/FormFu/Role/Element/Field.pm lib/HTML/FormFu/Role/Element/FieldMethods.pm lib/HTML/FormFu/Role/Element/Group.pm lib/HTML/FormFu/Role/Element/Input.pm lib/HTML/FormFu/Role/Element/Layout.pm lib/HTML/FormFu/Role/Element/MultiElement.pm lib/HTML/FormFu/Role/Element/NonBlock.pm lib/HTML/FormFu/Role/Element/ProcessOptionsFromModel.pm lib/HTML/FormFu/Role/Element/SingleValueField.pm lib/HTML/FormFu/Role/Filter/Compound.pm lib/HTML/FormFu/Role/FormAndBlockMethods.pm lib/HTML/FormFu/Role/FormAndElementMethods.pm lib/HTML/FormFu/Role/FormBlockAndFieldMethods.pm lib/HTML/FormFu/Role/GetProcessors.pm lib/HTML/FormFu/Role/HasParent.pm lib/HTML/FormFu/Role/NestedHashUtils.pm lib/HTML/FormFu/Role/Populate.pm lib/HTML/FormFu/Role/Render.pm lib/HTML/FormFu/Transformer.pm lib/HTML/FormFu/Transformer/Callback.pm lib/HTML/FormFu/Upload.pm lib/HTML/FormFu/UploadParam.pm lib/HTML/FormFu/Util.pm lib/HTML/FormFu/Validator.pm lib/HTML/FormFu/Validator/Callback.pm lib/MooseX/Attribute/FormFuChained.pm lib/MooseX/FormFuChainedAccessors.pm lib/MooseX/Traits/Attribute/FormFuChained.pm share/templates/tt/xhtml/block share/templates/tt/xhtml/end_block share/templates/tt/xhtml/end_form share/templates/tt/xhtml/field share/templates/tt/xhtml/field_layout share/templates/tt/xhtml/field_layout_block share/templates/tt/xhtml/field_layout_checkboxgroup_field share/templates/tt/xhtml/field_layout_comment share/templates/tt/xhtml/field_layout_contentbutton_field share/templates/tt/xhtml/field_layout_errors share/templates/tt/xhtml/field_layout_field share/templates/tt/xhtml/field_layout_javascript share/templates/tt/xhtml/field_layout_label share/templates/tt/xhtml/field_layout_label_field share/templates/tt/xhtml/field_layout_label_text share/templates/tt/xhtml/field_layout_multi_field share/templates/tt/xhtml/field_layout_parser share/templates/tt/xhtml/field_layout_select_field share/templates/tt/xhtml/field_layout_textarea_field share/templates/tt/xhtml/form share/templates/tt/xhtml/non_block share/templates/tt/xhtml/recaptcha share/templates/tt/xhtml/repeatable share/templates/tt/xhtml/start_block share/templates/tt/xhtml/start_form t/00-report-prereqs.dd t/00-report-prereqs.t t/01use.t t/04basic.t t/04basic.yml t/05_repeated_render.t t/block_insert_after.t t/block_insert_before.t t/bugs/constructor_arg_overwrites_default.t t/bugs/date_element_deflator.t t/bugs/date_element_empty_input.t t/bugs/datetime_hour_lt_10.t t/bugs/disabled_select_default_value.yml t/bugs/element_class.t t/bugs/element_parent.t t/bugs/empty_block_with_nested_name.t t/bugs/empty_block_with_nested_name.yml t/bugs/error_msg.t t/bugs/error_multiple_fields_same_name.t t/bugs/error_multiple_fields_same_name.yml t/bugs/field_no_name.t t/bugs/filter_run_once.t t/bugs/multiple_checkbox_same_name.t t/bugs/multiple_checkbox_same_name.yml t/bugs/name_regex_chars.t t/bugs/not_nested.t t/bugs/populate_element_coderef.t t/bugs/pre_1_00_compat.t t/bugs/pre_1_00_compat.yml t/bugs/render_processed_value_retain_default.t t/bugs/render_processed_value_retain_default.yml t/bugs/repeatable_increase_rep.t t/bugs/repeatable_increase_rep.yml t/bugs/result_params_multiple.t t/bugs/select_empty_options.t t/bugs/submit_no_value.t t/bugs/submit_retain_default.t t/bugs/value_empty_string.t t/bugs/value_no_default.t t/bugs/yaml_utf8.t t/bugs/yaml_utf8.txt t/bugs/yaml_utf8.yml t/constraints/allornone.t t/constraints/allornone_attach_errors_to_base.t t/constraints/allornone_attach_errors_to_base.yml t/constraints/allornone_attach_errors_to_others.t t/constraints/allornone_attach_errors_to_others.yml t/constraints/ascii.t t/constraints/autoset.t t/constraints/autoset_group.t t/constraints/bool.t t/constraints/callback.t t/constraints/callbackonce.t t/constraints/constraint.t t/constraints/constraint_other_siblings.t t/constraints/constraint_other_siblings.yml t/constraints/constraint_other_siblings_not.t t/constraints/constraint_other_siblings_not.yml t/constraints/constraint_when.t t/constraints/constraint_when.yml t/constraints/constraint_when_any_field.t t/constraints/constraint_when_any_field.yml t/constraints/constraint_when_any_true_value.t t/constraints/constraint_when_any_true_value.yml t/constraints/constraint_when_default_empty_value.t t/constraints/constraint_when_default_empty_value.yml t/constraints/constraint_when_fields.t t/constraints/constraint_when_fields.yml t/constraints/datetime_parser.t t/constraints/dependon.t t/constraints/dependon_attach_errors_to_base.t t/constraints/dependon_attach_errors_to_base.yml t/constraints/dependon_attach_errors_to_others.t t/constraints/dependon_attach_errors_to_others.yml t/constraints/email.t t/constraints/equal.t t/constraints/equal_internals.t t/constraints/equal_not.t t/constraints/file.t t/constraints/file.yml t/constraints/file_maxsize.t t/constraints/file_maxsize.yml t/constraints/file_mime.t t/constraints/file_mime.yml t/constraints/file_minsize.t t/constraints/file_minsize.yml t/constraints/file_size.t t/constraints/file_size.yml t/constraints/integer.t t/constraints/length.t t/constraints/localize.t t/constraints/maxlength.t t/constraints/maxrange.t t/constraints/minlength.t t/constraints/minmaxfields.t t/constraints/minmaxfields_with_filter_split.t t/constraints/minmaxfields_with_filter_split.yml t/constraints/minrange.t t/constraints/not_equal.t t/constraints/not_word.t t/constraints/number.t t/constraints/printable.t t/constraints/range.t t/constraints/regex.t t/constraints/regex_anchored.t t/constraints/regex_common.t t/constraints/repeatable_any.t t/constraints/repeatable_any.yml t/constraints/repeatable_any_not_increment_field_names.t t/constraints/repeatable_any_not_increment_field_names.yml t/constraints/required.t t/constraints/required_file.t t/constraints/required_file.yml t/constraints/required_only_on_reps.t t/constraints/required_only_on_reps.yml t/constraints/set.t t/constraints/singlevalue.t t/constraints/word.t t/constraints/xml.t t/deflators/callback.t t/deflators/compounddatetime.t t/deflators/compounddatetime.yml t/deflators/compounddatetime_field_order.t t/deflators/compounddatetime_field_order.yml t/deflators/compoundsplit.t t/deflators/compoundsplit.yml t/deflators/compoundsplit_after_submit.t t/deflators/compoundsplit_after_submit.yml t/deflators/compoundsplit_field_order.t t/deflators/compoundsplit_field_order.yml t/deflators/compoundsplit_split.t t/deflators/compoundsplit_split.yml t/deflators/formatnumber.t t/deflators/formatnumber.yml t/deflators/pathclassfile.t t/elements-file_post.t t/elements-file_post.txt t/elements/blank.t t/elements/block.t t/elements/block_auto_block_id.t t/elements/block_auto_block_id.yml t/elements/block_repeatable.t t/elements/block_repeatable.yml t/elements/block_repeatable_attrs.t t/elements/block_repeatable_attrs.yml t/elements/block_repeatable_auto_block_id.t t/elements/block_repeatable_auto_block_id.yml t/elements/block_repeatable_auto_id.t t/elements/block_repeatable_auto_id.yml t/elements/block_repeatable_date.t t/elements/block_repeatable_date.yml t/elements/block_repeatable_inc.t t/elements/block_repeatable_inc.yml t/elements/block_repeatable_multi.t t/elements/block_repeatable_tag.t t/elements/block_repeatable_tag.yml t/elements/button.t t/elements/button_no_name.t t/elements/checkbox.t t/elements/checkbox_force_default.t t/elements/checkbox_retain_default.t t/elements/checkbox_reverse.t t/elements/checkbox_reverse.yml t/elements/checkboxgroup.t t/elements/checkboxgroup_attributes_escaped.t t/elements/checkboxgroup_attributes_escaped.yml t/elements/combobox.t t/elements/combobox.yml t/elements/combobox_repeatable.t t/elements/combobox_repeatable.yml t/elements/combobox_required.t t/elements/combobox_required.yml t/elements/content_button.t t/elements/date.t t/elements/date_default.t t/elements/date_default_datetime_args.t t/elements/date_default_datetime_args.yml t/elements/date_default_empty.t t/elements/date_month_year.t t/elements/date_natural.t t/elements/date_order.t t/elements/date_order_error.t t/elements/date_rename.t t/elements/date_undef.t t/elements/date_year_reverse.t t/elements/date_year_reverse.yml t/elements/datetime.t t/elements/datetime.yml t/elements/datetime_interval.t t/elements/datetime_interval.yml t/elements/datetime_seconds.t t/elements/datetime_seconds.yml t/elements/element_setup.t t/elements/email.t t/elements/escaping.t t/elements/field_default_empty_value.t t/elements/field_non_param.t t/elements/fieldset.t t/elements/fieldset_legend_attrs.t t/elements/fieldset_legend_attrs.yml t/elements/file.t t/elements/file_post.txt t/elements/file_post_cgi_simple.t t/elements/hidden.t t/elements/hr.t t/elements/image.t t/elements/label.t t/elements/label.yml t/elements/label_value_submission.t t/elements/label_value_submission.yml t/elements/multi.t t/elements/multi_errors.t t/elements/multiple_submit_buttons.t t/elements/no_block_tag.t t/elements/no_block_tag.yml t/elements/no_container_tag.t t/elements/no_container_tag.yml t/elements/number.t t/elements/number.yml t/elements/object.t t/elements/object/field_layout_field_custom t/elements/password.t t/elements/password_render_value.t t/elements/password_retain_default.t t/elements/radio.t t/elements/radio_force_default.t t/elements/radio_retain_default.t t/elements/radiogroup.t t/elements/radiogroup_attributes_escaped.t t/elements/radiogroup_attributes_escaped.yml t/elements/radiogroup_attrs_xml.t t/elements/radiogroup_dup_opt.t t/elements/radiogroup_errors.t t/elements/radiogroup_force_default.t t/elements/radiogroup_id.t t/elements/radiogroup_id_value.t t/elements/radiogroup_retain_default.t t/elements/radiogroup_subgroup.t t/elements/radiogroup_unknown_opt.t t/elements/radiogroup_xml.t t/elements/render_method.t t/elements/repeatable_counter_name.t t/elements/repeatable_counter_name.yml t/elements/repeatable_repeatable.t t/elements/repeatable_repeatable.yml t/elements/reset.t t/elements/reverse.t t/elements/select.t t/elements/select_attributes_escaped.t t/elements/select_attributes_escaped.yml t/elements/select_deflator_default.t t/elements/select_empty_first.t t/elements/select_empty_first.yml t/elements/select_empty_first_label.t t/elements/select_force_default.t t/elements/select_label_loc.t t/elements/select_multi_default_values.t t/elements/select_multi_value.t t/elements/select_optgroup.t t/elements/select_options.t t/elements/select_retain_default.t t/elements/select_same_name.t t/elements/select_same_name.yml t/elements/select_value_range.t t/elements/simple_table.t t/elements/simple_table.yml t/elements/simple_table_class.t t/elements/simple_table_class.yml t/elements/simple_table_multiple.t t/elements/simple_table_multiple.yml t/elements/src.t t/elements/submit.t t/elements/text.t t/elements/text_attributes.t t/elements/text_auto_comment_class.t t/elements/text_auto_comment_class.yml t/elements/text_auto_container_class.t t/elements/text_auto_container_class.yml t/elements/text_auto_container_comment_class.t t/elements/text_auto_container_comment_class.yml t/elements/text_auto_container_error_class.t t/elements/text_auto_container_error_class.yml t/elements/text_auto_container_label_class.t t/elements/text_auto_container_label_class.yml t/elements/text_auto_label_class.t t/elements/text_auto_label_class.yml t/elements/text_datalist_options.t t/elements/text_datalist_options.yml t/elements/text_datalist_values.t t/elements/text_datalist_values.yml t/elements/text_errors.t t/elements/text_force_default.t t/elements/text_layout.t t/elements/text_layout.yml t/elements/text_retain_default.t t/elements/text_title.t t/elements/textarea.t t/elements/url.t t/elements/url.yml t/examples/custom_label.t t/examples/custom_label2.t t/examples/field_as.t t/examples/fields_as_list_items.t t/field_accessor_loc.t t/field_accessor_loc_arrayref.t t/field_accessor_loc_arrayref.yml t/field_change_name.t t/field_id.t t/filters/all_by_default.t t/filters/callback.t t/filters/compoundjoin.t t/filters/compoundjoin.yml t/filters/compoundjoin_field_order.t t/filters/compoundjoin_field_order.yml t/filters/compoundjoin_join.t t/filters/compoundjoin_join.yml t/filters/compoundsprintf.t t/filters/compoundsprintf.yml t/filters/compoundsprintf_field_order.t t/filters/compoundsprintf_field_order.yml t/filters/copyvalue.t t/filters/encode.t t/filters/filter.t t/filters/formatnumber.t t/filters/formatnumber.yml t/filters/htmlescape.t t/filters/htmlscrubber.t t/filters/lowercase.t t/filters/nonnumeric.t t/filters/regex.t t/filters/regex.yml t/filters/regex_eval.t t/filters/regex_eval.yml t/filters/split.t t/filters/split.yml t/filters/trimedges.t t/filters/uppercase.t t/filters/whitespace.t t/force_errors/allornone.t t/force_errors/callbackonce.t t/force_errors/dependon.t t/force_errors/equal.t t/force_errors/force_errors.t t/force_errors/integer.t t/force_errors/minmaxfields.t t/form/add_render_class_args.t t/form/add_valid.t t/form/add_valid_unknown.t t/form/attributes.t t/form/auto_constraint_class.t t/form/auto_error_class.t t/form/auto_error_message.t t/form/auto_fieldset.t t/form/auto_label.t t/form/clone.t t/form/config_callback.t t/form/config_callback.yml t/form/constraints_from_dbic.t t/form/constraints_from_dbic_rs.t t/form/default_args.t t/form/default_args_alt.t t/form/default_args_alt.yml t/form/default_args_isa.t t/form/default_args_isa.yml t/form/default_args_not_inheriting.t t/form/default_values.t t/form/end.t t/form/error_message.t t/form/force_error_message.t t/form/form_error_message_class.t t/form/get_all_elements.t t/form/get_constraint.t t/form/get_constraints.t t/form/get_deflator.t t/form/get_deflators.t t/form/get_element.t t/form/get_elements.t t/form/get_errors.t t/form/get_field.t t/form/get_fields.t t/form/get_filter.t t/form/get_filters.t t/form/get_inflator.t t/form/get_inflators.t t/form/get_parent.t t/form/get_parent.yml t/form/has_errors.t t/form/hidden_fields.t t/form/init_arg.t t/form/insert_after.t t/form/insert_before.t t/form/javascript.t t/form/javascript_src.t t/form/languages.t t/form/languages.yml t/form/model.t t/form/multiple_same_named_fields.t t/form/object.t t/form/object/form t/form/param.t t/form/param_array.t t/form/param_list.t t/form/param_value.t t/form/params.t t/form/params_ignore_underscore.t t/form/query.t t/form/render_processed_value.t t/form/render_processed_value.yml t/form/start.t t/form/stash.t t/form/submitted.t t/form/submitted_and_valid.t t/form/title_xml.t t/form/valid.t t/i18n/add_localize_object.t t/i18n/add_localize_object_from_class.t t/i18n/add_localize_object_from_class.yml t/inflators/array.t t/inflators/callback.t t/inflators/compounddatetime.t t/inflators/compounddatetime.yml t/inflators/compounddatetime_field_order.t t/inflators/compounddatetime_field_order.yml t/inflators/datetime_optional.t t/inflators/datetime_parser.t t/inflators/datetime_regex.t t/inflators/datetime_regex_string.t t/inflators/datetime_strptime.t t/inflators/datetime_timezone.t t/inflators/datetime_with_constraint.t t/inflators/datetime_with_constraint.yml t/internals/default_args-types.t t/internals/default_args-types.yml t/lib/HTMLFormFu/DBICUniqueFake.pm t/lib/HTMLFormFu/ElementSetup.pm t/lib/HTMLFormFu/I18N.pm t/lib/HTMLFormFu/I18N/en.pm t/lib/HTMLFormFu/MyBlockRole.pm t/lib/HTMLFormFu/MyDeflator.pm t/lib/HTMLFormFu/MyFieldRole.pm t/lib/HTMLFormFu/MyFormRole.pm t/lib/HTMLFormFu/MyModel.pm t/lib/HTMLFormFu/MyObject.pm t/lib/HTMLFormFu/MyValidator.pm t/lib/HTMLFormFu/RegressLocalization.pm t/lib/HTMLFormFu/RegressLocalization/en.pm t/lib/HTMLFormFu/TestLib.pm t/lib/MyApp/Schema.pm t/lib/MyApp/Schema/Dongle.pm t/lib/MyApp/Schema/Person.pm t/load_config/config_file_path.t t/load_config/config_file_path/form.yml t/load_config/config_file_path2/form.yml t/load_config/load_config_file.t t/load_config/load_config_file_constraint_regex.t t/load_config/load_config_file_constraint_regex.yml t/load_config/load_config_file_fieldset.yml t/load_config/load_config_file_form.yml t/load_config/load_config_file_multi_stream.t t/load_config/load_config_file_multi_stream.yml t/load_config/load_config_file_multiple.t t/load_config/load_config_file_multiple.yml t/load_config/load_config_file_multiple1.yml t/load_config/load_config_file_multiple2.yml t/load_config/load_config_filestem.t t/model/hashref_create.t t/model/hashref_create_repeatable_without_nestedname.t t/model/hashref_create_repeatable_without_nestedname.yml t/model/hashref_default_values.t t/model/hashref_escaping.t t/model/hashref_multi_within_rep.t t/model/hashref_multi_within_rep.yml t/model/hashref_process.t t/multiple_select_fields.t t/multiple_text_fields.t t/nested-elements-file_post.t t/nested/constraints/allornone.t t/nested/constraints/callbackonce.t t/nested/constraints/constraint_when.t t/nested/constraints/constraint_when.yml t/nested/constraints/dependon.t t/nested/constraints/equal.t t/nested/constraints/minmaxfields.t t/nested/constraints/required.t t/nested/element_name.t t/nested/element_name.yml t/nested/elements/block_repeatable_multi_named.t t/nested/elements/block_repeatable_multi_named.yml t/nested/elements/block_repeatable_multi_named_filter.t t/nested/elements/block_repeatable_multi_named_filter.yml t/nested/elements/block_without_name.t t/nested/elements/block_without_name.yml t/nested/elements/checkbox_force_default.t t/nested/elements/checkbox_retain_default.t t/nested/elements/combobox.t t/nested/elements/date.t t/nested/elements/multi.t t/nested/elements/multi_named.t t/nested/elements/radio.t t/nested/elements/radio_force_default.t t/nested/elements/radio_retain_default.t t/nested/elements/radiogroup.t t/nested/elements/radiogroup_force_default.t t/nested/elements/radiogroup_retain_default.t t/nested/elements/repeatable_repeatable.t t/nested/elements/repeatable_repeatable.yml t/nested/elements/select.t t/nested/elements/select_force_default.t t/nested/elements/select_retain_default.t t/nested/elements/select_same_name.t t/nested/elements/select_same_name.yml t/nested/elements/text.t t/nested/filters/regex.t t/nested/form/render_processed_value.t t/nested/form/render_processed_value.yml t/nested/form_input.t t/nested/illegal_name.t t/nested/inflators/datetime_strptime.t t/nested/internals/form_processed_params.t t/nested/internals/hash_keys.t t/nested/param.t t/nested/params.t t/nested/pre_expanded.t t/nested/transformers/callback.t t/nested/valid.t t/nested/validators/callback.t t/output_processors/indent.t t/output_processors/indent_internals.t t/output_processors/strip_whitespace.t t/output_processors/strip_whitespace.yml t/plugins/stashvalid.t t/plugins/stashvalid.yml t/plugins/stashvalid_on_field.t t/plugins/stashvalid_on_field.yml t/repeatable/clone.t t/repeatable/clone.yml t/repeatable/constraints/attach_errors_to.t t/repeatable/constraints/attach_errors_to.yml t/repeatable/constraints/equal.t t/repeatable/constraints/equal.yml t/repeatable/constraints/required.t t/repeatable/constraints/required.yml t/repeatable/constraints/required_not_increment_field_names.t t/repeatable/constraints/required_not_increment_field_names.yml t/repeatable/constraints/required_not_nested.t t/repeatable/constraints/required_not_nested.yml t/repeatable/constraints/when.t t/repeatable/constraints/when.yml t/repeatable/repeatable/constraints/repeatable_any.t t/repeatable/repeatable/constraints/repeatable_any.yml t/roles/block.t t/roles/block.yml t/roles/field.t t/roles/field.yml t/roles/form.t t/roles/form.yml t/templates/field_layout t/transformers/callback.t t/utils/append_xml_attribute.t t/utils/has_xml_attribute.t t/utils/remove_xml_attribute.t t/validators/callback.t t/validators/validator.t xt/author/00-compile.t xt/author/critic.t xt/author/eol.t xt/author/pod-syntax.t xt/circular_reference.t xt/circular_reference.yml xt/release/distmeta.t xt/release/kwalitee.t xt/release/pause-permissions.t t000755000765000024 012775731227 13163 5ustar00nigelstaff000000000000HTML-FormFu-2.0501use.t100644000765000024 23512775731227 14425 0ustar00nigelstaff000000000000HTML-FormFu-2.05/tuse strict; use warnings; use Test::More tests => 3; use_ok('HTML::FormFu'); use_ok('HTML::FormFu::Preload'); ok( $INC{'HTML/FormFu/Element/Text.pm'} ); META.json100644000765000024 12045312775731227 14546 0ustar00nigelstaff000000000000HTML-FormFu-2.05{ "abstract" : "HTML Form Creation, Rendering and Validation Framework", "author" : [ "Carl Franks " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.007, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "HTML-FormFu", "no_index" : { "directory" : [ "eg", "examples", "inc", "share", "t", "xt" ] }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0", "File::ShareDir::Install" : "0.06" } }, "develop" : { "requires" : { "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Test::CPAN::Meta" : "0", "Test::EOL" : "0", "Test::Kwalitee" : "1.21", "Test::More" : "0.88", "Test::PAUSE::Permissions" : "0", "Test::Pod" : "1.41" } }, "runtime" : { "requires" : { "Carp" : "0", "Class::MOP::Method" : "0", "Clone" : "0.31", "Config::Any" : "0.18", "Cwd" : "0", "Data::Visitor" : "0.26", "Data::Visitor::Callback" : "0", "DateTime" : "0.54", "DateTime::Format::Builder" : "0.7901", "DateTime::Format::Natural" : "0", "DateTime::Format::Strptime" : "1.2000", "DateTime::Locale" : "0.45", "Email::Valid" : "0", "Encode" : "0", "Exporter" : "5.57", "Fatal" : "0", "File::Copy" : "0", "File::Find" : "0", "File::ShareDir" : "0", "File::Spec" : "0", "File::Temp" : "0", "HTML::Scrubber" : "0", "HTML::TokeParser::Simple" : "3.14", "HTTP::Headers" : "1.64", "Hash::Flatten" : "0", "IO::File" : "0", "List::MoreUtils" : "0", "List::Util" : "1.45", "Locale::Maketext" : "0", "Module::Pluggable" : "0", "Moose" : "1.00", "Moose::Role" : "0", "Moose::Util" : "0", "MooseX::Aliases" : "0", "Number::Format" : "0", "Path::Class::File" : "0", "Readonly" : "0", "Regexp::Common" : "0", "Scalar::Util" : "0", "Storable" : "0", "Task::Weaken" : "0", "YAML::XS" : "0.32", "perl" : "5.010" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "CGI" : "3.37", "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "POSIX" : "0", "Regexp::Assemble" : "0", "Test::Exception" : "0", "Test::Memory::Cycle" : "0", "Test::More" : "0.92" } } }, "provides" : { "HTML::FormFu" : { "file" : "lib/HTML/FormFu.pm", "version" : "2.05" }, "HTML::FormFu::Attribute" : { "file" : "lib/HTML/FormFu/Attribute.pm", "version" : "2.05" }, "HTML::FormFu::Constants" : { "file" : "lib/HTML/FormFu/Constants.pm", "version" : "2.05" }, "HTML::FormFu::Constraint" : { "file" : "lib/HTML/FormFu/Constraint.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::ASCII" : { "file" : "lib/HTML/FormFu/Constraint/ASCII.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::AllOrNone" : { "file" : "lib/HTML/FormFu/Constraint/AllOrNone.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::AutoSet" : { "file" : "lib/HTML/FormFu/Constraint/AutoSet.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::Bool" : { "file" : "lib/HTML/FormFu/Constraint/Bool.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::Callback" : { "file" : "lib/HTML/FormFu/Constraint/Callback.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::CallbackOnce" : { "file" : "lib/HTML/FormFu/Constraint/CallbackOnce.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::DateTime" : { "file" : "lib/HTML/FormFu/Constraint/DateTime.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::DependOn" : { "file" : "lib/HTML/FormFu/Constraint/DependOn.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::Email" : { "file" : "lib/HTML/FormFu/Constraint/Email.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::Equal" : { "file" : "lib/HTML/FormFu/Constraint/Equal.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::File" : { "file" : "lib/HTML/FormFu/Constraint/File.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::File::MIME" : { "file" : "lib/HTML/FormFu/Constraint/File/MIME.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::File::MaxSize" : { "file" : "lib/HTML/FormFu/Constraint/File/MaxSize.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::File::MinSize" : { "file" : "lib/HTML/FormFu/Constraint/File/MinSize.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::File::Size" : { "file" : "lib/HTML/FormFu/Constraint/File/Size.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::Integer" : { "file" : "lib/HTML/FormFu/Constraint/Integer.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::Length" : { "file" : "lib/HTML/FormFu/Constraint/Length.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::MaxLength" : { "file" : "lib/HTML/FormFu/Constraint/MaxLength.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::MaxRange" : { "file" : "lib/HTML/FormFu/Constraint/MaxRange.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::MinLength" : { "file" : "lib/HTML/FormFu/Constraint/MinLength.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::MinMaxFields" : { "file" : "lib/HTML/FormFu/Constraint/MinMaxFields.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::MinRange" : { "file" : "lib/HTML/FormFu/Constraint/MinRange.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::Number" : { "file" : "lib/HTML/FormFu/Constraint/Number.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::Printable" : { "file" : "lib/HTML/FormFu/Constraint/Printable.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::Range" : { "file" : "lib/HTML/FormFu/Constraint/Range.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::Regex" : { "file" : "lib/HTML/FormFu/Constraint/Regex.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::Repeatable::Any" : { "file" : "lib/HTML/FormFu/Constraint/Repeatable/Any.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::Required" : { "file" : "lib/HTML/FormFu/Constraint/Required.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::Set" : { "file" : "lib/HTML/FormFu/Constraint/Set.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::SingleValue" : { "file" : "lib/HTML/FormFu/Constraint/SingleValue.pm", "version" : "2.05" }, "HTML::FormFu::Constraint::Word" : { "file" : "lib/HTML/FormFu/Constraint/Word.pm", "version" : "2.05" }, "HTML::FormFu::Deflator" : { "file" : "lib/HTML/FormFu/Deflator.pm", "version" : "2.05" }, "HTML::FormFu::Deflator::Callback" : { "file" : "lib/HTML/FormFu/Deflator/Callback.pm", "version" : "2.05" }, "HTML::FormFu::Deflator::CompoundDateTime" : { "file" : "lib/HTML/FormFu/Deflator/CompoundDateTime.pm", "version" : "2.05" }, "HTML::FormFu::Deflator::CompoundSplit" : { "file" : "lib/HTML/FormFu/Deflator/CompoundSplit.pm", "version" : "2.05" }, "HTML::FormFu::Deflator::FormatNumber" : { "file" : "lib/HTML/FormFu/Deflator/FormatNumber.pm", "version" : "2.05" }, "HTML::FormFu::Deflator::PathClassFile" : { "file" : "lib/HTML/FormFu/Deflator/PathClassFile.pm", "version" : "2.05" }, "HTML::FormFu::Deflator::Strftime" : { "file" : "lib/HTML/FormFu/Deflator/Strftime.pm", "version" : "2.05" }, "HTML::FormFu::Deploy" : { "file" : "lib/HTML/FormFu/Deploy.pm", "version" : "2.05" }, "HTML::FormFu::Element" : { "file" : "lib/HTML/FormFu/Element.pm", "version" : "2.05" }, "HTML::FormFu::Element::Blank" : { "file" : "lib/HTML/FormFu/Element/Blank.pm", "version" : "2.05" }, "HTML::FormFu::Element::Block" : { "file" : "lib/HTML/FormFu/Element/Block.pm", "version" : "2.05" }, "HTML::FormFu::Element::Button" : { "file" : "lib/HTML/FormFu/Element/Button.pm", "version" : "2.05" }, "HTML::FormFu::Element::Checkbox" : { "file" : "lib/HTML/FormFu/Element/Checkbox.pm", "version" : "2.05" }, "HTML::FormFu::Element::Checkboxgroup" : { "file" : "lib/HTML/FormFu/Element/Checkboxgroup.pm", "version" : "2.05" }, "HTML::FormFu::Element::ComboBox" : { "file" : "lib/HTML/FormFu/Element/ComboBox.pm", "version" : "2.05" }, "HTML::FormFu::Element::ContentButton" : { "file" : "lib/HTML/FormFu/Element/ContentButton.pm", "version" : "2.05" }, "HTML::FormFu::Element::Date" : { "file" : "lib/HTML/FormFu/Element/Date.pm", "version" : "2.05" }, "HTML::FormFu::Element::DateTime" : { "file" : "lib/HTML/FormFu/Element/DateTime.pm", "version" : "2.05" }, "HTML::FormFu::Element::Email" : { "file" : "lib/HTML/FormFu/Element/Email.pm", "version" : "2.05" }, "HTML::FormFu::Element::Fieldset" : { "file" : "lib/HTML/FormFu/Element/Fieldset.pm", "version" : "2.05" }, "HTML::FormFu::Element::File" : { "file" : "lib/HTML/FormFu/Element/File.pm", "version" : "2.05" }, "HTML::FormFu::Element::Hidden" : { "file" : "lib/HTML/FormFu/Element/Hidden.pm", "version" : "2.05" }, "HTML::FormFu::Element::Hr" : { "file" : "lib/HTML/FormFu/Element/Hr.pm", "version" : "2.05" }, "HTML::FormFu::Element::Image" : { "file" : "lib/HTML/FormFu/Element/Image.pm", "version" : "2.05" }, "HTML::FormFu::Element::Label" : { "file" : "lib/HTML/FormFu/Element/Label.pm", "version" : "2.05" }, "HTML::FormFu::Element::Multi" : { "file" : "lib/HTML/FormFu/Element/Multi.pm", "version" : "2.05" }, "HTML::FormFu::Element::Number" : { "file" : "lib/HTML/FormFu/Element/Number.pm", "version" : "2.05" }, "HTML::FormFu::Element::Password" : { "file" : "lib/HTML/FormFu/Element/Password.pm", "version" : "2.05" }, "HTML::FormFu::Element::Radio" : { "file" : "lib/HTML/FormFu/Element/Radio.pm", "version" : "2.05" }, "HTML::FormFu::Element::Radiogroup" : { "file" : "lib/HTML/FormFu/Element/Radiogroup.pm", "version" : "2.05" }, "HTML::FormFu::Element::Repeatable" : { "file" : "lib/HTML/FormFu/Element/Repeatable.pm", "version" : "2.05" }, "HTML::FormFu::Element::Reset" : { "file" : "lib/HTML/FormFu/Element/Reset.pm", "version" : "2.05" }, "HTML::FormFu::Element::Select" : { "file" : "lib/HTML/FormFu/Element/Select.pm", "version" : "2.05" }, "HTML::FormFu::Element::SimpleTable" : { "file" : "lib/HTML/FormFu/Element/SimpleTable.pm", "version" : "2.05" }, "HTML::FormFu::Element::Src" : { "file" : "lib/HTML/FormFu/Element/Src.pm", "version" : "2.05" }, "HTML::FormFu::Element::Submit" : { "file" : "lib/HTML/FormFu/Element/Submit.pm", "version" : "2.05" }, "HTML::FormFu::Element::Text" : { "file" : "lib/HTML/FormFu/Element/Text.pm", "version" : "2.05" }, "HTML::FormFu::Element::Textarea" : { "file" : "lib/HTML/FormFu/Element/Textarea.pm", "version" : "2.05" }, "HTML::FormFu::Element::URL" : { "file" : "lib/HTML/FormFu/Element/URL.pm", "version" : "2.05" }, "HTML::FormFu::Exception" : { "file" : "lib/HTML/FormFu/Exception.pm", "version" : "2.05" }, "HTML::FormFu::Exception::Constraint" : { "file" : "lib/HTML/FormFu/Exception/Constraint.pm", "version" : "2.05" }, "HTML::FormFu::Exception::Inflator" : { "file" : "lib/HTML/FormFu/Exception/Inflator.pm", "version" : "2.05" }, "HTML::FormFu::Exception::Input" : { "file" : "lib/HTML/FormFu/Exception/Input.pm", "version" : "2.05" }, "HTML::FormFu::Exception::Transformer" : { "file" : "lib/HTML/FormFu/Exception/Transformer.pm", "version" : "2.05" }, "HTML::FormFu::Exception::Validator" : { "file" : "lib/HTML/FormFu/Exception/Validator.pm", "version" : "2.05" }, "HTML::FormFu::FakeQuery" : { "file" : "lib/HTML/FormFu/FakeQuery.pm", "version" : "2.05" }, "HTML::FormFu::Filter" : { "file" : "lib/HTML/FormFu/Filter.pm", "version" : "2.05" }, "HTML::FormFu::Filter::Callback" : { "file" : "lib/HTML/FormFu/Filter/Callback.pm", "version" : "2.05" }, "HTML::FormFu::Filter::CompoundJoin" : { "file" : "lib/HTML/FormFu/Filter/CompoundJoin.pm", "version" : "2.05" }, "HTML::FormFu::Filter::CompoundSprintf" : { "file" : "lib/HTML/FormFu/Filter/CompoundSprintf.pm", "version" : "2.05" }, "HTML::FormFu::Filter::CopyValue" : { "file" : "lib/HTML/FormFu/Filter/CopyValue.pm", "version" : "2.05" }, "HTML::FormFu::Filter::Encode" : { "file" : "lib/HTML/FormFu/Filter/Encode.pm", "version" : "2.05" }, "HTML::FormFu::Filter::ForceListValue" : { "file" : "lib/HTML/FormFu/Filter/ForceListValue.pm", "version" : "2.05" }, "HTML::FormFu::Filter::FormatNumber" : { "file" : "lib/HTML/FormFu/Filter/FormatNumber.pm", "version" : "2.05" }, "HTML::FormFu::Filter::HTMLEscape" : { "file" : "lib/HTML/FormFu/Filter/HTMLEscape.pm", "version" : "2.05" }, "HTML::FormFu::Filter::HTMLScrubber" : { "file" : "lib/HTML/FormFu/Filter/HTMLScrubber.pm", "version" : "2.05" }, "HTML::FormFu::Filter::LowerCase" : { "file" : "lib/HTML/FormFu/Filter/LowerCase.pm", "version" : "2.05" }, "HTML::FormFu::Filter::NonNumeric" : { "file" : "lib/HTML/FormFu/Filter/NonNumeric.pm", "version" : "2.05" }, "HTML::FormFu::Filter::Regex" : { "file" : "lib/HTML/FormFu/Filter/Regex.pm", "version" : "2.05" }, "HTML::FormFu::Filter::Split" : { "file" : "lib/HTML/FormFu/Filter/Split.pm", "version" : "2.05" }, "HTML::FormFu::Filter::TrimEdges" : { "file" : "lib/HTML/FormFu/Filter/TrimEdges.pm", "version" : "2.05" }, "HTML::FormFu::Filter::UpperCase" : { "file" : "lib/HTML/FormFu/Filter/UpperCase.pm", "version" : "2.05" }, "HTML::FormFu::Filter::Whitespace" : { "file" : "lib/HTML/FormFu/Filter/Whitespace.pm", "version" : "2.05" }, "HTML::FormFu::I18N" : { "file" : "lib/HTML/FormFu/I18N.pm", "version" : "2.05" }, "HTML::FormFu::I18N::bg" : { "file" : "lib/HTML/FormFu/I18N/bg.pm", "version" : "2.05" }, "HTML::FormFu::I18N::cs" : { "file" : "lib/HTML/FormFu/I18N/cs.pm", "version" : "2.05" }, "HTML::FormFu::I18N::da" : { "file" : "lib/HTML/FormFu/I18N/da.pm", "version" : "2.05" }, "HTML::FormFu::I18N::de" : { "file" : "lib/HTML/FormFu/I18N/de.pm", "version" : "2.05" }, "HTML::FormFu::I18N::en" : { "file" : "lib/HTML/FormFu/I18N/en.pm", "version" : "2.05" }, "HTML::FormFu::I18N::es" : { "file" : "lib/HTML/FormFu/I18N/es.pm", "version" : "2.05" }, "HTML::FormFu::I18N::fr" : { "file" : "lib/HTML/FormFu/I18N/fr.pm", "version" : "2.05" }, "HTML::FormFu::I18N::hu" : { "file" : "lib/HTML/FormFu/I18N/hu.pm", "version" : "2.05" }, "HTML::FormFu::I18N::it" : { "file" : "lib/HTML/FormFu/I18N/it.pm", "version" : "2.05" }, "HTML::FormFu::I18N::ja" : { "file" : "lib/HTML/FormFu/I18N/ja.pm", "version" : "2.05" }, "HTML::FormFu::I18N::no" : { "file" : "lib/HTML/FormFu/I18N/no.pm", "version" : "2.05" }, "HTML::FormFu::I18N::pt_br" : { "file" : "lib/HTML/FormFu/I18N/pt_br.pm", "version" : "2.05" }, "HTML::FormFu::I18N::pt_pt" : { "file" : "lib/HTML/FormFu/I18N/pt_pt.pm", "version" : "2.05" }, "HTML::FormFu::I18N::ro" : { "file" : "lib/HTML/FormFu/I18N/ro.pm", "version" : "2.05" }, "HTML::FormFu::I18N::ru" : { "file" : "lib/HTML/FormFu/I18N/ru.pm", "version" : "2.05" }, "HTML::FormFu::I18N::ua" : { "file" : "lib/HTML/FormFu/I18N/ua.pm", "version" : "2.05" }, "HTML::FormFu::I18N::zh_cn" : { "file" : "lib/HTML/FormFu/I18N/zh_cn.pm", "version" : "2.05" }, "HTML::FormFu::Inflator" : { "file" : "lib/HTML/FormFu/Inflator.pm", "version" : "2.05" }, "HTML::FormFu::Inflator::Callback" : { "file" : "lib/HTML/FormFu/Inflator/Callback.pm", "version" : "2.05" }, "HTML::FormFu::Inflator::CompoundDateTime" : { "file" : "lib/HTML/FormFu/Inflator/CompoundDateTime.pm", "version" : "2.05" }, "HTML::FormFu::Inflator::DateTime" : { "file" : "lib/HTML/FormFu/Inflator/DateTime.pm", "version" : "2.05" }, "HTML::FormFu::Literal" : { "file" : "lib/HTML/FormFu/Literal.pm", "version" : "2.05" }, "HTML::FormFu::Localize" : { "file" : "lib/HTML/FormFu/Localize.pm", "version" : "2.05" }, "HTML::FormFu::Model" : { "file" : "lib/HTML/FormFu/Model.pm", "version" : "2.05" }, "HTML::FormFu::Model::HashRef" : { "file" : "lib/HTML/FormFu/Model/HashRef.pm", "version" : "2.05" }, "HTML::FormFu::ObjectUtil" : { "file" : "lib/HTML/FormFu/ObjectUtil.pm", "version" : "2.05" }, "HTML::FormFu::OutputProcessor" : { "file" : "lib/HTML/FormFu/OutputProcessor.pm", "version" : "2.05" }, "HTML::FormFu::OutputProcessor::Indent" : { "file" : "lib/HTML/FormFu/OutputProcessor/Indent.pm", "version" : "2.05" }, "HTML::FormFu::OutputProcessor::StripWhitespace" : { "file" : "lib/HTML/FormFu/OutputProcessor/StripWhitespace.pm", "version" : "2.05" }, "HTML::FormFu::Plugin" : { "file" : "lib/HTML/FormFu/Plugin.pm", "version" : "2.05" }, "HTML::FormFu::Plugin::StashValid" : { "file" : "lib/HTML/FormFu/Plugin/StashValid.pm", "version" : "2.05" }, "HTML::FormFu::Preload" : { "file" : "lib/HTML/FormFu/Preload.pm", "version" : "2.05" }, "HTML::FormFu::Processor" : { "file" : "lib/HTML/FormFu/Processor.pm", "version" : "2.05" }, "HTML::FormFu::QueryType::CGI" : { "file" : "lib/HTML/FormFu/QueryType/CGI.pm", "version" : "2.05" }, "HTML::FormFu::QueryType::CGI::Simple" : { "file" : "lib/HTML/FormFu/QueryType/CGI/Simple.pm", "version" : "2.05" }, "HTML::FormFu::QueryType::Catalyst" : { "file" : "lib/HTML/FormFu/QueryType/Catalyst.pm", "version" : "2.05" }, "HTML::FormFu::Role::Constraint::Others" : { "file" : "lib/HTML/FormFu/Role/Constraint/Others.pm", "version" : "2.05" }, "HTML::FormFu::Role::ContainsElements" : { "file" : "lib/HTML/FormFu/Role/ContainsElements.pm", "version" : "2.05" }, "HTML::FormFu::Role::ContainsElementsSharedWithField" : { "file" : "lib/HTML/FormFu/Role/ContainsElementsSharedWithField.pm", "version" : "2.05" }, "HTML::FormFu::Role::CreateChildren" : { "file" : "lib/HTML/FormFu/Role/CreateChildren.pm", "version" : "2.05" }, "HTML::FormFu::Role::CustomRoles" : { "file" : "lib/HTML/FormFu/Role/CustomRoles.pm", "version" : "2.05" }, "HTML::FormFu::Role::Element::Coercible" : { "file" : "lib/HTML/FormFu/Role/Element/Coercible.pm", "version" : "2.05" }, "HTML::FormFu::Role::Element::Field" : { "file" : "lib/HTML/FormFu/Role/Element/Field.pm", "version" : "2.05" }, "HTML::FormFu::Role::Element::FieldMethods" : { "file" : "lib/HTML/FormFu/Role/Element/FieldMethods.pm", "version" : "2.05" }, "HTML::FormFu::Role::Element::Group" : { "file" : "lib/HTML/FormFu/Role/Element/Group.pm", "version" : "2.05" }, "HTML::FormFu::Role::Element::Input" : { "file" : "lib/HTML/FormFu/Role/Element/Input.pm", "version" : "2.05" }, "HTML::FormFu::Role::Element::Layout" : { "file" : "lib/HTML/FormFu/Role/Element/Layout.pm", "version" : "2.05" }, "HTML::FormFu::Role::Element::MultiElement" : { "file" : "lib/HTML/FormFu/Role/Element/MultiElement.pm", "version" : "2.05" }, "HTML::FormFu::Role::Element::NonBlock" : { "file" : "lib/HTML/FormFu/Role/Element/NonBlock.pm", "version" : "2.05" }, "HTML::FormFu::Role::Element::ProcessOptionsFromModel" : { "file" : "lib/HTML/FormFu/Role/Element/ProcessOptionsFromModel.pm", "version" : "2.05" }, "HTML::FormFu::Role::Element::SingleValueField" : { "file" : "lib/HTML/FormFu/Role/Element/SingleValueField.pm", "version" : "2.05" }, "HTML::FormFu::Role::Filter::Compound" : { "file" : "lib/HTML/FormFu/Role/Filter/Compound.pm", "version" : "2.05" }, "HTML::FormFu::Role::FormAndBlockMethods" : { "file" : "lib/HTML/FormFu/Role/FormAndBlockMethods.pm", "version" : "2.05" }, "HTML::FormFu::Role::FormAndElementMethods" : { "file" : "lib/HTML/FormFu/Role/FormAndElementMethods.pm", "version" : "2.05" }, "HTML::FormFu::Role::FormBlockAndFieldMethods" : { "file" : "lib/HTML/FormFu/Role/FormBlockAndFieldMethods.pm", "version" : "2.05" }, "HTML::FormFu::Role::GetProcessors" : { "file" : "lib/HTML/FormFu/Role/GetProcessors.pm", "version" : "2.05" }, "HTML::FormFu::Role::HasParent" : { "file" : "lib/HTML/FormFu/Role/HasParent.pm", "version" : "2.05" }, "HTML::FormFu::Role::NestedHashUtils" : { "file" : "lib/HTML/FormFu/Role/NestedHashUtils.pm", "version" : "2.05" }, "HTML::FormFu::Role::Populate" : { "file" : "lib/HTML/FormFu/Role/Populate.pm", "version" : "2.05" }, "HTML::FormFu::Role::Render" : { "file" : "lib/HTML/FormFu/Role/Render.pm", "version" : "2.05" }, "HTML::FormFu::Transformer" : { "file" : "lib/HTML/FormFu/Transformer.pm", "version" : "2.05" }, "HTML::FormFu::Transformer::Callback" : { "file" : "lib/HTML/FormFu/Transformer/Callback.pm", "version" : "2.05" }, "HTML::FormFu::Upload" : { "file" : "lib/HTML/FormFu/Upload.pm", "version" : "2.05" }, "HTML::FormFu::UploadParam" : { "file" : "lib/HTML/FormFu/UploadParam.pm", "version" : "2.05" }, "HTML::FormFu::Util" : { "file" : "lib/HTML/FormFu/Util.pm", "version" : "2.05" }, "HTML::FormFu::Validator" : { "file" : "lib/HTML/FormFu/Validator.pm", "version" : "2.05" }, "HTML::FormFu::Validator::Callback" : { "file" : "lib/HTML/FormFu/Validator/Callback.pm", "version" : "2.05" }, "MooseX::Attribute::FormFuChained" : { "file" : "lib/MooseX/Attribute/FormFuChained.pm", "version" : "2.05" }, "MooseX::Attribute::FormFuChained::Method::Accessor" : { "file" : "lib/MooseX/Attribute/FormFuChained.pm", "version" : "2.05" }, "MooseX::FormFuChainedAccessors" : { "file" : "lib/MooseX/FormFuChainedAccessors.pm", "version" : "2.05" }, "MooseX::Traits::Attribute::FormFuChained" : { "file" : "lib/MooseX/Attribute/FormFuChained.pm", "version" : "2.05" } }, "release_status" : "stable", "resources" : { "homepage" : "https://github.com/fireartist/HTML-FormFu", "repository" : { "type" : "git", "url" : "https://github.com/fireartist/HTML-FormFu.git", "web" : "https://github.com/fireartist/HTML-FormFu" } }, "version" : "2.05", "x_Dist_Zilla" : { "perl" : { "version" : "5.024000" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "requires" } }, "name" : "Prereqs", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "test", "type" : "requires" } }, "name" : "TestRequires", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::Test::Perl::Critic", "name" : "Test::Perl::Critic", "version" : "3.000" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "MetaTests", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::OurPkgVersion", "name" : "OurPkgVersion", "version" : "0.10" }, { "class" : "Dist::Zilla::Plugin::PodVersion", "name" : "PodVersion", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::Test::Kwalitee", "config" : { "Dist::Zilla::Plugin::Test::Kwalitee" : { "filename" : "xt/release/kwalitee.t", "skiptest" : [] } }, "name" : "Test::Kwalitee", "version" : "2.12" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "config" : { "Dist::Zilla::Plugin::Test::EOL" : { "filename" : "xt/author/eol.t", "finder" : [ ":InstallModules" ], "trailing_whitespace" : 1 } }, "name" : "Test::EOL", "version" : "0.19" }, { "class" : "Dist::Zilla::Plugin::Test::PAUSE::Permissions", "name" : "Test::PAUSE::Permissions", "version" : "0.003" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "Git::GatherDir", "version" : "2.039" }, { "class" : "Dist::Zilla::Plugin::Git::NextVersion", "config" : { "Dist::Zilla::Plugin::Git::NextVersion" : { "first_version" : "0.001", "version_by_branch" : 0, "version_regexp" : "(?^:^v(.+)$)" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "Git::NextVersion", "version" : "2.039" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", "config" : { "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "Git::CheckFor::CorrectBranch", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Check", "name" : "Git::Remote::Check", "version" : "0.1.2" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@Starter/PruneCruft", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@Starter/ManifestSkip", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Starter/MetaConfig", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@Starter/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "6.007" } ], "include_underscores" : 0 }, "Dist::Zilla::Role::MetaProvider::Provider" : { "$Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.002003", "inherit_missing" : 1, "inherit_version" : 1, "meta_noindex" : 1 }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000031", "version" : "0.004" } }, "name" : "@Starter/MetaProvides::Package", "version" : "2.004002" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "@Starter/MetaNoIndex", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Starter/MetaYAML", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Starter/MetaJSON", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Starter/License", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "@Starter/ReadmeAnyFromPod", "version" : "0.161170" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@Starter/ExecDir", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@Starter/ShareDir", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Starter/PodSyntaxTests", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@Starter/Test::ReportPrereqs", "version" : "0.025" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "bail_out_on_fail" : 0, "fail_on_warning" : "author", "fake_home" : 0, "filename" : "xt/author/00-compile.t", "module_finder" : [ ":InstallModules" ], "needs_display" : 0, "phase" : "develop", "script_finder" : [ ":PerlExecFiles" ], "skips" : [] } }, "name" : "@Starter/Test::Compile", "version" : "2.054" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@Starter/MakeMaker", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Starter/Manifest", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Starter/TestRelease", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@Starter/RunExtraTests", "version" : "0.029" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Starter/ConfirmRelease", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Starter/UploadToCPAN", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "Pod_Readme", "version" : "0.161170" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes", "README.pod", "dist.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Git/Check", "version" : "2.039" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "v%v%n%n%c" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes", "README.pod", "dist.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Git/Commit", "version" : "2.039" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "v2.05", "tag_format" : "v%v", "tag_message" : "v%v" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Git/Tag", "version" : "2.039" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Git/Push", "version" : "2.039" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "GithubMeta", "version" : "0.54" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "NextRelease", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@Starter/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "6.007" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : 0 }, "version" : "6.007" } }, "x_serialization_backend" : "Cpanel::JSON::XS version 3.0217" } 04basic.t100644000765000024 474212775731227 14744 0ustar00nigelstaff000000000000HTML-FormFu-2.05/tuse strict; use warnings; use YAML::XS qw( LoadFile ); use Test::More tests => 7; use HTML::FormFu; my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); $form->action('/foo/bar')->id('form')->auto_id('%n'); my $fs = $form->element('Fieldset')->legend('Jimi'); $fs->element('Text')->name('age')->label('Age')->comment('x') ->constraints( [ 'Integer', 'Required', ] ); $fs->element('Text')->name('name')->label('Name'); $fs->element('Hidden')->name('ok')->value('OK'); $form->constraints( { type => 'Required', name => 'name', } ); $form->filter('HTMLEscape'); # hash-ref my $alt_hash = { action => '/foo/bar', id => 'form', auto_id => '%n', elements => [ { type => 'Fieldset', legend => 'Jimi', elements => [ { type => 'Text', name => 'age', label => 'Age', comment => 'x', constraints => [ 'Integer', 'Required', ], }, { type => 'Text', name => 'name', label => 'Name', }, { type => 'Hidden', name => 'ok', value => 'OK', }, ], } ], constraints => { type => 'Required', name => 'name', }, filters => ['HTMLEscape'], }; # hash-ref from yaml my $yml_hash = LoadFile('t/04basic.yml'); # compare hash-refs is_deeply( $yml_hash, $alt_hash ); # xhtml output my $alt_form = HTML::FormFu->new($alt_hash); $alt_form->tt_args( { INCLUDE_PATH => 'share/templates/tt/xhtml' } ); my $yml_form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); $yml_form->load_config_file('t/04basic.yml'); my $xhtml = <
Jimi
x
EOF is( "$form", $xhtml ); is( "$alt_form", $xhtml ); is( "$yml_form", $xhtml ); # With mocked basic query { $form->process( { age => 'a', name => 'sri', } ); ok( $form->valid('name'), 'name is valid' ); ok( !$form->valid('age'), 'age is not valid' ); my $errors = $form->get_errors; is( @$errors, 1 ); } Makefile.PL100644000765000024 1056712775731227 15063 0ustar00nigelstaff000000000000HTML-FormFu-2.05# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.007. use strict; use warnings; use 5.010; use ExtUtils::MakeMaker; use File::ShareDir::Install; $File::ShareDir::Install::INCLUDE_DOTFILES = 1; $File::ShareDir::Install::INCLUDE_DOTDIRS = 1; install_share dist => "share"; my %WriteMakefileArgs = ( "ABSTRACT" => "HTML Form Creation, Rendering and Validation Framework", "AUTHOR" => "Carl Franks ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::ShareDir::Install" => "0.06" }, "DISTNAME" => "HTML-FormFu", "EXE_FILES" => [ "bin/html_formfu_deploy.pl", "bin/html_formfu_dumpconf.pl" ], "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.010", "NAME" => "HTML::FormFu", "PREREQ_PM" => { "Carp" => 0, "Class::MOP::Method" => 0, "Clone" => "0.31", "Config::Any" => "0.18", "Cwd" => 0, "Data::Visitor" => "0.26", "Data::Visitor::Callback" => 0, "DateTime" => "0.54", "DateTime::Format::Builder" => "0.7901", "DateTime::Format::Natural" => 0, "DateTime::Format::Strptime" => "1.2000", "DateTime::Locale" => "0.45", "Email::Valid" => 0, "Encode" => 0, "Exporter" => "5.57", "Fatal" => 0, "File::Copy" => 0, "File::Find" => 0, "File::ShareDir" => 0, "File::Spec" => 0, "File::Temp" => 0, "HTML::Scrubber" => 0, "HTML::TokeParser::Simple" => "3.14", "HTTP::Headers" => "1.64", "Hash::Flatten" => 0, "IO::File" => 0, "List::MoreUtils" => 0, "List::Util" => "1.45", "Locale::Maketext" => 0, "Module::Pluggable" => 0, "Moose" => "1.00", "Moose::Role" => 0, "Moose::Util" => 0, "MooseX::Aliases" => 0, "Number::Format" => 0, "Path::Class::File" => 0, "Readonly" => 0, "Regexp::Common" => 0, "Scalar::Util" => 0, "Storable" => 0, "Task::Weaken" => 0, "YAML::XS" => "0.32" }, "TEST_REQUIRES" => { "CGI" => "3.37", "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "POSIX" => 0, "Regexp::Assemble" => 0, "Test::Exception" => 0, "Test::Memory::Cycle" => 0, "Test::More" => "0.92" }, "VERSION" => "2.05", "test" => { "TESTS" => "t/*.t t/bugs/*.t t/constraints/*.t t/deflators/*.t t/elements/*.t t/examples/*.t t/filters/*.t t/force_errors/*.t t/form/*.t t/i18n/*.t t/inflators/*.t t/internals/*.t t/load_config/*.t t/model/*.t t/nested/*.t t/nested/constraints/*.t t/nested/elements/*.t t/nested/filters/*.t t/nested/form/*.t t/nested/inflators/*.t t/nested/internals/*.t t/nested/transformers/*.t t/nested/validators/*.t t/output_processors/*.t t/plugins/*.t t/repeatable/*.t t/repeatable/constraints/*.t t/repeatable/repeatable/constraints/*.t t/roles/*.t t/transformers/*.t t/utils/*.t t/validators/*.t" } ); my %FallbackPrereqs = ( "CGI" => "3.37", "Carp" => 0, "Class::MOP::Method" => 0, "Clone" => "0.31", "Config::Any" => "0.18", "Cwd" => 0, "Data::Visitor" => "0.26", "Data::Visitor::Callback" => 0, "DateTime" => "0.54", "DateTime::Format::Builder" => "0.7901", "DateTime::Format::Natural" => 0, "DateTime::Format::Strptime" => "1.2000", "DateTime::Locale" => "0.45", "Email::Valid" => 0, "Encode" => 0, "Exporter" => "5.57", "ExtUtils::MakeMaker" => 0, "Fatal" => 0, "File::Copy" => 0, "File::Find" => 0, "File::ShareDir" => 0, "File::Spec" => 0, "File::Temp" => 0, "HTML::Scrubber" => 0, "HTML::TokeParser::Simple" => "3.14", "HTTP::Headers" => "1.64", "Hash::Flatten" => 0, "IO::File" => 0, "List::MoreUtils" => 0, "List::Util" => "1.45", "Locale::Maketext" => 0, "Module::Pluggable" => 0, "Moose" => "1.00", "Moose::Role" => 0, "Moose::Util" => 0, "MooseX::Aliases" => 0, "Number::Format" => 0, "POSIX" => 0, "Path::Class::File" => 0, "Readonly" => 0, "Regexp::Assemble" => 0, "Regexp::Common" => 0, "Scalar::Util" => 0, "Storable" => 0, "Task::Weaken" => 0, "Test::Exception" => 0, "Test::Memory::Cycle" => 0, "Test::More" => "0.92", "YAML::XS" => "0.32" ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); { package MY; use File::ShareDir::Install qw(postamble); } field_id.t100644000765000024 274012775731227 15252 0ustar00nigelstaff000000000000HTML-FormFu-2.05/tuse strict; use warnings; use Test::More tests => 5; use HTML::FormFu; { # element has explicit id my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); $form->element('Text')->name('foo')->id('fid')->label('Foo'); my $field_xhtml = qq{
}; is( $form->get_field('foo'), $field_xhtml ); } { # auto_id my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); $form->auto_fieldset(1); $form->auto_id('%n'); $form->element('Text')->name('foo')->label('Foo'); my $field_xhtml = qq{
}; is( $form->get_field('foo'), $field_xhtml ); is( "$form", <
$field_xhtml
HTML } { # auto_id my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); $form->auto_fieldset(1); $form->id('my_form'); $form->element('Text')->name('foo')->label('Foo')->auto_id('%f_%n'); my $field_xhtml = qq{
}; is( $form->get_field('foo'), $field_xhtml ); is( "$form", <
$field_xhtml
HTML } form000755000765000024 012775731227 14126 5ustar00nigelstaff000000000000HTML-FormFu-2.05/tend.t100644000765000024 35012775731227 15177 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/formuse strict; use warnings; use Test::More tests => 1; use HTML::FormFu; my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); my $end_form = qq{}; is( $form->end, $end_form ); MANIFEST.SKIP100644000765000024 27012775731227 14735 0ustar00nigelstaff000000000000HTML-FormFu-2.05# Don't know if it's getting kept ^lib\/HTML\/FormFu\/Filter\/Default\.pm$ # not ready yet ^t\/multiform-misc\/file ^benchmarks\b ^examples\/client-side-constraint\b ^\.perltidyrc$ 04basic.yml100644000765000024 62112775731227 15252 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t--- action: /foo/bar id: form auto_id: '%n' elements: - type: Fieldset legend: Jimi elements: - name: age type: Text comment: x label: Age constraints: [Integer, Required] - name: name type: Text label: Name - name: ok type: Hidden value: OK constraints: type: Required name: name filters: - HTMLEscape clone.t100644000765000024 206412775731227 15555 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/formuse strict; use warnings; use Scalar::Util qw/ refaddr /; use Test::More tests => 8; use HTML::FormFu; my $form = HTML::FormFu->new; my $fs = $form->element('Fieldset')->id('fs'); my $field = $fs->element('Text')->name('foo')->id('foo'); $field->constraint('Required'); my $clone = $form->clone; $clone->process( { foo => '' } ); is( refaddr( $clone->get_element->parent ), refaddr($clone), ); is( refaddr( $clone->get_field->parent ), refaddr( $clone->get_element ), ); is( refaddr( $clone->get_constraint->parent ), refaddr( $clone->get_field ), ); is( refaddr( $clone->get_error->parent ), refaddr( $clone->get_field ), ); =pod Ensure that modifying attributes on the clone doesn't modify the original form. =cut $clone->get_element->attrs( { id => 'fs2' } ); $clone->get_field->attrs( { id => 'foo2' } ); is_deeply( $form->get_element->attributes, { id => 'fs' } ); is_deeply( $form->get_field->attributes, { id => 'foo' } ); is_deeply( $clone->get_element->attributes, { id => 'fs2' } ); is_deeply( $clone->get_field->attributes, { id => 'foo2' } ); model.t100644000765000024 51412775731227 15533 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/formuse strict; use warnings; use Test::More tests => 3; use lib 't/lib'; use HTML::FormFu; my $form = HTML::FormFu->new; $form->default_model('+HTMLFormFu::MyModel'); my $model = $form->model; ok( $model == $form->model('HTMLFormFu::MyModel') ); isa_ok( $model, 'HTMLFormFu::MyModel' ); isa_ok( $model, 'HTML::FormFu::Model' ); param.t100644000765000024 161612775731227 15557 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/formuse strict; use warnings; use Test::More tests => 9; use HTML::FormFu; my $form = HTML::FormFu->new; $form->element('Text')->name('foo'); $form->element('Text')->name('bar'); $form->element('Text')->name('string'); $form->constraint( 'Number', 'foo', 'bar', 'string' ); $form->process( { foo => 1, bar => [ 2, 3 ], string => 'yada', unknown => 4, } ); ok( grep { $_ eq 'foo' } $form->param ); ok( grep { $_ eq 'bar' } $form->param ); ok( !grep { $_ eq 'string' } $form->param ); ok( !grep { $_ eq 'unknown' } $form->param ); is( $form->param('foo'), 1, 'foo param' ); my $bar = $form->param('bar'); is( $bar, 2, 'bar param scalar context' ); my @bar = $form->param('bar'); is_deeply( \@bar, [ 2, 3 ], 'bar param list context' ); ok( !$form->param('string'), 'string param not returned' ); ok( !$form->param('unknown'), 'unknown param not returned' ); query.t100644000765000024 161112775731227 15617 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/formuse strict; use warnings; use Test::More tests => 4; use HTML::FormFu; use lib 't/lib'; use HTMLFormFu::TestLib; my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); $form->element('Text')->name('foo'); $form->element('Text')->name('bar'); # NO QUERY { is( "$form", <
EOF } # WITH QUERY { $form->process( { foo => 'yada', bar => '23', } ); is( $form->param('foo'), 'yada', 'param(foo)' ); is( $form->param('bar'), 23, 'param(bar)' ); is( "$form", <
EOF } start.t100644000765000024 40512775731227 15567 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/formuse strict; use warnings; use Test::More tests => 1; use HTML::FormFu; my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); my $start_form = qq{
}; is( $form->start, $start_form ); stash.t100644000765000024 46412775731227 15561 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/formuse strict; use warnings; use Test::More tests => 2; use HTML::FormFu; my $form = HTML::FormFu->new; $form->stash->{foo} = 'bar'; $form->element('Text')->name('foo')->stash->{baz} = 'daz'; is( $form->render_data->{stash}{foo}, 'bar' ); is( $form->get_field('foo')->render_data->{stash}{baz}, 'daz' ); valid.t100644000765000024 162112775731227 15552 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/formuse strict; use warnings; use Test::More tests => 10; use HTML::FormFu; my $form = HTML::FormFu->new; $form->element('Text')->name('foo'); $form->element('Text')->name('bar'); $form->element('Text')->name('string'); $form->element('Text')->name('missing'); $form->constraint( 'Number', 'foo', 'bar', 'string' ); $form->process( { foo => 1, bar => [ 2, 3 ], string => 'yada', unknown => 4, } ); ok( grep { $_ eq 'foo' } $form->valid ); ok( grep { $_ eq 'bar' } $form->valid ); ok( !grep { $_ eq 'string' } $form->valid ); ok( !grep { $_ eq 'unknown' } $form->valid ); ok( !grep { $_ eq 'missing' } $form->valid ); ok( $form->valid('foo'), 'foo valid' ); ok( $form->valid('bar'), 'bar valid' ); ok( !$form->valid('string'), 'string not valid' ); ok( !$form->valid('unknown'), 'unknown not valid' ); ok( !$form->valid('missing'), 'missing valid' ); roles000755000765000024 012775731227 14307 5ustar00nigelstaff000000000000HTML-FormFu-2.05/tform.t100644000765000024 43612775731227 15562 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/rolesuse strict; use warnings; use Test::More tests => 1; use HTML::FormFu; use lib 't/lib'; my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); $form->load_config_file('t/roles/form.yml'); is( $form->custom_role_method, "form ID: xxx" ); author000755000765000024 012775731227 14655 5ustar00nigelstaff000000000000HTML-FormFu-2.05/xteol.t100644000765000024 1652112775731227 16006 0ustar00nigelstaff000000000000HTML-FormFu-2.05/xt/authoruse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.19 use Test::More 0.88; use Test::EOL; my @files = ( 'lib/HTML/FormFu.pm', 'lib/HTML/FormFu/Attribute.pm', 'lib/HTML/FormFu/Constants.pm', 'lib/HTML/FormFu/Constraint.pm', 'lib/HTML/FormFu/Constraint/ASCII.pm', 'lib/HTML/FormFu/Constraint/AllOrNone.pm', 'lib/HTML/FormFu/Constraint/AutoSet.pm', 'lib/HTML/FormFu/Constraint/Bool.pm', 'lib/HTML/FormFu/Constraint/Callback.pm', 'lib/HTML/FormFu/Constraint/CallbackOnce.pm', 'lib/HTML/FormFu/Constraint/DateTime.pm', 'lib/HTML/FormFu/Constraint/DependOn.pm', 'lib/HTML/FormFu/Constraint/Email.pm', 'lib/HTML/FormFu/Constraint/Equal.pm', 'lib/HTML/FormFu/Constraint/File.pm', 'lib/HTML/FormFu/Constraint/File/MIME.pm', 'lib/HTML/FormFu/Constraint/File/MaxSize.pm', 'lib/HTML/FormFu/Constraint/File/MinSize.pm', 'lib/HTML/FormFu/Constraint/File/Size.pm', 'lib/HTML/FormFu/Constraint/Integer.pm', 'lib/HTML/FormFu/Constraint/Length.pm', 'lib/HTML/FormFu/Constraint/MaxLength.pm', 'lib/HTML/FormFu/Constraint/MaxRange.pm', 'lib/HTML/FormFu/Constraint/MinLength.pm', 'lib/HTML/FormFu/Constraint/MinMaxFields.pm', 'lib/HTML/FormFu/Constraint/MinRange.pm', 'lib/HTML/FormFu/Constraint/Number.pm', 'lib/HTML/FormFu/Constraint/Printable.pm', 'lib/HTML/FormFu/Constraint/Range.pm', 'lib/HTML/FormFu/Constraint/Regex.pm', 'lib/HTML/FormFu/Constraint/Repeatable/Any.pm', 'lib/HTML/FormFu/Constraint/Required.pm', 'lib/HTML/FormFu/Constraint/Set.pm', 'lib/HTML/FormFu/Constraint/SingleValue.pm', 'lib/HTML/FormFu/Constraint/Word.pm', 'lib/HTML/FormFu/Deflator.pm', 'lib/HTML/FormFu/Deflator/Callback.pm', 'lib/HTML/FormFu/Deflator/CompoundDateTime.pm', 'lib/HTML/FormFu/Deflator/CompoundSplit.pm', 'lib/HTML/FormFu/Deflator/FormatNumber.pm', 'lib/HTML/FormFu/Deflator/PathClassFile.pm', 'lib/HTML/FormFu/Deflator/Strftime.pm', 'lib/HTML/FormFu/Deploy.pm', 'lib/HTML/FormFu/Element.pm', 'lib/HTML/FormFu/Element/Blank.pm', 'lib/HTML/FormFu/Element/Block.pm', 'lib/HTML/FormFu/Element/Button.pm', 'lib/HTML/FormFu/Element/Checkbox.pm', 'lib/HTML/FormFu/Element/Checkboxgroup.pm', 'lib/HTML/FormFu/Element/ComboBox.pm', 'lib/HTML/FormFu/Element/ContentButton.pm', 'lib/HTML/FormFu/Element/Date.pm', 'lib/HTML/FormFu/Element/DateTime.pm', 'lib/HTML/FormFu/Element/Email.pm', 'lib/HTML/FormFu/Element/Fieldset.pm', 'lib/HTML/FormFu/Element/File.pm', 'lib/HTML/FormFu/Element/Hidden.pm', 'lib/HTML/FormFu/Element/Hr.pm', 'lib/HTML/FormFu/Element/Image.pm', 'lib/HTML/FormFu/Element/Label.pm', 'lib/HTML/FormFu/Element/Multi.pm', 'lib/HTML/FormFu/Element/Number.pm', 'lib/HTML/FormFu/Element/Password.pm', 'lib/HTML/FormFu/Element/Radio.pm', 'lib/HTML/FormFu/Element/Radiogroup.pm', 'lib/HTML/FormFu/Element/Repeatable.pm', 'lib/HTML/FormFu/Element/Reset.pm', 'lib/HTML/FormFu/Element/Select.pm', 'lib/HTML/FormFu/Element/SimpleTable.pm', 'lib/HTML/FormFu/Element/Src.pm', 'lib/HTML/FormFu/Element/Submit.pm', 'lib/HTML/FormFu/Element/Text.pm', 'lib/HTML/FormFu/Element/Textarea.pm', 'lib/HTML/FormFu/Element/URL.pm', 'lib/HTML/FormFu/Exception.pm', 'lib/HTML/FormFu/Exception/Constraint.pm', 'lib/HTML/FormFu/Exception/Inflator.pm', 'lib/HTML/FormFu/Exception/Input.pm', 'lib/HTML/FormFu/Exception/Transformer.pm', 'lib/HTML/FormFu/Exception/Validator.pm', 'lib/HTML/FormFu/FakeQuery.pm', 'lib/HTML/FormFu/Filter.pm', 'lib/HTML/FormFu/Filter/Callback.pm', 'lib/HTML/FormFu/Filter/CompoundJoin.pm', 'lib/HTML/FormFu/Filter/CompoundSprintf.pm', 'lib/HTML/FormFu/Filter/CopyValue.pm', 'lib/HTML/FormFu/Filter/Encode.pm', 'lib/HTML/FormFu/Filter/ForceListValue.pm', 'lib/HTML/FormFu/Filter/FormatNumber.pm', 'lib/HTML/FormFu/Filter/HTMLEscape.pm', 'lib/HTML/FormFu/Filter/HTMLScrubber.pm', 'lib/HTML/FormFu/Filter/LowerCase.pm', 'lib/HTML/FormFu/Filter/NonNumeric.pm', 'lib/HTML/FormFu/Filter/Regex.pm', 'lib/HTML/FormFu/Filter/Split.pm', 'lib/HTML/FormFu/Filter/TrimEdges.pm', 'lib/HTML/FormFu/Filter/UpperCase.pm', 'lib/HTML/FormFu/Filter/Whitespace.pm', 'lib/HTML/FormFu/I18N.pm', 'lib/HTML/FormFu/I18N/bg.pm', 'lib/HTML/FormFu/I18N/cs.pm', 'lib/HTML/FormFu/I18N/da.pm', 'lib/HTML/FormFu/I18N/de.pm', 'lib/HTML/FormFu/I18N/en.pm', 'lib/HTML/FormFu/I18N/es.pm', 'lib/HTML/FormFu/I18N/fr.pm', 'lib/HTML/FormFu/I18N/hu.pm', 'lib/HTML/FormFu/I18N/it.pm', 'lib/HTML/FormFu/I18N/ja.pm', 'lib/HTML/FormFu/I18N/no.pm', 'lib/HTML/FormFu/I18N/pt_br.pm', 'lib/HTML/FormFu/I18N/pt_pt.pm', 'lib/HTML/FormFu/I18N/ro.pm', 'lib/HTML/FormFu/I18N/ru.pm', 'lib/HTML/FormFu/I18N/ua.pm', 'lib/HTML/FormFu/I18N/zh_cn.pm', 'lib/HTML/FormFu/Inflator.pm', 'lib/HTML/FormFu/Inflator/Callback.pm', 'lib/HTML/FormFu/Inflator/CompoundDateTime.pm', 'lib/HTML/FormFu/Inflator/DateTime.pm', 'lib/HTML/FormFu/Literal.pm', 'lib/HTML/FormFu/Localize.pm', 'lib/HTML/FormFu/Manual/Cookbook.pod', 'lib/HTML/FormFu/Manual/Unicode.pod', 'lib/HTML/FormFu/Model.pm', 'lib/HTML/FormFu/Model/HashRef.pm', 'lib/HTML/FormFu/ObjectUtil.pm', 'lib/HTML/FormFu/OutputProcessor.pm', 'lib/HTML/FormFu/OutputProcessor/Indent.pm', 'lib/HTML/FormFu/OutputProcessor/StripWhitespace.pm', 'lib/HTML/FormFu/Plugin.pm', 'lib/HTML/FormFu/Plugin/StashValid.pm', 'lib/HTML/FormFu/Preload.pm', 'lib/HTML/FormFu/Processor.pm', 'lib/HTML/FormFu/QueryType/CGI.pm', 'lib/HTML/FormFu/QueryType/CGI/Simple.pm', 'lib/HTML/FormFu/QueryType/Catalyst.pm', 'lib/HTML/FormFu/Role/Constraint/Others.pm', 'lib/HTML/FormFu/Role/ContainsElements.pm', 'lib/HTML/FormFu/Role/ContainsElementsSharedWithField.pm', 'lib/HTML/FormFu/Role/CreateChildren.pm', 'lib/HTML/FormFu/Role/CustomRoles.pm', 'lib/HTML/FormFu/Role/Element/Coercible.pm', 'lib/HTML/FormFu/Role/Element/Field.pm', 'lib/HTML/FormFu/Role/Element/FieldMethods.pm', 'lib/HTML/FormFu/Role/Element/Group.pm', 'lib/HTML/FormFu/Role/Element/Input.pm', 'lib/HTML/FormFu/Role/Element/Layout.pm', 'lib/HTML/FormFu/Role/Element/MultiElement.pm', 'lib/HTML/FormFu/Role/Element/NonBlock.pm', 'lib/HTML/FormFu/Role/Element/ProcessOptionsFromModel.pm', 'lib/HTML/FormFu/Role/Element/SingleValueField.pm', 'lib/HTML/FormFu/Role/Filter/Compound.pm', 'lib/HTML/FormFu/Role/FormAndBlockMethods.pm', 'lib/HTML/FormFu/Role/FormAndElementMethods.pm', 'lib/HTML/FormFu/Role/FormBlockAndFieldMethods.pm', 'lib/HTML/FormFu/Role/GetProcessors.pm', 'lib/HTML/FormFu/Role/HasParent.pm', 'lib/HTML/FormFu/Role/NestedHashUtils.pm', 'lib/HTML/FormFu/Role/Populate.pm', 'lib/HTML/FormFu/Role/Render.pm', 'lib/HTML/FormFu/Transformer.pm', 'lib/HTML/FormFu/Transformer/Callback.pm', 'lib/HTML/FormFu/Upload.pm', 'lib/HTML/FormFu/UploadParam.pm', 'lib/HTML/FormFu/Util.pm', 'lib/HTML/FormFu/Validator.pm', 'lib/HTML/FormFu/Validator/Callback.pm', 'lib/MooseX/Attribute/FormFuChained.pm', 'lib/MooseX/FormFuChainedAccessors.pm', 'lib/MooseX/Traits/Attribute/FormFuChained.pm' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; elements000755000765000024 012775731227 14777 5ustar00nigelstaff000000000000HTML-FormFu-2.05/thr.t100644000765000024 51512775731227 15716 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/elementsuse strict; use warnings; use Test::More tests => 1; use HTML::FormFu; my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); # force a submission $form->indicator( sub {1} ); my $hr = $form->element('Hr'); $form->process( {} ); my $hr_xhtml = qq{
}; is( "$hr", $hr_xhtml ); object.t100644000765000024 133512775731227 15723 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/formuse strict; use warnings; use Test::More; eval { require Template; }; if ($@) { plan skip_all => 'Template.pm required'; die $@; } else { plan tests => 1; } # testing templates # never want to run using string method delete $ENV{HTML_FORMFU_RENDER_METHOD}; use HTML::FormFu; my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => [ 't/form/object', 'share/templates/tt/xhtml' ] } } ); $form->render_method('tt'); $form->auto_fieldset; $form->element('Text')->name('foo')->label('Foo'); $form->element('Text')->name('bar')->label('Bar'); $form->element('Hidden')->name('baz'); $form->element('Submit')->name('submit'); my $xhtml = < 6; use HTML::FormFu; my $form = HTML::FormFu->new; $form->element('Text')->name('foo'); $form->element('Text')->name('bar'); $form->element('Text')->name('string'); $form->constraint( 'Number', 'foo', 'bar', 'string' ); $form->process( { foo => 1, bar => [ 2, 3 ], string => 'yada', unknown => 4, } ); my $params = $form->params; ok( grep { $_ eq 'foo' } keys %$params ); ok( grep { $_ eq 'bar' } keys %$params ); ok( !grep { $_ eq 'string' } keys %$params ); ok( !grep { $_ eq 'unknown' } keys %$params ); is( $params->{foo}, 1, 'foo params' ); is_deeply( $params->{bar}, [ 2, 3 ], 'bar params' ); block.t100644000765000024 65712775731227 15716 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/rolesuse strict; use warnings; use Test::More tests => 1; use HTML::FormFu; use lib 't/lib'; my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); $form->load_config_file('t/roles/block.yml'); my $expected_form_xhtml = <
EOF is( "$form", $expected_form_xhtml ); field.t100644000765000024 67112775731227 15703 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/rolesuse strict; use warnings; use Test::More tests => 1; use HTML::FormFu; use lib 't/lib'; my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); $form->load_config_file('t/roles/field.yml'); my $expected_form_xhtml = <
EOF is( "$form", $expected_form_xhtml ); src.t100644000765000024 101212775731227 16105 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/elementsuse strict; use warnings; use Test::More tests => 2; use HTML::FormFu; my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); $form->auto_fieldset(1); my $block = $form->element( { type => 'Src', content_xml => 'Hello World!', } ); my $block_xhtml = qq{ Hello World! }; is( $block, $block_xhtml ); my $form_xhtml = <
$block_xhtml
EOF is( $form, $form_xhtml ); url.t100644000765000024 144112775731227 16126 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/elementsuse strict; use warnings; use Test::More tests => 4; use HTML::FormFu; my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); $form->load_config_file('t/elements/url.yml'); my $expected_field_xhtml = qq{
}; is( $form->get_field('foo'), $expected_field_xhtml ); # Valid { $form->process( { foo => 'http://example.com', } ); ok( $form->valid('foo'), 'foo valid' ); } # Invalid { $form->process( { foo => 'example.com', } ); ok( ! $form->valid('foo'), 'foo invalid' ); } # Invalid { $form->process( { foo => 'ftp://example.com', } ); ok( ! $form->valid('foo'), 'foo invalid' ); } nested000755000765000024 012775731227 14445 5ustar00nigelstaff000000000000HTML-FormFu-2.05/tparam.t100644000765000024 235512775731227 16077 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/nesteduse strict; use warnings; use Test::More tests => 11; use HTML::FormFu; my $form = HTML::FormFu->new; $form->auto_fieldset( { nested_name => 'foo' } ); $form->element('Text')->name('bar')->constraint('Number'); $form->element('Text')->name('baz')->constraint('Number'); $form->element('Text')->name('bag')->constraint('Number'); $form->process( { 'foo.bar' => 1, 'foo.baz' => [ 2, 3 ], 'foo.bag' => 'yada', 'foo.unknown' => 4, } ); my @valid = $form->param; ok( grep { $_ eq 'foo.bar' } @valid ); ok( grep { $_ eq 'foo.baz' } @valid ); ok( !grep { $_ eq 'foo.bag' } @valid ); ok( !grep { $_ eq 'foo.unknown' } @valid ); is( $form->param('foo.bar'), 1 ); my $bar = $form->param('foo.baz'); is( $bar, 2 ); my @bar = $form->param('foo.baz'); is_deeply( \@bar, [ 2, 3 ] ); ok( !$form->param('foo.bag') ); ok( !$form->param('foo.unknown') ); # new behaviour # because a child has errors... ok( !defined $form->param('foo') ); # with no errors... $form->process( { 'foo.bar' => 1, 'foo.baz' => [ 2, 3 ], 'foo.bag' => 9, 'foo.unknown' => 4, } ); is_deeply( $form->param('foo'), { bar => 1, baz => [ 2, 3 ], bag => 9, } ); valid.t100644000765000024 176012775731227 16075 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/nesteduse strict; use warnings; use Test::More tests => 7; use HTML::FormFu; my $form = HTML::FormFu->new; $form->auto_fieldset( { nested_name => 'foo' } ); $form->element('Text')->name('bar')->constraint('Number'); $form->element('Text')->name('baz')->constraint('Number'); $form->element('Text')->name('bag')->constraint('Number'); $form->process( { 'foo.bar' => 1, 'foo.baz' => [ 2, 3 ], 'foo.bag' => 'yada', 'foo.unknown' => 4, } ); is_deeply( [ sort( $form->valid ) ], [ qw/ foo.bar foo.baz / ] ); ok( $form->valid('foo.bar') ); ok( $form->valid('foo.baz') ); ok( !$form->valid('foo.bag') ); ok( !$form->valid('foo.unknown') ); # new behaviour # because a child has errors... ok( !$form->valid('foo') ); # with no errors... $form->process( { 'foo.bar' => 1, 'foo.baz' => [ 2, 3 ], 'foo.bag' => 9, 'foo.unknown' => 4, } ); ok( $form->valid('foo') ); form.yml100644000765000024 6312775731227 16074 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/roles--- id: xxx roles: - '+HTMLFormFu::MyFormRole' date.t100644000765000024 3201512775731227 16262 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/elementsuse strict; use warnings; use Test::More tests => 11; use HTML::FormFu; use DateTime; my $dt = DateTime->new( day => 6, month => 8, year => 2007 ); my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); $form->element('Date')->name('foo')->strftime("%m/%d/%Y") ->day( { prefix => '-- Day --', } )->month( { prefix => '-- Month --', short_names => 1, } )->year( { prefix => '-- Year --', list => [ 2007 .. 2017 ], } )->default($dt)->auto_inflate(1)->constraint('Required'); $form->element('Date')->name('bar')->default('14-08-2007') ->year( { list => [ 2007 .. 2017 ] } ); $form->process; is( "$form", <
HTML $form->process( { 'foo_day', 30, 'foo_month', 6, 'foo_year', 2007, 'bar_day', 1, 'bar_month', 7, 'bar_year', 2007, } ); ok( $form->submitted_and_valid ); my $foo = $form->param('foo'); my $bar = $form->param('bar'); isa_ok( $foo, 'DateTime' ); ok( !ref $bar ); is( $foo, "06/30/2007" ); is( $bar, "01-07-2007" ); is( "$form", <
HTML # incorrect date $form->process( { 'foo_day', 29, 'foo_month', 2, 'foo_year', 2007, } ); ok( $form->submitted ); ok( $form->has_errors ); ok( !defined $form->params->{foo} ); is( "$form", <
Invalid date
HTML_ERRORS file.t100644000765000024 72512775731227 16227 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/elementsuse strict; use warnings; use Test::More tests => 2; use HTML::FormFu; my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); my $element = $form->element('File')->name('foo'); my $field_xhtml = qq{
}; is( "$element", $field_xhtml ); my $form_xhtml = < $field_xhtml EOF is( "$form", $form_xhtml ); text.t100644000765000024 147512775731227 16317 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/elementsuse strict; use warnings; use Test::More tests => 5; use HTML::FormFu; my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); ok( my $element = $form->element('Text')->name('foo') ); is( $element->name, 'foo' ); is( $element->type, 'Text' ); # add more elements to test accessor output $form->element('Text')->name('bar')->size(10); $form->element('Text')->name('baz')->size(15)->maxlength(20); my $expected_field_xhtml = qq{
}; is( "$element", $expected_field_xhtml ); my $expected_form_xhtml = < $expected_field_xhtml
EOF is( "$form", $expected_form_xhtml ); filters000755000765000024 012775731227 14633 5ustar00nigelstaff000000000000HTML-FormFu-2.05/tregex.t100644000765000024 127512775731227 16277 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/filtersuse strict; use warnings; use Test::More tests => 4; use HTML::FormFu; my $form = HTML::FormFu->new; # add config-callback to replicate Catalyst-Controller-HTML-FormFu $form->config_callback( { plain_value => sub { return if !defined $_; s{__uri_for()\((.+?)\)__} {$1}g; }, } ); $form->load_config_file('t/filters/regex.yml'); { $form->process( { foo => ' 4.5 ', } ); ok( $form->submitted_and_valid ); is( $form->param_value('foo'), '4.5' ); } { # clone form my $form = $form->clone; $form->process( { foo => " abc\t", } ); ok( $form->submitted_and_valid ); is( $form->param_value('foo'), 'abc' ); } split.t100644000765000024 64212775731227 16275 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/filtersuse strict; use warnings; use Test::More tests => 4; use HTML::FormFu; my $form = HTML::FormFu->new; $form->load_config_file('t/filters/split.yml'); $form->process( { foo => 'FOO', bar => '1-2-3', } ); is_deeply( $form->param_array('foo'), [ 'F', 'O', 'O' ] ); is( $form->param_value('foo'), 'F' ); is_deeply( $form->param_array('bar'), [ 1, '2-3' ] ); is( $form->param_value('bar'), 1 ); init_arg.t100644000765000024 64612775731227 16235 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/formuse strict; use warnings; use Test::More tests => 3; use Test::Exception; use HTML::FormFu; { package MyApp::FormFu; use Moose; extends 'HTML::FormFu'; has 'my_attr' => ( is => 'ro', init_arg => 'mine' ); } my $form; lives_ok( sub { $form = MyApp::FormFu->new( mine => 'ok' ); }, "form construction doesn't die" ); ok( $form, 'form constructed ok' ); is( $form->my_attr, 'ok', 'attribute set' ); params.t100644000765000024 113512775731227 16255 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/nesteduse strict; use warnings; use Test::More tests => 1; use HTML::FormFu; my $form = HTML::FormFu->new; $form->auto_fieldset( { nested_name => 'foo' } ); $form->element('Text')->name('bar')->constraint('Number'); $form->element('Text')->name('baz')->constraint('Number'); $form->element('Text')->name('bag')->constraint('Number'); $form->process( { 'foo.bar' => 1, 'foo.baz' => [ 2, 3 ], 'foo.bag' => 'yada', 'foo.unknown' => 4, } ); is_deeply( $form->params, { foo => { bar => 1, baz => [ 2, 3 ], }, } ); block.yml100644000765000024 15412775731227 16244 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/roles--- elements: - type: Block roles: - '+HTMLFormFu::MyBlockRole' elements: - name: foo field.yml100644000765000024 13412775731227 16233 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/roles--- auto_fieldset: 1 elements: - name: foo roles: - '+HTMLFormFu::MyFieldRole' critic.t100644000765000024 43512775731227 16441 0ustar00nigelstaff000000000000HTML-FormFu-2.05/xt/author#!perl use strict; use warnings; use Test::More; use English qw(-no_match_vars); eval "use Test::Perl::Critic"; plan skip_all => 'Test::Perl::Critic required to criticise code' if $@; Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc"; all_critic_ok(); HTML000755000765000024 012775731227 14232 5ustar00nigelstaff000000000000HTML-FormFu-2.05/libFormFu.pm100644000765000024 24115212775731227 16173 0ustar00nigelstaff000000000000HTML-FormFu-2.05/lib/HTMLpackage HTML::FormFu; use strict; our $VERSION = '2.05'; # VERSION use Moose; use MooseX::Attribute::FormFuChained; with 'HTML::FormFu::Role::Render', 'HTML::FormFu::Role::CreateChildren', 'HTML::FormFu::Role::GetProcessors', 'HTML::FormFu::Role::ContainsElements', 'HTML::FormFu::Role::ContainsElementsSharedWithField', 'HTML::FormFu::Role::FormAndBlockMethods', 'HTML::FormFu::Role::FormAndElementMethods', 'HTML::FormFu::Role::FormBlockAndFieldMethods', 'HTML::FormFu::Role::NestedHashUtils', 'HTML::FormFu::Role::Populate', 'HTML::FormFu::Role::CustomRoles'; use HTML::FormFu::Attribute qw( mk_attrs mk_attr_accessors mk_output_accessors mk_inherited_accessors mk_inherited_merging_accessors ); use HTML::FormFu::Constants qw( $EMPTY_STR ); use HTML::FormFu::Constraint; use HTML::FormFu::Exception; use HTML::FormFu::FakeQuery; use HTML::FormFu::Filter; use HTML::FormFu::Inflator; use HTML::FormFu::Localize; use HTML::FormFu::ObjectUtil qw( form load_config_file load_config_filestem clone stash constraints_from_dbic parent _load_file ); use HTML::FormFu::Util qw( DEBUG DEBUG_PROCESS DEBUG_CONSTRAINTS debug require_class _get_elements xml_escape split_name _parse_args process_attrs _filter_components ); use Clone (); use List::Util 1.45 qw( first any none uniq ); use Scalar::Util qw( blessed weaken reftype ); use Carp qw( croak ); use overload ( 'eq' => '_string_equals', '==' => '_object_equals', '""' => sub { return shift->render }, 'bool' => sub {1}, 'fallback' => 1, ); __PACKAGE__->mk_attr_accessors(qw( id action enctype method )); for my $name ( qw( _elements _output_processors _valid_names _plugins _models ) ) { has $name => ( is => 'rw', default => sub { [] }, lazy => 1, isa => 'ArrayRef', ); } has languages => ( is => 'rw', default => sub { ['en'] }, lazy => 1, isa => 'ArrayRef', traits => ['FormFuChained'], ); has input => ( is => 'rw', default => sub { {} }, lazy => 1, isa => 'HashRef', traits => ['FormFuChained'], ); has _processed_params => ( is => 'rw', default => sub { {} }, lazy => 1, isa => 'HashRef', ); has form_error_message_class => ( is => 'rw', default => 'form_error_message', lazy => 1, ); our @MULTIFORM_SHARED = (qw( javascript javascript_src indicator filename query_type force_error_message localize_class tt_module nested_name nested_subscript default_model tmp_upload_dir params_ignore_underscore )); for (@MULTIFORM_SHARED) { has $_ => ( is => 'rw', traits => ['FormFuChained'], ); } has submitted => ( is => 'rw', traits => ['FormFuChained'] ); has query => ( is => 'rw', traits => ['FormFuChained'] ); has _auto_fieldset => ( is => 'rw' ); __PACKAGE__->mk_output_accessors(qw( form_error_message )); *elements = \&element; *constraints = \&constraint; *filters = \&filter; *deflators = \&deflator; *inflators = \&inflator; *validators = \&validator; *transformers = \&transformer; *output_processors = \&output_processor; *loc = \&localize; *plugins = \&plugin; *add_plugins = \&add_plugin; our $build_defaults = { action => '', method => 'post', filename => 'form', render_method => 'string', tt_args => {}, tt_module => 'Template', query_type => 'CGI', default_model => 'DBIC', localize_class => 'HTML::FormFu::I18N', auto_error_message => 'form_%s_%t', error_tag => 'span', }; sub BUILD { my ( $self, $args ) = @_; $self->populate($build_defaults); return; } sub auto_fieldset { my ( $self, $element_ref ) = @_; # if there's no arg, just return whether there's an auto_fieldset already return $self->_auto_fieldset if !$element_ref; # if the argument isn't a reference, assume it's just a "1" meaning true, # and use an empty hashref if ( !ref $element_ref ) { $element_ref = {}; } $element_ref->{type} = 'Fieldset'; $self->element($element_ref); $self->_auto_fieldset(1); return $self; } sub default_values { my ( $self, $default_ref ) = @_; for my $field ( @{ $self->get_fields } ) { my $name = $field->nested_name; next if !defined $name; next if !exists $default_ref->{$name}; $field->default( $default_ref->{$name} ); } return $self; } sub model { my ( $self, $model_name ) = @_; $model_name ||= $self->default_model; # search models already loaded for my $model ( @{ $self->_models } ) { return $model if $model->type =~ /\Q$model_name\E$/; } # class not found, try require-ing it my $class = $model_name =~ s/^\+// ? $model_name : "HTML::FormFu::Model::$model_name"; require_class($class); my $model = $class->new( { type => $model_name, parent => $self, } ); push @{ $self->_models }, $model; return $model; } sub process { my ( $self, $query ) = @_; $self->input( {} ); $self->_processed_params( {} ); $self->_valid_names( [] ); $self->clear_errors; $query ||= $self->query; if ( defined $query && !blessed($query) ) { $query = HTML::FormFu::FakeQuery->new( $self, $query ); } # save it for further calls to process() if ($query) { DEBUG && debug( QUERY => $query ); $self->query($query); } # run all elements pre_process() methods for my $elem ( @{ $self->get_elements } ) { $elem->pre_process; } # run all plugins pre_process() methods for my $plugin ( @{ $self->get_plugins } ) { $plugin->pre_process; } # run all elements process() methods for my $elem ( @{ $self->get_elements } ) { $elem->process; } # run all plugins process() methods for my $plugin ( @{ $self->get_plugins } ) { $plugin->process; } my $submitted; if ( defined $query ) { eval { my @params = $query->param }; croak "Invalid query object: $@" if $@; $submitted = $self->_submitted($query); } DEBUG_PROCESS && debug( SUBMITTED => $submitted ); $self->submitted($submitted); if ($submitted) { my %input; my @params = $query->param; for my $field ( @{ $self->get_fields } ) { my $name = $field->nested_name; next if !defined $name; next if none { $name eq $_ } @params; ## CGI wants you to use $query->multi_param($foo). ## doing so breaks CGI::Simple. So shoosh it up for now. local $CGI::LIST_CONTEXT_WARN = 0; if ( $field->nested ) { # call in list context so we know if there's more than 1 value my @values = $query->param($name); my $value = @values > 1 ? \@values : $values[0]; $self->set_nested_hash_value( \%input, $name, $value ); } else { my @values = $query->param($name); $input{$name} = @values > 1 ? \@values : $values[0]; } } DEBUG && debug( INPUT => \%input ); # run all field process_input methods for my $field ( @{ $self->get_fields } ) { $field->process_input( \%input ); } $self->input( \%input ); $self->_process_input; } # run all plugins post_process methods for my $elem ( @{ $self->get_elements } ) { $elem->post_process; } for my $plugin ( @{ $self->get_plugins } ) { $plugin->post_process; } return; } sub _submitted { my ( $self, $query ) = @_; my $indicator = $self->indicator; my $code; if ( defined($indicator) && ref $indicator ne 'CODE' ) { DEBUG_PROCESS && debug( INDICATOR => $indicator ); $code = sub { return defined $query->param($indicator) }; } elsif ( !defined $indicator ) { my @names = uniq grep {defined} map { $_->nested_name } @{ $self->get_fields }; DEBUG_PROCESS && debug( 'no indicator, checking fields...' => \@names ); $code = sub { grep { defined $query->param($_) } @names; }; } else { $code = $indicator; } return $code->( $self, $query ); } sub _process_input { my ($self) = @_; $self->_build_params; $self->_process_file_uploads; $self->_filter_input; $self->_constrain_input; $self->_inflate_input if !@{ $self->get_errors }; $self->_validate_input if !@{ $self->get_errors }; $self->_transform_input if !@{ $self->get_errors }; $self->_build_valid_names; return; } sub _build_params { my ($self) = @_; my $input = $self->input; my %params; for my $field ( @{ $self->get_fields } ) { my $name = $field->nested_name; next if !defined $name; next if exists $params{$name}; next if !$self->nested_hash_key_exists( $self->input, $name ) && !$field->default_empty_value; my $input = $self->get_nested_hash_value( $self->input, $name ); if ( ref $input eq 'ARRAY' ) { # can't clone upload filehandles # so create new arrayref of values $input = [@$input]; } elsif ( !defined $input && $field->default_empty_value ) { $input = ''; } $self->set_nested_hash_value( \%params, $name, $input, $name ); } $self->_processed_params( \%params ); DEBUG_PROCESS && debug( 'PROCESSED PARAMS' => \%params ); return; } sub _process_file_uploads { my ($self) = @_; my @names = uniq grep {defined} map { $_->nested_name } grep { $_->isa('HTML::FormFu::Element::File') } @{ $self->get_fields }; if (@names) { my $query_class = $self->query_type; if ( $query_class !~ /^\+/ ) { $query_class = "HTML::FormFu::QueryType::$query_class"; } require_class($query_class); my $params = $self->_processed_params; my $input = $self->input; for my $name (@names) { next if !$self->nested_hash_key_exists( $input, $name ); my $values = $query_class->parse_uploads( $self, $name ); $self->set_nested_hash_value( $params, $name, $values ); } } return; } sub _filter_input { my ($self) = @_; my $params = $self->_processed_params; for my $filter ( @{ $self->get_filters } ) { my $name = $filter->nested_name; next if !defined $name; next if !$self->nested_hash_key_exists( $params, $name ); $filter->process( $self, $params ); } return; } sub _constrain_input { my ($self) = @_; my $params = $self->_processed_params; for my $constraint ( @{ $self->get_constraints } ) { DEBUG_CONSTRAINTS && debug( 'FIELD NAME' => $constraint->field->nested_name, 'CONSTRAINT TYPE' => $constraint->type, ); $constraint->pre_process; my @errors = eval { $constraint->process($params) }; DEBUG_CONSTRAINTS && debug( ERRORS => \@errors ); DEBUG_CONSTRAINTS && debug( '$@' => $@ ); if ( blessed $@ && $@->isa('HTML::FormFu::Exception::Constraint') ) { push @errors, $@; } elsif ($@) { push @errors, HTML::FormFu::Exception::Constraint->new; } for my $error (@errors) { if ( !$error->parent ) { $error->parent( $constraint->parent ); } if ( !$error->constraint ) { $error->constraint($constraint); } $error->parent->add_error($error); } } return; } sub _inflate_input { my ($self) = @_; my $params = $self->_processed_params; for my $inflator ( @{ $self->get_inflators } ) { my $name = $inflator->nested_name; next if !defined $name; next if !$self->nested_hash_key_exists( $params, $name ); next if any {defined} @{ $inflator->parent->get_errors }; my $value = $self->get_nested_hash_value( $params, $name ); my @errors; ( $value, @errors ) = eval { $inflator->process($value) }; if ( blessed $@ && $@->isa('HTML::FormFu::Exception::Inflator') ) { push @errors, $@; } elsif ($@) { push @errors, HTML::FormFu::Exception::Inflator->new; } for my $error (@errors) { $error->parent( $inflator->parent ) if !$error->parent; $error->inflator($inflator) if !$error->inflator; $error->parent->add_error($error); } $self->set_nested_hash_value( $params, $name, $value ); } return; } sub _validate_input { my ($self) = @_; my $params = $self->_processed_params; for my $validator ( @{ $self->get_validators } ) { my $name = $validator->nested_name; next if !defined $name; next if !$self->nested_hash_key_exists( $params, $name ); next if any {defined} @{ $validator->parent->get_errors }; my @errors = eval { $validator->process($params) }; if ( blessed $@ && $@->isa('HTML::FormFu::Exception::Validator') ) { push @errors, $@; } elsif ($@) { push @errors, HTML::FormFu::Exception::Validator->new; } for my $error (@errors) { $error->parent( $validator->parent ) if !$error->parent; $error->validator($validator) if !$error->validator; $error->parent->add_error($error); } } return; } sub _transform_input { my ($self) = @_; my $params = $self->_processed_params; for my $transformer ( @{ $self->get_transformers } ) { my $name = $transformer->nested_name; next if !defined $name; next if !$self->nested_hash_key_exists( $params, $name ); next if any {defined} @{ $transformer->parent->get_errors }; my $value = $self->get_nested_hash_value( $params, $name ); my (@errors) = eval { $transformer->process( $value, $params ) }; if ( blessed $@ && $@->isa('HTML::FormFu::Exception::Transformer') ) { push @errors, $@; } elsif ($@) { push @errors, HTML::FormFu::Exception::Transformer->new; } for my $error (@errors) { $error->parent( $transformer->parent ) if !$error->parent; $error->transformer($transformer) if !$error->transformer; $error->parent->add_error($error); } } return; } sub _build_valid_names { my ($self) = @_; my $params = $self->_processed_params; my $skip_private = $self->params_ignore_underscore; my @errors = $self->has_errors; my @names; my %non_param; for my $field ( @{ $self->get_fields } ) { my $name = $field->nested_name; next if !defined $name; next if $skip_private && $field->name =~ /^_/; if ( $field->non_param ) { $non_param{$name} = 1; } elsif ( $self->nested_hash_key_exists( $params, $name ) ) { push @names, $name; } } push @names, uniq grep { ref $params->{$_} ne 'HASH' } grep { !( $skip_private && /^_/ ) } grep { !exists $non_param{$_} } keys %$params; my %valid; CHECK: for my $name (@names) { for my $error (@errors) { next CHECK if $name eq $error; } $valid{$name}++; } my @valid = keys %valid; $self->_valid_names( \@valid ); return; } sub _hash_keys { my ( $hash, $subscript ) = @_; my @names; for my $key ( keys %$hash ) { if ( ref $hash->{$key} eq 'HASH' ) { push @names, map { $subscript ? "${key}[${_}]" : "$key.$_" } _hash_keys( $hash->{$key}, $subscript ); } elsif ( ref $hash->{$key} eq 'ARRAY' ) { push @names, map { $subscript ? "${key}[${_}]" : "$key.$_" } _array_indices( $hash->{$key}, $subscript ); } else { push @names, $key; } } return @names; } sub _array_indices { my ( $array, $subscript ) = @_; my @names; for my $i ( 0 .. $#{$array} ) { if ( ref $array->[$i] eq 'HASH' ) { push @names, map { $subscript ? "${i}[${_}]" : "$i.$_" } _hash_keys( $array->[$i], $subscript ); } elsif ( ref $array->[$i] eq 'ARRAY' ) { push @names, map { $subscript ? "${i}[${_}]" : "$i.$_" } _array_indices( $array->[$i], $subscript ); } else { push @names, $i; } } return @names; } sub submitted_and_valid { my ($self) = @_; return $self->submitted && !$self->has_errors; } sub params { my ($self) = @_; return {} if !$self->submitted; my @names = $self->valid; my %params; for my $name (@names) { my @values = $self->param($name); if ( @values > 1 ) { $self->set_nested_hash_value( \%params, $name, \@values ); } else { $self->set_nested_hash_value( \%params, $name, $values[0] ); } } return \%params; } sub param { my ( $self, $name ) = @_; croak 'param method is readonly' if @_ > 2; return if !$self->submitted; if ( @_ == 2 ) { return if !$self->valid($name); my $value = $self->get_nested_hash_value( $self->_processed_params, $name ); return if !defined $value; if ( ref $value eq 'ARRAY' ) { return wantarray ? @$value : $value->[0]; } else { return $value; } } # return a list of valid names, if no $name arg return $self->valid; } sub param_value { my ( $self, $name ) = @_; croak 'name parameter required' if @_ != 2; return undef ## no critic (ProhibitExplicitReturnUndef); if !$self->valid($name); # this is guaranteed to always return a single value my $value = $self->get_nested_hash_value( $self->_processed_params, $name ); return ref $value eq 'ARRAY' ? $value->[0] : $value; } sub param_array { my ( $self, $name ) = @_; croak 'name parameter required' if @_ != 2; # guaranteed to always return an arrayref return [] if !$self->valid($name); my $value = $self->get_nested_hash_value( $self->_processed_params, $name ); return [] if !defined $value; return ref $value eq 'ARRAY' ? $value : [$value]; } sub param_list { my ( $self, $name ) = @_; croak 'name parameter required' if @_ != 2; # guaranteed to always return an arrayref return if !$self->valid($name); my $value = $self->get_nested_hash_value( $self->_processed_params, $name ); return if !defined $value; return ref $value eq 'ARRAY' ? @$value : $value; } sub valid { my $self = shift; return if !$self->submitted; my @valid = @{ $self->_valid_names }; if (@_) { my $name = shift; return 1 if any { $name eq $_ } @valid; # not found - see if it's the name of a nested block my $parent; if ( defined $self->nested_name && $self->nested_name eq $name ) { $parent = $self; } else { ($parent) = first { $_->isa('HTML::FormFu::Element::Block') } @{ $self->get_all_elements( { nested_name => $name, } ) }; } if ( defined $parent ) { my $fail = any {defined} map { @{ $_->get_errors } } @{ $parent->get_fields }; return 1 if !$fail; } return; } # return a list of valid names, if no $name arg return @valid; } sub has_errors { my $self = shift; return if !$self->submitted; my @names = map { $_->nested_name } grep { @{ $_->get_errors } } grep { defined $_->nested_name } @{ $self->get_fields }; if (@_) { my $name = shift; return 1 if any {/\Q$name/} @names; return; } # return list of names with errors, if no $name arg return @names; } sub add_valid { my ( $self, $key, $value ) = @_; croak 'add_valid requires arguments ($key, $value)' if @_ != 3; $self->set_nested_hash_value( $self->input, $key, $value ); $self->set_nested_hash_value( $self->_processed_params, $key, $value ); if ( none { $_ eq $key } @{ $self->_valid_names } ) { push @{ $self->_valid_names }, $key; } return $value; } sub _single_plugin { my ( $self, $arg_ref ) = @_; if ( !ref $arg_ref ) { $arg_ref = { type => $arg_ref }; } elsif ( ref $arg_ref eq 'HASH' ) { # shallow clone $arg_ref = {%$arg_ref}; } else { croak 'invalid args'; } my $type = delete $arg_ref->{type}; my @return; my @names = map { ref $_ ? @$_ : $_ } grep {defined} ( delete $arg_ref->{name}, delete $arg_ref->{names} ); if (@names) { # add plugins to appropriate fields for my $x (@names) { for my $field ( @{ $self->get_fields( { nested_name => $x } ) } ) { my $new = $field->_require_plugin( $type, $arg_ref ); push @{ $field->_plugins }, $new; push @return, $new; } } } else { # add plugin directly to form my $new = $self->_require_plugin( $type, $arg_ref ); push @{ $self->_plugins }, $new; push @return, $new; } return @return; } around render => sub { my $orig = shift; my $self = shift; my $plugins = $self->get_plugins; for my $plugin (@$plugins) { $plugin->render; } my $output = $self->$orig; for my $plugin (@$plugins) { $plugin->post_render( \$output ); } return $output; }; sub render_data { my ( $self, $args ) = @_; my $render = $self->render_data_non_recursive( { elements => [ map { $_->render_data } @{ $self->_elements } ], $args ? %$args : (), } ); return $render; } sub render_data_non_recursive { my ( $self, $args ) = @_; my %render = ( filename => $self->filename, javascript => $self->javascript, javascript_src => $self->javascript_src, attributes => xml_escape( $self->attributes ), stash => $self->stash, $args ? %$args : (), ); $render{form} = \%render; weaken( $render{form} ); $render{object} = $self; if ($self->force_error_message || ( $self->has_errors && defined $self->form_error_message ) ) { $render{form_error_message} = xml_escape( $self->form_error_message ); $render{form_error_message_class} = $self->form_error_message_class; } return \%render; } sub string { my ( $self, $args_ref ) = @_; $args_ref ||= {}; my $html = $self->_string_form_start( $args_ref ); # form template $html .= "\n"; for my $element ( @{ $self->get_elements } ) { # call render, so that child elements can use a different renderer my $element_html = $element->render; # skip Blank fields if ( length $element_html ) { $html .= $element_html . "\n"; } } $html .= $self->_string_form_end( $args_ref ); $html .= "\n"; return $html; } sub _string_form_start { my ( $self, $args_ref ) = @_; # start_form template my $render_ref = exists $args_ref->{render_data} ? $args_ref->{render_data} : $self->render_data_non_recursive; my $html = sprintf "", process_attrs( $render_ref->{attributes} ); if ( defined $render_ref->{form_error_message} ) { $html .= sprintf qq{\n
%s
}, $render_ref->{form_error_message_class}, $render_ref->{form_error_message}, ; } if ( defined $render_ref->{javascript_src} ) { my $uri = $render_ref->{javascript_src}; my @uris = ref $uri eq 'ARRAY' ? @$uri : ($uri); for my $uri (@uris) { $html .= sprintf qq{\n}, $uri, ; } } if ( defined $render_ref->{javascript} ) { $html .= sprintf qq{\n}, $render_ref->{javascript}, ; } return $html; } sub _string_form_end { my ( $self ) = @_; # end_form template return ""; } sub start { my $self = shift; if ( 'tt' eq $self->render_method ) { return $self->tt( { filename => 'start_form', render_data => $self->render_data_non_recursive, } ); } else { return $self->_string_form_start( @_ ); } } sub end { my $self = shift; if ( 'tt' eq $self->render_method ) { return $self->tt( { filename => 'end_form', render_data => $self->render_data_non_recursive, } ); } else { return $self->_string_form_end( @_ ); } } sub hidden_fields { my ($self) = @_; return join $EMPTY_STR, map { $_->render } @{ $self->get_fields( { type => 'Hidden' } ) }; } sub output_processor { my ( $self, $arg ) = @_; my @return; if ( ref $arg eq 'ARRAY' ) { push @return, map { $self->_single_output_processor($_) } @$arg; } else { push @return, $self->_single_output_processor($arg); } return @return == 1 ? $return[0] : @return; } sub _single_output_processor { my ( $self, $arg ) = @_; if ( !ref $arg ) { $arg = { type => $arg }; } elsif ( ref $arg eq 'HASH' ) { $arg = Clone::clone($arg); } else { croak 'invalid args'; } my $type = delete $arg->{type}; my $new = $self->_require_output_processor( $type, $arg ); push @{ $self->_output_processors }, $new; return $new; } sub _require_output_processor { my ( $self, $type, $opt ) = @_; croak 'required arguments: $self, $type, \%options' if @_ != 3; croak "options argument must be hash-ref" if reftype($opt) ne 'HASH'; my $class = $type; if ( not $class =~ s/^\+// ) { $class = "HTML::FormFu::OutputProcessor::$class"; } $type =~ s/^\+//; require_class($class); my $object = $class->new( { type => $type, parent => $self, } ); # handle default_args my $parent = $self->parent; if ( $parent && exists $parent->default_args->{output_processor}{$type} ) { %$opt = ( %{ $parent->default_args->{output_processer}{$type} }, %$opt ); } $object->populate($opt); return $object; } sub get_output_processors { my $self = shift; my %args = _parse_args(@_); my @x = @{ $self->_output_processors }; if ( exists $args{type} ) { @x = grep { $_->type eq $args{type} } @x; } return \@x; } sub get_output_processor { my $self = shift; my $x = $self->get_output_processors(@_); return @$x ? $x->[0] : (); } __PACKAGE__->meta->make_immutable; 1; __END__ =head1 NAME HTML::FormFu - HTML Form Creation, Rendering and Validation Framework =head1 VERSION version 2.05 =head1 SYNOPSIS Note: These examples make use of L. As of C v02.005, the L module is not bundled with C and is available in a stand-alone distribution. use HTML::FormFu; my $form = HTML::FormFu->new; $form->load_config_file('form.yml'); $form->process( $cgi_query ); if ( $form->submitted_and_valid ) { # do something with $form->params } else { # display the form $template->param( form => $form ); } If you're using L, a more suitable example might be: package MyApp::Controller::User; use Moose; extends 'Catalyst::Controller::HTML::FormFu'; sub user : FormFuChained CaptureArgs(1) { my ( $self, $c, $id ) = @_; my $rs = $c->model('Schema')->resultset('User'); $c->stash->{user} = $rs->find( $id ); return; } sub edit : FormFuChained('user') Args(0) FormConfig { my ( $self, $c ) = @_; my $form = $c->stash->{form}; my $user = $c->stash->{user}; if ( $form->submitted_and_valid ) { $form->model->update( $user ); $c->res->redirect( $c->uri_for( "/user/$id" ) ); return; } $form->model->default_values( $user ) if ! $form->submitted; } Note: Because L is automatically called for you by the Catalyst controller; if you make any modifications to the form within your action method, such as adding or changing elements, adding constraints, etc; you must call L again yourself before using L, any of the methods listed under L or L, or rendering the form. Here's an example of a config file to create a basic login form (all examples here are L, but you can use any format supported by L), you can also create forms directly in your perl code, rather than using an external config file. --- action: /login indicator: submit auto_fieldset: 1 elements: - type: Text name: user constraints: - Required - type: Password name: pass constraints: - Required - type: Submit name: submit constraints: - SingleValue =head1 DESCRIPTION L is a HTML form framework which aims to be as easy as possible to use for basic web forms, but with the power and flexibility to do anything else you might want to do (as long as it involves forms). You can configure almost any part of formfu's behaviour and output. By default formfu renders "XHTML 1.0 Strict" compliant markup, with as little extra markup as possible, but with sufficient CSS class names to allow for a wide-range of output styles to be generated by changing only the CSS. All methods listed below (except L) can either be called as a normal method on your C<$form> object, or as an option in your config file. Examples will mainly be shown in L config syntax. This documentation follows the convention that method arguments surrounded by square brackets C<[]> are I, and all other arguments are required. =head1 BUILDING A FORM =head2 new Arguments: [\%options] Return Value: $form Create a new L object. Any method which can be called on the L object may instead be passed as an argument to L. my $form = HTML::FormFu->new({ action => '/search', method => 'GET', auto_fieldset => 1, }); =head2 load_config_file Arguments: $filename Arguments: \@filenames Return Value: $form Accepts a filename or list of file names, whose filetypes should be of any format recognized by L. The content of each config file is passed to L, and so are added to the form. L may be called in a config file itself, so as to allow common settings to be kept in a single config file which may be loaded by any form. --- load_config_file: - file1 - file2 YAML multiple documents within a single file. The document start marker is a line containing 3 dashes. Multiple documents will be applied in order, just as if multiple filenames had been given. In the following example, multiple documents are taken advantage of to load another config file after the elements are added. (If this were a single document, the C would be called before C, regardless of its position in the file). --- elements: - name: one - name: two --- load_config_file: ext.yml Relative paths are resolved from the L directory if it is set, otherwise from the current working directory. See L for advice on organising config files. =head2 config_callback Arguments: \%options If defined, the arguments are used to create a L object during L which may be used to pre-process the config before it is sent to L. For example, the code below adds a callback to a form that will dynamically alter any config value ending in ".yml" to end in ".yaml" when you call L: $form->config_callback({ plain_value => sub { my( $visitor, $data ) = @_; s/\.yml/.yaml/; } }); Default Value: not defined This method is a special 'inherited accessor', which means it can be set on the form, a block element or a single element. When the value is read, if no value is defined it automatically traverses the element's hierarchy of parents, through any block elements and up to the form, searching for a defined value. =head2 populate Arguments: \%options Return Value: $form Each option key/value passed may be any L method-name and arguments. Provides a simple way to set multiple values, or add multiple elements to a form with a single method-call. Attempts to call the method-names in a semi-intelligent order (see the source of populate() in C for details). =head2 default_values Arguments: \%defaults Return Value: $form Set multiple field's default values from a single hash-ref. The hash-ref's keys correspond to a form field's name, and the value is passed to the field's L. This should be called after all fields have been added to the form, and before L is called (otherwise, call L again before rendering the form). =head2 config_file_path Arguments: $directory_name L defines where configuration files will be searched for, if an absolute path is not given to L. Default Value: not defined This method is a special 'inherited accessor', which means it can be set on the form, a block element or a single element. When the value is read, if no value is defined it automatically traverses the element's hierarchy of parents, through any block elements and up to the form, searching for a defined value. Is an L. =head2 indicator Arguments: $field_name Arguments: \&coderef If L is set to a fieldname, L will return true if a value for that fieldname was submitted. If L is set to a code-ref, it will be called as a subroutine with the two arguments C<$form> and C<$query>, and its return value will be used as the return value for L. If L is not set, L will return true if a value for any known fieldname was submitted. =head2 auto_fieldset Arguments: 1 Arguments: \%options Return Value: $fieldset This setting is suitable for most basic forms, and means you can generally ignore adding fieldsets yourself. Calling C<< $form->auto_fieldset(1) >> immediately adds a fieldset element to the form. Thereafter, C<< $form->elements() >> will add all elements (except fieldsets) to that fieldset, rather than directly to the form. To be specific, the elements are added to the I fieldset on the form, so if you add another fieldset, any further elements will be added to that fieldset. Also, you may pass a hashref to auto_fieldset(), and this will be used to set defaults for the first fieldset created. A few examples and their output, to demonstrate: 2 elements with no fieldset. --- elements: - type: Text name: foo - type: Text name: bar
2 elements with an L. --- auto_fieldset: 1 elements: - type: Text name: foo - type: Text name: bar
The 3rd element is within a new fieldset --- auto_fieldset: { id: fs } elements: - type: Text name: foo - type: Text name: bar - type: Fieldset - type: Text name: baz
Because of this behaviour, if you want nested fieldsets you will have to add each nested fieldset directly to its intended parent. my $parent = $form->get_element({ type => 'Fieldset' }); $parent->element('fieldset'); =head2 form_error_message Arguments: $string Normally, input errors cause an error message to be displayed alongside the appropriate form field. If you'd also like a general error message to be displayed at the top of the form, you can set the message with L. To set the CSS class for the message, see L. To change the markup used to display the message, edit the C template file. See L. Is an L. =head2 force_error_message If true, forces the L to be displayed even if there are no field errors. =head2 default_args Arguments: \%defaults Set defaults which will be added to every element, constraint, etc. of the given type which is subsequently added to the form. For example, to make every C element automatically have a size of C<10>, and make every C deflator automatically get its strftime set to C<%d/%m/%Y>: default_args: elements: Text: size: 10 deflators: Strftime: strftime: '%d/%m/%Y' An example to make all DateTime elements automatically get an appropriate Strftime deflator and a DateTime inflator: default_args: elements: DateTime: deflators: type: Strftime strftime: '%d-%m-%Y' inflators: type: DateTime parser: strptime: '%d-%m-%Y' =head3 Pseudo types As a special case, you can also use the C keys C, C and C to match any element which inherits from L or which C L or L. =head3 Alternatives Each C key can contain an C list using the C<|> divider: e.g. # apply the given class to any Element of type Password or Button default_args: elements: 'Password|Button': attrs: class: novalidate =head3 Match ancestor Each C key list can contain a type starting with C<+> to only match elements with an ancestor of the given type: e.g. # only apple the given class to an Input field within a Multi block default_args: elements: 'Input|+Multi': attrs: class: novalidate =head3 Don't match ancestor Each C key list can contain a type starting with C<-> to only match elements who do not have an ancestor of the given type: e.g. # apply the given class only to Input fields that are not in a Multi block default_args: elements: 'Input|-Multi': attrs: clasS: validate =head3 Order The arguments are applied in least- to most-specific order: C, C, C, C<$type>. Within each of these, arguments are applied in order of shortest-first to longest-last. The C key must match the value returned by C, e.g. L. If, for example, you have a custom element outside of the C namespace, which you load via C<< $form->element({ type => '+My::Custom::Element' }) >>, the key given to L should B include the leading C<+>, as that is stripped-out of the returned C value. Example: # don't include the leading '+' here default_args: elements: 'My::Custom::Element': attrs: class: whatever # do include the leading '+' here elements: - type: +My::Custom::Element =head3 Clashes L generates a single hashref to pass to L, merging arguments for each type in turn - meaning L is only called once in total - not once for each type. Because scalar values are B merged - this means later values will override earlier values: e.g. # Normally, calling $field->add_attrs({ class => 'input' }) # then calling $field->add_attrs({ class => 'not-in-multi' }) # would result in both values being retained: # class="input not-in-multi" # # However, default_args() creates a single data-structure to pass once # to populate(), so any scalar values will overwrite earlier ones # before they reach populate(). # # The below example would result in the longest-matching key # overwriting any others: # class="not-in-multi" # default_args: elements: Input: add_attrs: class: input 'Input:-Multi': add_attrs: class: not-in-multi =head3 Strictness Note: Unlike the proper methods which have aliases, for example L which is an alias for L - the keys given to C must be of the plural form, e.g.: default_args: elements: {} deflators: {} filters: {} constraints: {} inflators: {} validators: {} transformers: {} output_processors: {} =head2 javascript If set, the contents will be rendered within a C
EOF is( "$form", $xhtml ); param_list.t100644000765000024 70212775731227 16565 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/formuse strict; use warnings; use Test::More tests => 3; use HTML::FormFu; my $form = HTML::FormFu->new; $form->element('Text')->name('foo'); $form->element('Text')->name('bar'); $form->element('Text')->name('baz'); $form->process( { foo => 'a', bar => [ 'b', 'c' ], } ); is_deeply( [ $form->param_list('foo') ], ['a'] ); is_deeply( [ $form->param_list('bar') ], [ 'b', 'c' ] ); is_deeply( [ $form->param_list('baz') ], [] ); inflators000755000765000024 012775731227 15164 5ustar00nigelstaff000000000000HTML-FormFu-2.05/tarray.t100644000765000024 110612775731227 16625 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/inflatorsuse strict; use warnings; use Test::More tests => 8; use HTML::FormFu; my $form = HTML::FormFu->new; my $field = $form->element('Text')->name('foo'); $field->inflator('DateTime')->parser( { strptime => '%d/%m/%Y' } ); $form->process( { foo => [ '31/12/2006', '01/01/2007' ], } ); my $value = $form->param_array('foo'); isa_ok( $value->[0], 'DateTime' ); is( $value->[0]->day, 31 ); is( $value->[0]->month, 12 ); is( $value->[0]->year, 2006 ); isa_ok( $value->[1], 'DateTime' ); is( $value->[1]->day, 1 ); is( $value->[1]->month, 1 ); is( $value->[1]->year, 2007 ); yaml_utf8.txt100644000765000024 312775731227 16645 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/bugsfüyaml_utf8.yml100644000765000024 5312775731227 16654 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/bugs--- elements: - name: foo label: fü bool.t100644000765000024 111312775731227 17006 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/constraintsuse strict; use warnings; use Test::More tests => 4; use HTML::FormFu; my $form = HTML::FormFu->new; $form->element('Text')->name('foo'); $form->element('Text')->name('bar'); $form->constraint('Bool'); # Valid { $form->process( { foo => 1, bar => 0, } ); ok( $form->valid('foo'), 'foo valid' ); ok( $form->valid('bar'), 'bar valid' ); } # Invalid { $form->process( { foo => '01', bar => 'a', } ); ok( !$form->valid('foo'), 'foo not valid' ); ok( !$form->valid('bar'), 'bar not valid' ); } file.t100644000765000024 373012775731227 17001 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/constraintsuse strict; use warnings; use Test::More; use HTML::FormFu; eval "use CGI"; if ($@) { plan skip_all => 'CGI required'; die $!; } plan tests => 10; # Copied from CGI.pm - http://search.cpan.org/perldoc?CGI %ENV = ( %ENV, 'SCRIPT_NAME' => '/test.cgi', 'SERVER_NAME' => 'perl.org', 'HTTP_CONNECTION' => 'TE, close', 'REQUEST_METHOD' => 'POST', 'SCRIPT_URI' => 'http://www.perl.org/test.cgi', 'SCRIPT_FILENAME' => '/home/usr/test.cgi', 'SERVER_SOFTWARE' => 'Apache/1.3.27 (Unix) ', 'HTTP_TE' => 'deflate,gzip;q=0.3', 'QUERY_STRING' => '', 'REMOTE_PORT' => '1855', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)', 'SERVER_PORT' => '80', 'REMOTE_ADDR' => '127.0.0.1', 'CONTENT_TYPE' => 'multipart/form-data; boundary=xYzZY', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'PATH' => '/usr/local/bin:/usr/bin:/bin', 'REQUEST_URI' => '/test.cgi', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'SCRIPT_URL' => '/test.cgi', 'SERVER_ADDR' => '127.0.0.1', 'DOCUMENT_ROOT' => '/home/develop', 'HTTP_HOST' => 'www.perl.org' ); my $q; { my $file = 't/elements/file_post.txt'; local *STDIN; open STDIN, "<", $file or die "missing test file $file"; binmode STDIN; $q = CGI->new; } my $form = HTML::FormFu->new; $form->load_config_file('t/constraints/file.yml'); $form->process($q); { ok( $form->submitted ); ok( !$form->has_errors('hello_world') ); ok( !$form->has_errors('does_not_exist_gif') ); ok( $form->valid('hello_world') ); ok( $form->valid('does_not_exist_gif') ); } $form->process( { hello_world => 'not a file', } ); { ok( $form->submitted ); ok( $form->has_errors('hello_world') ); ok( !$form->has_errors('does_not_exist_gif') ); ok( !$form->valid('hello_world') ); ok( !$form->valid('does_not_exist_gif') ); } word.t100644000765000024 252212775731227 17033 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/constraintsuse strict; use warnings; use Test::More tests => 16; use HTML::FormFu; my $form = HTML::FormFu->new; $form->element('Text')->name('foo'); $form->element('Text')->name('bar'); $form->constraint('Word'); # Valid { $form->process( { foo => 'aaa', bar => 'bbbbbbb', } ); ok( $form->valid('foo'), 'foo valid' ); ok( $form->valid('bar'), 'bar valid' ); ok( grep { $_ eq 'foo' } $form->valid ); ok( grep { $_ eq 'bar' } $form->valid ); } # [space] - Invalid { $form->process( { foo => 'a', bar => 'b c', } ); ok( $form->valid('foo'), 'foo valid' ); ok( !$form->valid('bar'), 'foo valid' ); ok( grep { $_ eq 'foo' } $form->valid ); ok( !grep { $_ eq 'bar' } $form->valid ); } # [newline] - Invalid { $form->process( { foo => 'a', bar => "b\nc", } ); ok( $form->valid('foo'), 'foo valid' ); ok( !$form->valid('bar'), 'foo valid' ); ok( grep { $_ eq 'foo' } $form->valid ); ok( !grep { $_ eq 'bar' } $form->valid ); } # "0" is valid { $form->process( { foo => 0, bar => 2, } ); ok( $form->valid('foo'), 'foo valid' ); ok( $form->valid('bar'), 'foo valid' ); ok( grep { $_ eq 'foo' } $form->valid ); ok( grep { $_ eq 'bar' } $form->valid ); } label.yml100644000765000024 27712775731227 16727 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/elements--- elements: - type: Label name: foo - type: Label name: foo3 default: bar retain_default: 1 tag: div - type: Submit name: submit reverse.t100644000765000024 314112775731227 16776 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/elementsuse strict; use warnings; use Test::More tests => 4; use HTML::FormFu; my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); # add element to test reverse_single reversing labels my $field1 = $form->element('Text')->name('foo1')->label('My Foo 1') ->reverse_single(1); # add element to test reverse_multi reversing labels in multi my $multi1 = $form->element('Multi')->label('My Multi 1'); $multi1->element('Text')->name('bar1')->label('My Bar 1')->reverse_multi(1); # add element to test reverse_multi not reversing labels outside multi my $field2 = $form->element('Text')->name('foo2')->label('My Foo 2')->reverse_multi(1); # add element to test reverse_single not reversing labels in multi my $multi2 = $form->element('Multi')->label('My Multi 2'); $multi2->element('Text')->name('bar2')->label('My Bar 2')->reverse_single(1); my $field1_xhtml = qq{
}; is( "$field1", $field1_xhtml, 'reverse_single normal' ); my $multi1_xhtml = qq{
}; is( "$multi1", $multi1_xhtml, 'reverse_multi normal' ); my $field2_xhtml = qq{
}; is( "$field2", $field2_xhtml, 'reverse_multi outside multi' ); my $multi2_xhtml = qq{
}; is( "$multi1", $multi1_xhtml, 'reverse_single inside multi' ); callback.t100644000765000024 240712775731227 16717 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/filtersuse strict; use warnings; use Test::More tests => 6; use HTML::FormFu; use lib 'lib'; my $form = HTML::FormFu->new; $form->element('Text')->name('foo')->filter('Callback') ->callback( sub { $_[0] =~ s/(\d)(\d)/$2$1/g; shift; } ); $form->element('Text')->name('bar')->filter('Callback'); $form->element('Text')->name('baz')->filter('Callback') ->callback('FilterCallback::my_filter'); my $original_foo = "ab123456"; my $filtered_foo = "ab214365"; my $original_bar = "ab123456"; my $filtered_bar = "ab123456"; my $original_baz = "abcdef"; my $filtered_baz = "ABCdef"; $form->process( { foo => $original_foo, bar => $original_bar, baz => $original_baz, } ); # foo is quoted is( $form->param('foo'), $filtered_foo, 'foo filtered' ); is( $form->params->{foo}, $filtered_foo, 'foo filtered' ); # bar is filtered is( $form->param('bar'), $filtered_bar, 'bar filtered' ); is( $form->params->{bar}, $filtered_bar, 'bar filtered' ); # baz is filtered is( $form->param('baz'), $filtered_baz, 'baz filtered' ); is( $form->params->{baz}, $filtered_baz, 'baz filtered' ); { package FilterCallback; use strict; use warnings; sub my_filter { my ($value) = @_; $value =~ tr/abc/ABC/; return $value; } } get_element.t100644000765000024 171612775731227 16750 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/formuse strict; use warnings; use Test::More tests => 12; use HTML::FormFu; my $form = HTML::FormFu->new; my $fs = $form->element('Fieldset'); my $e1 = $fs->element('Text')->name('foo'); my $e2 = $fs->element('Hidden')->name('foo'); my $e3 = $fs->element('Hidden')->name('bar'); { my @elems = $form->get_element; is( @elems, 1 ); ok( $elems[0] == $fs ); } { my @elems = $form->get_element( { type => 'Fieldset' } ); is( @elems, 1 ); ok( $elems[0] == $fs ); } { my @elems = $fs->get_element('foo'); is( @elems, 1 ); ok( $elems[0] == $e1 ); } { my @elems = $fs->get_element( { name => 'foo' } ); is( @elems, 1 ); ok( $elems[0] == $e1 ); } { my @elems = $fs->get_element( { type => 'Hidden' } ); is( @elems, 1 ); ok( $elems[0] == $e2 ); } { my @elems = $fs->get_element( { name => 'foo', type => 'Hidden', } ); is( @elems, 1 ); ok( $elems[0] == $e2 ); } get_filters.t100644000765000024 247612775731227 16773 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/formuse strict; use warnings; use Test::More tests => 20; use HTML::FormFu; my $form = HTML::FormFu->new; $form->element('Text')->name('name')->filter('LowerCase'); $form->element('Text')->name('age'); $form->filter( HTMLEscape => 'name', 'age' ); $form->filter('Whitespace'); { my $filters = $form->get_filters; is( @$filters, 5, '5 filters' ); is( $filters->[0]->name, 'name' ); is( $filters->[1]->name, 'name' ); is( $filters->[2]->name, 'name' ); is( $filters->[3]->name, 'age' ); is( $filters->[4]->name, 'age' ); is( $filters->[0]->type, 'LowerCase' ); is( $filters->[1]->type, 'HTMLEscape' ); is( $filters->[2]->type, 'Whitespace' ); is( $filters->[3]->type, 'HTMLEscape' ); is( $filters->[4]->type, 'Whitespace' ); } { my $filters = $form->get_filters('name'); is( @$filters, 3, '3 filters' ); is( $filters->[0]->type, 'LowerCase' ); is( $filters->[1]->type, 'HTMLEscape' ); is( $filters->[2]->type, 'Whitespace' ); } { my $filters = $form->get_filters( { name => 'age' } ); is( @$filters, 2, '2 filters' ); is( $filters->[0]->type, 'HTMLEscape' ); is( $filters->[1]->type, 'Whitespace' ); } { my $filters = $form->get_filters( { type => 'LowerCase' } ); is( @$filters, 1, '1 filter' ); is( $filters->[0]->name, 'name' ); } languages.yml100644000765000024 12512775731227 16735 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/formlanguages: - de elements: - name: foo - name: bar constraints: - Required param_array.t100644000765000024 67112775731227 16735 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/formuse strict; use warnings; use Test::More tests => 3; use HTML::FormFu; my $form = HTML::FormFu->new; $form->element('Text')->name('foo'); $form->element('Text')->name('bar'); $form->element('Text')->name('baz'); $form->process( { foo => 'a', bar => [ 'b', 'c' ], } ); is_deeply( $form->param_array('foo'), ['a'] ); is_deeply( $form->param_array('bar'), [ 'b', 'c' ] ); is_deeply( $form->param_array('baz'), [] ); param_value.t100644000765000024 74412775731227 16734 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/formuse strict; use warnings; use Test::More tests => 4; use HTML::FormFu; my $form = HTML::FormFu->new; $form->element('Text')->name('foo'); $form->element('Text')->name('bar'); $form->element('Text')->name('baz'); $form->process( { foo => 'a', bar => [ 'b', 'c' ], } ); is( $form->param_value('foo'), 'a' ); is( $form->param_value('bar'), 'b' ); my @baz = $form->param_value('baz'); # we got 1 value ok( @baz == 1 ); # it was undef is( $baz[0], undef ); repeatable000755000765000024 012775731227 15267 5ustar00nigelstaff000000000000HTML-FormFu-2.05/tclone.t100644000765000024 351712775731227 16722 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/repeatableuse strict; use warnings; use Scalar::Util qw/ refaddr /; use Test::More tests => 19; use HTML::FormFu; my $form = HTML::FormFu->new; $form->load_config_file('t/repeatable/clone.yml'); $form->get_all_element( { type => 'Repeatable' } )->repeat(2); $form->process( { 'rep_1.foo' => 'a', 'rep_1.bar' => '', 'rep_2.foo' => '', 'rep_2.bar' => 'd', count => 2, } ); isa_ok( $form, 'HTML::FormFu' ); # fieldset my $fs = $form->get_element; isa_ok( $fs, 'HTML::FormFu::Element::Fieldset' ); is( refaddr( $fs->parent ), refaddr($form), ); # hidden field my $hidden = $form->get_field('count'); isa_ok( $hidden, 'HTML::FormFu::Element::Hidden' ); is( refaddr( $hidden->parent ), refaddr($fs), ); # repeatable my $rep = $fs->get_element( { type => 'Repeatable' } ); isa_ok( $rep, 'HTML::FormFu::Element::Repeatable' ); is( refaddr( $rep->parent ), refaddr($fs), ); # block 1 { my $block = $rep->get_elements->[0]; my $foo = $block->get_fields->[0]; is( refaddr( $foo->parent ), refaddr($block), ); is( refaddr( $foo->get_constraint->parent ), refaddr($foo), ); ok( !$foo->get_error ); my $bar = $block->get_fields->[1]; is( refaddr( $bar->parent ), refaddr($block), ); is( refaddr( $bar->get_constraint->parent ), refaddr($bar), ); is( refaddr( $bar->get_error->parent ), refaddr($bar), ); } # block 2 { my $block = $rep->get_elements->[1]; my $foo = $block->get_fields->[0]; is( refaddr( $foo->parent ), refaddr($block), ); is( refaddr( $foo->get_constraint->parent ), refaddr($foo), ); is( refaddr( $foo->get_error->parent ), refaddr($foo), ); my $bar = $block->get_fields->[1]; is( refaddr( $bar->parent ), refaddr($block), ); is( refaddr( $bar->get_constraint->parent ), refaddr($bar), ); ok( !$bar->get_error ); } release000755000765000024 012775731227 14773 5ustar00nigelstaff000000000000HTML-FormFu-2.05/xtdistmeta.t100644000765000024 17212775731227 17112 0ustar00nigelstaff000000000000HTML-FormFu-2.05/xt/release#!perl # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. use Test::CPAN::Meta; meta_yaml_ok(); kwalitee.t100644000765000024 27512775731227 17111 0ustar00nigelstaff000000000000HTML-FormFu-2.05/xt/release# this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.12 use strict; use warnings; use Test::More 0.88; use Test::Kwalitee 1.21 'kwalitee_ok'; kwalitee_ok(); done_testing; ascii.t100644000765000024 113512775731227 17147 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/constraintsuse strict; use warnings; use Test::More tests => 4; use HTML::FormFu; my $form = HTML::FormFu->new; $form->element('Text')->name('foo'); $form->element('Text')->name('bar'); $form->constraint('ASCII'); # Valid { $form->process( { foo => 'aaa', bar => 'bbbbbbb', } ); ok( $form->valid('foo'), 'foo valid' ); ok( $form->valid('bar'), 'bar valid' ); } # Invalid { $form->process( { foo => 'aaa', bar => '日本語', } ); ok( $form->valid('foo'), 'foo valid' ); ok( !$form->valid('bar'), 'bar not valid' ); } email.t100644000765000024 317012775731227 17147 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/constraintsuse strict; use warnings; use Test::More tests => 7; use HTML::FormFu; { my $form = HTML::FormFu->new; $form->element('Text')->name('foo')->constraint('Email'); # Valid { $form->process( { foo => 'cfranks@cpan.org', } ); ok( $form->valid('foo'), 'foo valid' ); } # Invalid { $form->process( { foo => 'cfranks@cpan', } ); ok( $form->has_errors('foo'), 'foo has errors' ); } # Email with IP valid by default { $form->process( { foo => 'rjbs@[1.2.3.4]' } ); ok( $form->valid('foo'), 'foo valid - ip ok by default' ); } } { my $form = HTML::FormFu->new; $form->element('Text')->name('foo')->constraint('Email')->options('mxcheck'); # Valid - Scalar { $form->process( { foo => 'cfranks@cpan.org' } ); ok( $form->valid('foo'), 'foo valid - mxcheck scalar' ); } } { my $form = HTML::FormFu->new; $form->element('Text')->name('foo')->constraint('Email')->options(['mxcheck']); # Valid - Array { $form->process( { foo => 'djzort@cpan.org' } ); ok( $form->valid('foo'), 'foo valid - mxcheck array' ); } } { my $form = HTML::FormFu->new; $form->element('Text')->name('foo')->constraint('Email')->options({'mxcheck' => 1 }); # Valid - Hash { $form->process( { foo => 'djzort@cpan.org', options => { 'mxcheck' => 1 } } ); ok( $form->valid('foo'), 'foo valid - mxcheck hash' ); } } { my $form = HTML::FormFu->new; $form->element('Text')->name('foo')->constraint('Email')->options({'allow_ip' => 0 }); # Email with IP invalid when turned off { $form->process( { foo => 'rjbs@[1.2.3.4]' } ); ok( $form->has_errors('foo'), 'foo valid - ip invalid when turned off' ); } } equal.t100644000765000024 414712775731227 17174 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/constraintsuse strict; use warnings; use Test::More tests => 21; use HTML::FormFu; my $form = HTML::FormFu->new; $form->element('Text')->name('foo')->constraint('Equal') ->others( [ 'bar', 'baz' ] ); $form->element('Text')->name('bar'); $form->element('Text')->name('baz'); # Valid { $form->process( { foo => 'yada', bar => 'yada', baz => 'yada', } ); ok( $form->valid('foo'), 'foo valid' ); ok( $form->valid('bar'), 'bar valid' ); ok( $form->valid('baz'), 'baz valid' ); } # Valid { $form->process( { foo => '', bar => '', baz => '', } ); ok( $form->valid('foo'), 'foo valid' ); ok( $form->valid('bar'), 'bar valid' ); ok( $form->valid('baz'), 'baz valid' ); } # Valid { $form->process( { foo => [ 'a', 'b' ], bar => [ 'a', 'b' ], baz => [ 'b', 'a' ], } ); ok( $form->valid('foo'), 'foo valid' ); ok( $form->valid('bar'), 'bar valid' ); ok( $form->valid('baz'), 'baz valid' ); } # Invalid { $form->process( { foo => 'yada', bar => 'yada', baz => 'x', } ); ok( $form->valid('foo'), 'foo valid' ); ok( $form->valid('bar'), 'bar valid' ); ok( !$form->valid('baz'), 'baz not valid' ); } # Invalid { $form->process( { foo => 'yada', bar => 'yada', baz => '', } ); ok( $form->valid('foo'), 'foo valid' ); ok( $form->valid('bar'), 'bar valid' ); ok( !$form->valid('baz'), 'baz not valid' ); } # Invalid { $form->process( { foo => '', bar => 'yada', baz => 'yada', } ); ok( $form->valid('foo'), 'foo valid' ); ok( !$form->valid('bar'), 'bar not valid' ); ok( !$form->valid('baz'), 'baz not valid' ); } # Invalid { $form->process( { foo => [ 'a', 'b' ], bar => [ 'a', 'b' ], baz => ['a'], } ); ok( $form->valid('foo'), 'foo valid' ); ok( $form->valid('bar'), 'bar valid' ); ok( !$form->valid('baz'), 'baz not valid' ); } range.t100644000765000024 116312775731227 17154 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/constraintsuse strict; use warnings; use Test::More tests => 4; use HTML::FormFu; my $form = HTML::FormFu->new; $form->element('Text')->name('foo')->constraint('Range')->min(3)->max(5); $form->element('Text')->name('bar')->constraint('Range')->min(3)->max(5); # Valid { $form->process( { foo => 3, bar => 4, } ); ok( $form->valid('foo'), 'foo valid' ); ok( $form->valid('bar'), 'bar valid' ); } # Invalid { $form->process( { foo => 1, bar => 6, } ); ok( !$form->valid('foo'), 'foo not valid' ); ok( !$form->valid('bar'), 'bar not valid' ); } regex.t100644000765000024 140312775731227 17167 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/constraintsuse strict; use warnings; use Test::More tests => 8; use HTML::FormFu; my $form = HTML::FormFu->new; $form->element('Text')->name('foo'); $form->element('Text')->name('bar'); $form->constraint('Regex'); # Valid { $form->process( { foo => 'aaa', bar => 'bbbbbbb', } ); ok( $form->valid('foo'), 'foo valid' ); ok( $form->valid('bar'), 'bar valid' ); ok( grep { $_ eq 'foo' } $form->valid ); ok( grep { $_ eq 'bar' } $form->valid ); } # "0" is valid { $form->process( { foo => 0, bar => 2, } ); ok( $form->valid('foo'), 'foo valid' ); ok( $form->valid('bar'), 'foo valid' ); ok( grep { $_ eq 'foo' } $form->valid ); ok( grep { $_ eq 'bar' } $form->valid ); } checkbox.t100644000765000024 236412775731227 17117 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/elementsuse strict; use warnings; use Test::More tests => 6; use HTML::FormFu; my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); my $foo = $form->element('Checkbox')->name('foo')->value('foox'); # add more elements to test accessor output my $bar = $form->element('Checkbox')->name('bar')->value('barx'); my $moo = $form->element('Checkbox')->name('moo')->value('moox')->default('moox'); my $fad = $form->element('Checkbox')->name('fad')->value('fadx')->default('fadx'); my $field_xhtml = qq{
}; is( "$foo", $field_xhtml, 'field xhtml' ); my $form_xhtml = < $field_xhtml
EOF is( "$form", $form_xhtml, 'stringified form' ); # With mocked basic query { $form->process( { foo => 'foox', moo => 'moox', } ); like( "$foo", qr/checked/ ); unlike( "$bar", qr/checked/ ); like( "$moo", qr/checked/ ); unlike( "$fad", qr/checked/ ); } combobox.t100644000765000024 412112775731227 17132 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/elementsuse strict; use warnings; use Test::More tests => 9; use HTML::FormFu; my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); $form->load_config_file('t/elements/combobox.yml'); { $form->process; is( $form->get_element( { type => 'ComboBox' } ), qq{
} ); } { $form->get_element( { type => 'ComboBox' } )->default('one'); $form->process; is( $form->get_element( { type => 'ComboBox' } ), qq{
} ); } { $form->get_element( { type => 'ComboBox' } )->default('four'); $form->process; is( $form->get_element( { type => 'ComboBox' } ), qq{
} ); } # valid select value { $form->process( { combo_select => 'one', combo_text => '', } ); ok( $form->submitted_and_valid ); is( $form->param_value('combo'), 'one' ); } # valid text value { $form->process( { combo_select => '', combo_text => 'four', } ); ok( $form->submitted_and_valid ); is( $form->param_value('combo'), 'four' ); } # valid - text is used in preference to select value { $form->process( { combo_select => 'one', combo_text => 'four', } ); ok( $form->submitted_and_valid ); is( $form->param_value('combo'), 'four' ); } datetime.t100644000765000024 4642212775731227 17150 0ustar00nigelstaff000000000000HTML-FormFu-2.05/t/elementsuse strict; use warnings; use Test::More tests => 16; use HTML::FormFu; use DateTime; my $dt = DateTime->new( day => 6, month => 8, year => 2007, hour => 1, minute => 0, ); my $form = HTML::FormFu->new( { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } ); $form->load_config_file('t/elements/datetime.yml'); $form->get_field('foo')->default($dt); $form->process; is( "$form", <
HTML $form->process( { foo_hour => '00', foo_minute => '00', foo_day => 30, foo_month => 6, foo_year => 2007, bar_hour => '01', bar_minute => '30', bar_day => 1, bar_month => 7, bar_year => 2007, } ); ok( $form->submitted_and_valid ); my $foo = $form->param('foo'); my $bar = $form->param('bar'); isa_ok( $foo, 'DateTime' ); ok( !ref $bar ); is( $foo, "06/30/2007 00:00" ); is( $bar, "01-07-2007 01:30" ); like( $form->get_field('foo'), qr/\Q