HTML-FormHandler-0.40068 000755 000770 000024 0 13134157564 14402 5 ustar 00gshank staff 000000 000000 TODO 100644 000770 000024 174 13134157564 15135 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068 Unique support for non-top-level fields?
Improve example of Repeatable form (BookDB, User) to do adds & deletes with js
README 100644 000770 000024 554 13134157564 15327 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068
This archive contains the distribution HTML-FormHandler,
version 0.40068:
HTML forms using Moose
This software is copyright (c) 2017 by Gerda Shank.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
This README file was generated by Dist::Zilla::Plugin::Readme v6.010.
Changes 100644 000770 000024 104404 13134157564 16021 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068 0.40068 Thu Jul 20, 2017
Add RequestToken field
Add build_render_list_method
Zccept coderefs for date_start, date_end in Date field
0.40067 Wed Oct 19, 2016
Fixed Text validation checking, to allow deflations and transformations
to be applied first.
change order of processing 'input_without_param' and 'use_fields_for_input_without_param'
fixes problem with not using default for select field
fix for deflation of undef value, from ether's pull request 122
switch from JSON.pm to JSON::MaybeXS
use coercion on 'options' instead of duplicate code in _load_options
use [PkgVersion]
fix bug in TextCSV field caused by setting error for multiple values in Text field
0.40066 Mon Jul 18, 2016
Improve Select field option list support
Support arrayref-of-arrayref options in a subroutine
Allow input_append_button to take input_append_button_element_class
Allow attributes to be specified for input_append_button
Add comma digit grouping and custom currency symbol
Allow input_append_button to take input_append_button_element_class
Various minor doc updates
0.40065 Sat Mar 19, 2016
Ensure Text fields only contain a single value
Make it easier to specify a Select field having identical labels and values.
0.40064 Thu Sep 17, 2015
Don't warn about date format unless set to `date`
Wrap checkbox in CheckboxGroup, if requested
Create es_es.pm
Create ca_es.pm
select field invalid value message: encode the select value
typo in link to the example app
remove css_class from Captcha field
0.40063 Mon Jun 29, 2015
Raised Moose prereq to 2.1403 because 2.0604 causes failing tests
0.40062 Fri Jun 25, 2015
Separate out test using Type::Tiny::Enum to skip_all
0.40061 Thu Jun 25, 2015
Add skip for Type::Tiny::Enum
0.40060 Wed Jun 24, 2015
Field validation can use Type::Tiny subclasses
Replace NoTabTests and EOLTests
switch from List::AllUtils+List::MoreUtils to List::Util (in core)
add render_elementx and renderx methods to allow setting attributes at render time
Warning if Date field is html5 and not ISO
0.40059 Thu Feb 25, 2015
Remove clear->item_id that snaked in via merge error
Pass subfield name to repeatable element wrapper
0.40058 Thu Feb 25, 2015
add HorizCheckboxGroup for alternative CheckboxGroup rendering
minor doc typos
do $class->meta->make_immutable after new_with_traits
Czech translation
'get_errors' synonym for 'errors' on form
add repeatable_element_wrapper ability
0.40057 Fri Aug 1, 2014
added support for tag 'inline' in bootstrap3 wrapper
add test for inline-checkboxes
add test for prefilled with init_object form reuse
clear item and init_object which are required for form reuse
add failing test for element_class override through build_update_subfields
add a bit of doc about handling DBIC new results & 'use_default_over_obj'
=encoding utf-8 in Manual/Rendering.pod
remove deprecated css_class and input_class attributes
add param_to_values method to convert parameters to init_object-like hashref
Add code to respect the label_no_filter tag on checkboxes for Bootstrap
and the Base widgets.
fix bootstrap3 input_append_button
Respect label_no_filter on checkbox labels.
add Arabic translations
use time_zone and locale options in Date field
0.40056 Mon Feb 20, 2014
use sorted_fields in 'dump_validated'
added Type::Tiny support
Use alert-danger rather than alert-error with in Bootstrap3
Fixes RT#91966 (deprecated way to call enum warning)
bug in reloading repeatable fields; skip inactive fields
0.40055 Thu Jan 2, 2014
handle SelectCSV field in as_label method of Select field
2014 bug in t/compound/basic.t test (rt91793)
0.40054 Tue Nov 26, 2013
Check for old unimplemented parameter to wrap_checkbox, and check
for existence of option_wrapper
add language handle to bootstrap3 tests
pass event to repeatable js click handler
stop forcing undefined Checkbox fields to 0; didn't allow undef for value
different inline class for Bootstrap3 for checkboxes and radios
select options: add coercion of arrayref of hashrefs from arrayref of strings
allow Date field to use DateTime subclasses
0.40053 Tue Oct 22, 2013
Bad version number on prereq
0.40052 Mon Oct 21, 2013
allow overriding layout_classes in Bootstrap3 wrapper
allow passing in value to 'as_label' method in Select field
0.40051 Thu Oct 17, 2013
Update Italian message file
Minor doc updates
add errors_by_name and errors_by_id to result
add Bootstrap3 theme for those using the Bootstrap theme
better form-horizontal Bootstrap 3.0 support
provide method in result (form_and_field_errors) to return form and field errors
0.40050 Thu Sep 26, 2013
*** 'widget_tags' in a field have been deprecated for a long time; removing.
There are still widget_tags in the form and compound fields.
Use 'tags' in a field instead.
*** Initial support of Bootstrap3 - still EXPERIMENTAL. Do not use in
production yet. Changes in interface may occur over the next few weeks.
Supporting Bootstrap 3.0 required a surprising amount of minor refactoring:
Bootstrap3 checkboxes and radio elements now have an additional div wrapping them.
This required setting flags in the wrapper that could be seen by the
field widgets. Used 'wrapper_tags' attribute, which is not the most satisfying
solution but does work. The former 'controls' div now doesn't have the
'controls' class, but is used for sizing. Added new attribute
'element_wrapper_class' to provide these classes. Split out addition of
classes to the wrapper and element into 'add_standard_wrapper_classes' and
'add_standard_element_classes', because B3.0 now wants 'has-error' and
'has-warning' instead of the former 'error' class. 'control-group' was
changed to 'form-group'. The 'form-control' class has been added to
text, password, textarea, and select fields.
Add 'preserve_case' attribute to Email field
0.40028 Sat Sep 21, 2013
Fixed bug when rendering blocks with 'run' (results)
Sort the deflated values of SelectCSV field
Allow passing Email::Valid params to Email field
Typos fixed
Add 'use_init_obj_when_no_accessor_in_item' flag for dual-purpose init_obj
0.40027 Thu Aug 8, 2013
Add 'options_ref' method for using options in TT templates
Add unique messages to field messages hash
0.40026 Wed Jul 3, 2013
Add Italian message file
Doc tweaks
Add errors_by_id and errors_by_name convenience methods
0.40025 Thu May 9, 2013
Add skip in t/setup_form_config.t unless YAML::Syck (Config::Any)
0.40024 Tue May 7, 2013
Add 'no_option_validation' flag to select field.
Remove HtmlArea field. (Has always been broken, and there were complaints about
not prereqing HTML::Tidy, which I won't do due to difficulty of installing)
Change 'use' of GD::SecurityImage to a 'require'. (Will not prereq this one either.)
0.40023 Tue Apr 30, 2013
Add Brazilian Portuguese translation file
Fix bug in process of re-loading repeatables without primary keys after db update
Add TextCSV field for multiple values in a text field (useful with js libraries)
0.40022 Mon Mar 18, 2013
Remove 'writeonly' flag from Display field, because fix to not pull
values from an item/init_object with that flag meant that values were not
being applied to Display fields, when people were relying on that.
Switch to using github issues instead of RT
0.40021 Mon Mar 4, 2013
Don't validate disabled fields
check for existence of field in match_when before getting $field->fif,
improve error message
add type_attr to Select field; update t/render/ff.t to use it
cleanup select field options_method building
0.40020 Sun Feb 20, 2013
More support for repeatable javascript:
Tweak Bootsrap wrapper to check do_wrapper instead of do_label when rendering
'controls' div
Reminder: It's always a good idea to make your own set of of widgets so that
updates don't throw off your rendering. This change was hardly noticeable
in the FH testcases, but it's possible you were relying on the old behavior
for CSS.
Add 'controls_div' to Simple wrapper.
Add RmElement example field.
0.40019 Fri Feb 8, 2013
Move back 'before_element' tag; breaks existing rendering. Add additional
'before_element_inside_div' tag instead.
0.40018 Thur Feb 7, 2013
Don't put 'control-group' on Bootstrap hidden field div because of spacing issues
Support for repeatable add/remove javascript
add 'setup_for_js' flag to Field::Repeatable
add HTML::FormHandler::Render::RepeatableJs
add HTML::FormHandler::Field::AddElement
add before_wrapper and after_wrapper tags
add 'id' to wrappers of compound fields
update Display field to use 'render_method'
allow applying wrapper widget even if field has render method
Fix positioning of 'before_element' tag in Bootstrap wrapper
0.40017 Sat Dec 1, 2012
Fix bad html in Span widget
Fix unitialized warning processing has_field with '+'
Use get_default_value in Submit/Reset field
Improve doc for bootstrap theme, use BootstrapFormMessages role
Add lazy to render_filter for random failures in 5.17.6
0.40016 Mon Oct 15, 2012
Fix bug with DBIC model interface
0.40015 Sun Oct 14, 2012
Remove extraneous use of Data::Printer
Correct spelling of PadWalker
0.40014 Sat Oct 13, 2012
Add useful message and die in field widgets with no result
Use string instead of object in LANGUAGE_HANDLE
Fix bug in required_when when value is 0
Allow using arrayref for sort_column.
Select field as_label for multiple fields.
Minor doc fixes
Bug - option group label attributes
Add info_message to form and rendering.
Add 'use_fields_for_input_without_param' flag
Call inflate_default_method on repeatable elements
0.40013 Sun Jun 24, 2012
Re-write elimination of PrimaryKey field from repeatable value,
add 'no_value_if_empty' attribute
Fix bug with labels '0' not being displayed
Change 'missing' to an attribute.
Submit field has 'submit' html5_type_attr
Add html5_type_attr to Hidden, Reset, and Password fields
Add new behavior for compound fields and 'not_nullable' flag,
where compound field value is not set to undef when all
subfields are empty. This is needed for some kinds of db
relationships, to ensure that subfields are set to null.
0.40012 Fri Jun 15, 2012
Bug cloning merging repeatable instances; form reference garbage collected
Doc typos
0.40011 Tue Jun 5, 2012
Remove automatic building of field results. If you have field tests, you
need to add $field->build_result after creating field with 'new'.
Possible memory cycle if result is accessed when not built.
Add 'required_when'
Add Bulgarian message file (dpetrov)
Bootstrap input_append/prepend: no linefeeds between input
Add input_append_button tag to Bootstrap wrapper
Correct camelcase for widgets in two fields
Add 'value_when_empty' for multiple select
Add SelectCSV multiple field
Change Select to use sort_options_method for sorting
0.40010 Sun May 20, 2012
Add 'when' clause to apply actions
Fix memory leak on fields with defaults due to missing 'my' causing
$self to be closed over so that RAM was leaked if forms were constructed
but never processed. (in default_ & validate_
methods)
0.40009 Mon May 14, 2012
Re-implement improved version of 'reload_after_update'.
0.40008 Fri May 11, 2012
Add 'missing' method to Field
Use result in Bootstrap render_form_messages
Fix Render::Table
Propagate errors when they're added, so $form->has_errors
works in sub validate
Use do_render_label in Bootstrap wrapper to allow setting
label class/attributes
Add subfield convenience method.
Remove 'reload_after_update'. Didn't work anyway. Bug: duplicate
results with repeatables. (avoid with reload_after_update => 0)
Re-factor RadioGroup widget to allow individually rendered options
Support option groups in 'Select', 'RadioGroup' & 'CheckboxGroup' widgets
0.40007 Tues Apr 24, 2012
Re-factor widget to provide 'render_element' method
Various doc updates
Move 'by_flag' processing into '_merge_updates'
Handle disabled fields better; result_from_fields if no input
Fix bug: html_attributes callback called with 'input' instead of 'element'
0.40006 Tues Apr 10, 2012
Render::Table incorrect table start
Minor doc cleanup
Add 'build_label_method'
Re-do merging of widget_tags
Implement experimental 'include' list for Form/Compound fields
Refactor merge_updates and update_subfields to handle contains
Add 'by_type' to update_subfields
0.40005 Mon Mar 26, 2012
prevent undef from being passed to maketext
expand use of 'posted' flag to check false values
add wrap_label method
0.40004 Fri Mar 23, 2012
Don't put element attributes on select options
Make render_list lazy
Better defaults for compound fields
Provide package name for die when not extending
Add block_list to provide blocks
Defaults for repeatable fields
0.40003 Wed Mar 14, 2012
Move dfv test that fails prereqs
0.40002 Tue Mar 13, 2012
Put form wrappers that are fieldsets inside form tag; outside not legal HTML
Doc updates
Add 'NonEditable' field and 'Span' field widget
Patch HTMLAttributes (compatibility for older style custom widgets)
0.40001 Wed Mar 7, 2012
Remove \K in regex for ucc_widget; doesn't work pre 5.10
Switch DateTime field to use inflate_default_method
0.40000 Tue Mar 6, 2012
**** There are many changes to rendering, many of them incompatible.
These changes *will* break existing form rendering.
You must check that your rendering works before upgrading. Making a copy
of the old code (the widget and rendering roles) may be helpful (or use
the compatibility libraries -- see below).
I always prefer to maintain backward compatibility if possible, but
a number of the improvements were not possible without breaking
compatibility, so I did a lot of changes at once.
Compatibility libraries are provided to help support rendering that relied
on the earlier libriaries at:
git://github.com/gshank/html-formhandler_pre-0.40_compat.git
README at: https://github.com/gshank/html-formhandler_pre-0.40_compat/blob/master/README
Add Twitter Bootstrap 2.0 widget wrapper
Add 'no_update' flag to allow skipping model_update.
Remove 'deflate_to' flag; provide new inflation/deflation methods.
see HTML::FormHandler::Manual::InflationDeflation
New 'build_id_method' to provide different builder method for field IDs.
'auto_fieldset' and 'no_auto_fieldset' no longer used. No automatic fieldsets.
Can be added with do_wrapper => 1 and a tag of wrapper_tag => 'fieldset'
Localize the value of the reset button.
Tests and fix for form 'validate_' and 'default_' method
for repeatables fields.
Change default radiogroup rendering to not use elements. Add back
with tag radio_br_after => 1
Switch to using coderef for deflate_method; custom fields with deflate sub
will need to be modified.
Add block rendering (HTML::FormHandler::Blocks)
Re-do code for default & validate method construction; now provides
'default_method' and 'validate_method' coderef setting
Remove 'init_value_*' from Field (deprecated for years).
Use Hash::Merge in merging update field info on creation
Fix bug in copying tags to fields by cloning field definitions
Switch to using name 'element_attr' in fields instead of 'html_attr'
Put wrapper class 'hfh-repinst' on Repeatable Instances unless they already have a wrapper class
Remove 'javascript' field attribute. Put into *_attr hashref.
Automatically put 'error' on element and wrapper.
Switch to having the 'class' as a separate attribute from the _attr collection.
Use 'element_class', 'wrapper_class' & 'label_class' arrayrefs
Switch to having widget names by default be camel case; provide convenience
methods for templates - uwidget, uwrapper, twidget, twrapper.
** this change will affect existing template systems, if they use the
$field->widget method to get the widget name. See example templates.
and conversion methods 'ucc_widget' and 'cc_widget' in HTML::FormHandler::Render::Util
Create t/share/templates/form/form_in_one.tt
Switch default rendering of checkbox to have label wrap input. Checkboxes are
complicated. See t/render/checkbox.t for various options.
Add 'build_update_subfields' to 'update_fields' processing to allow moving
more of rendering settings into a separate role
Change form 'html_attr' to 'form_element_attr', and use builder
Change interface of html_field_attributes to also return attr (instead of just in-place)
Remove 'label_no_colon', make labels without colon the default.
Add widget tag 'label_after'. Use "label_after => ': '" for old behavior
Add widget tag 'label_tag'. Default 'label'.
Widget_tags replaced with 'form_tags' in form and 'tags' in Field.
takes builder 'build_form_tags' instead of default
Repeatable elements get automatic 'div' wrapper
Remove attribute 'auto_fieldset'; wrapping form is no longer a default;
Add back with sub build_do_form_wrapper {1},
and form_tags => { wrapper_tag => 'fieldset' }
Remove automatic wrapping of compounds.
Enable wrapping with do_wrapper => 1 (there's also do_label => 1)
Put form wrapper around form tag instead of inside
wrapper_start and wrapper_end tags not used to skip wrapper; use do_wrapper => 0
The 'get_tag' method now returns '' instead of undef if tag doesn't exist.
0.36001 Tues Jan 24, 2012
Add two more widget tags: 'no_auto_fieldset' and 'no_compound_wrapper'
Remove automatic addition of 'class="label"' to labels; if you want that
behavior, add it in with form sub field_html_attributes.
Add 'SKIP' to t/config.t test for Template.
Update Captcha so it might actually work.
0.36000 Sun Jan 22, 2012
Switch to using 'process_attrs' function to process attributes in rendering;
*** There were lots of updates to rendering. You should verify your custom
rendering, to make sure that nothing has broken. The '_add_html_attributes'
method is no longer used.
Add shorthand method for setting defaults in fields
Add widget_tags 'label_no_colon' & 'wrapper_tag'
Update and reorganize TT templates
Add flags 'use_defaults_over_obj' & 'use_init_obj_over_item'
Add 'num_extra' to Repeatable
Update Turkish message file; add Float field
Add lazy to 'html' attribute in Display field
Add 'label_attr' and 'wrapper_attr' to Field
Add 'Array' trait to field_name_space and widget_name_space
Bug with selected/checked hash key in Multiple; switch to creating default
Bug with repeatable contains; not using full name for accessor.
Die if using HTML::FormHandler::Moose without HTML::FormHandler
Field::TextArea extends Field::Text to reuse its validations (min/max length)
Add is_html5 attribute to forms which causes forms to have the additional
HTML 5 attributes which can be used by HTML 5 capable clients for validation
0.35005 Sat Oct 8, 2011
Fix bug repeatable result not returned for num_when_empty
Fix bug repeatable required flag not propagated
Fix bug building nested compound fields
Allow html attributes on radio group elements
Undefined string warning in select rendering
Add Japanese message file
0.35004 Wed Oct 5, 2011
Fix bug setting multiple selects with init_object
Provide html_attr for form attributes
Use Moose type for field_name_space and widget_name_space
0.35003 Wed Sep 7, 2011
Fix bug constructing classes for Class::Load, revealed by Class::Load 0.10
0.35002 Mon Aug 8, 2011
Change to use Class::Load due to speed.
0.35001 Mon Jul 25, 2011
Undid setting processed flag when building result in BUILD. Breaks
existing apps. Re-thinking that part for now.
0.35000 Thu Jul 21, 2011
Add support for tabindex attribute.
Generic html attribute setting (html_attr)
Set 'processed' flag when building results in BUILD to fix problem
with garbage collected results.
*** it's possible that this may break code if field values were being
set outside of FormHandler, or params were set on new. Pass params
on process. Set fields inside FormHandler, or run clear first, then
set values. In general, it works best to update fields inside a
FormHandler class, in a method or method modifier.
Building results in 'new' happened originally because people expected
to be able to do $form->render after new, without process. But you're
better off always running 'process'.
Add flag 'no_preload' to skip building results in new (BUILD) if not needed
Add flag 'no_widgets' to skip applying widgets to fields if not needed
Fix for Date fields in compounds.
Types Printable & SingleWord use class messages
Add link to the bug tracker into the HELP section in the Pod.
Change how field_traits work: apply traits to field objects, add
new class method apply_traits (Stephen Thirlwall)
0.34001 Mon May 16, 2011
Fiz another memory cycle using Select field
Tweak code creating results for Field testing
0.34000 Mon May 16, 2011
Fixed memory cycles; 1 in HFH code, others by requiring Moose 2.0007
Localize value of a button
Allow limited use of has_many multiple select
Add SimpleInline & TableInline widgets to not wrap compound fields
0.33002 Tues Feb 22, 2011
Accidentally left off compatibility for 'required_message' attribute
messages => { required => '...' } is new style and worked
0.33001 Mon Feb 21, 2011
Remove unnecessary with of HFH::Validate::Actions
0.33000 Mon Feb 21, 2011
bug - empty_select check defined
Add button field, widget, template
Check html attributes for definedness not truth
Add ability to set field inactive on new & process
in addition to setting active
Move 'no_render_label' into Field
Use form's language_handle in fields
Improve PrimaryKey doc
Return empty hashref from $form->value instead of undef
Merge experimental Wizard into master
Render disabled select options
Repeatable contains rendering incorrectly, skipping empty elements
Add rendering of form_errors to widgets and Render::Simple
*** If you were using form_errors (there are none by default)
and were using HFH rendering, check for compatibility
Allow specifying full class for widget with '+'
Document removing wrapper div from Simple wrapper
Re-do how field messages are stored and accessed. Use messages => {...}
instead of various _message attributes
Add utilities in util to pull out class messages and check I18N
Update I18N messages files (those that were provided by translators)
Change render_filter Coderef setting because of leak;
*** Possible incompatibility: if you have a form render_filter,
change to function instead of method
Change _localize to a Coderef to allow easier changing.
*** If you have a custom _localize method, check for compatibility
0.32005 Wed Oct 20, 2010
Removed '//'; incompatible with earlier versions of Perl
0.32004 Wed Oct 20, 2010
Minor doc cleanup
Switch away from MooseX::Traits; memory leak because of non-cached
composed classes
0.32003 Sun Oct 3, 2010
Fix syntax for 'with', excludes => -excludes
Use labels in radio group widgets
Add 'is_active' and 'is_inactive' convenience methods in Field
Select options - check defined instead of truth
Misc minor doc and test improvements
Coderef allowed for messages in apply actions
Limit removing of numbers when constructing method names
Use html_filter when rendering labels
Allow undefining min_size and max_size in upload field
Return in render_filter if string is not defined
Change rendering of repeatable subfields
0.32002 Thu July 29, 2010
Update to handle newer Moose (error msg with Moose::Util::MetaRole API)
Swich to Dist::Zilla
Add customization of form tag attributes
Add test prereqs
0.32001 Fri June 25, 2010
Add prereqs for DateTime::Format::Strptime and Email::Valid
0.32000 Fri June 25, 2010
Accept arrayref messages in add_error
Add initial fieldset wrapper
Flag (localize_labels) in Select field for rendering; localize empty_select
Add posted flag for forms containing only fields with no params when unselected
Add 'update_fields' methods and 'update_field_list' for preference-type field updates
Fix incorrect error message in duration field
Use LANGUAGE_HANDLE instead of LANG in tests
Add 'input_class' for class attribute on input fields
Allow deflation in fif, flag 'deflate_to' => 'value'/'fif'
Fix bug with unselected Select field (move input_without_param & not_nullable into field)
Add resultset example to cookbook
Doc to look at input for multiple submit fields
Fix bug in _set_dependency; use 'has_some_value' to determine emptiness
Add form_errors for non-field errors
Remove deprecated 'min_length' attribute ('minlength' is supported)
Allow upload field to be passed a file handle
Pass values to Display field (for display-only db fields)
Change I18N to allow duck_type classes; add test for Data::Localize
Added 'peek' diagnostic function for viewing field & result trees
Fix bug with extra results in repeatable elements
Strip empty pks and empty elements from repeatable values (avoid DB errors)
Localize value of submit button
Make '+' unnecessary in front of field name space types
0.31003 Fri May 7, 2010
Change precedence of defaults over item/init_object; add 'default_over_obj' for
cases where that behavior is desired.
Fix errors in filtering HTML in rendering
Call deflation in InitResult::_result_from_obj
Split localization of labels into separate 'loc_label' method
Call loc_label where label is used in error messages
Enable empty strings for wrapper_start and wrapper_end
Set locale to en_us where needed in test
Fix widget_name_space use in fields
0.31002 Wed Apr 21, 2010
Remove unused HTML::Entities from Simple form widget
Move locale test file into xt because of env variable issues in test
0.31001 Tues Apr 20, 2010
Use full length version number
Updates to translated messages & messages in Validate::Actions
0.31 Fri Apr 16, 2010
Remove use of HTML::Entities for filtering. New render_filter coderef for filering.
Minor doc fixes for typos
Use _html_attributes in widgets (for disabled, readonly, javascript)
Localize default required field message
Add 'render_upload' to Render::Simple
Fix allowing array for field_name_space
Selected_option for select lists
Add example to cookbook and tests for setting a coderef for validation
Checkbox group use 'eq' instead of '=='
Fixes to tutorial to match Catalyst tutorial
Allow arrayref for 'has_field' (like Moose 'has')
Die on maketext errors
Move deflation from fif to get_value called by '_result_from_object'.
Possible incompatibility, except it was probably not working to start with...
0.30003 Sun Feb 21, 2010
Partial fix for lack of defaults for compound fields
Support for using model_fields roles (DBICFields)
Use 'eq' instead of '==' when constructing html for multiple selects
Remove deprecated 'auto' syntax
0.30002 Thu Feb 11, 2010
Don't convert widget names that contain uppercase
Better error messages for missing field classes
Field attribute 'input_param' to allow input names different than field names
Make field 'default' rw
Clean up doc on init_object
0.30001 Fri Feb 5, 2009
Remove unnecessary IO::All use causing dep problems
Changes to Turkish messages
Russian and Urkainian message files
Use HTML::FormHandlerX namespace for fields and widgets
Fix bug with defaults set to 0
0.30 Mon Feb 1, 2010
Improve Display Field, adding more ways to set html
Add initial pass at more automatic TT rendering
Change readonly, html attributes to 'rw'
Set widget in Reset field
Fix bugs and oddities in HFH::types
Fix bug allowing hashref to be passed to constructor
Improve doc on 'trim'
Add more doc on dynamic form creation
Allow 'options_' attributes in form
Add Turkish message file
Add 'empty_select' to Select field
Fix bug displaying empty repeatable element if no values from object
Improvements in I18N factoring
0.29002 Wed Dec 16, 2009
Remove locale.t from dist until issues solved
0.29001 Tues Dec 15, 2009
Fix bug with passing widget_wrapper to fields
Fix bug with generated method names for form methods
0.29 Wed Dec 2, 2009
Add CheckboxGroup widget, add MooseX::Traits to Form & Field class
Fix bug where defaults were not being used with an initial object
Fix DateTime field to trap DateTime errors, pass hash in value
Use build_label for field labels
Remove use of Class::Load, instead use Class::MOP::load_class()
Add set_active and make switching fields to active simpler
Fix bug when options lists from db are empty
Add encode_entities to rendering widgets
Switch from init_value_ to default_
Change upload field.
Improve setting of method defaults for set_default, set_validate, set_options
0.28
Switched to using native traits
Add Widget roles
Major refactor to support result classes
Reformatting source to more Perl standard
Fix bug generating CSS classes in Render::Simple (mazpe)
Fix POD example in ::Intro (mazpe)
0.27006 Mon Aug 17, 2009
Add ability to set params class and arguments
0.27005 Wed Aug 12, 2009
DateTime::Format::Strptime dep again
0.27004 Tues Aug 11, 2009
Date inherits from Text. Fix loading compound fields from related.
Call load_options for forms with no init_obj & params
0.27003 Sat Aug 2, 2009
Indexing failure missing version in Date
0.27002 Sat Aug 2, 2009
Fix missing dependency on DateTime::Format::Strptime
Doc tweaks
0.27001 Fri July 31, 2009
Doc fixes, fix Date field.
0.27 Sat July 25, 2009
Split HTML::FormHandler::Model::DBIC into separate distribution
Add 'inactive' flag. Cleanup Makefile.PL. 'size' split into 'size' and
'maxlength'. 'min_length' renamed to 'minlength'. Add Catalyst pod.
'html_name' used for field 'id'. Fix DateMDY field.
0.26 Tues June 23, 2009
Fix dependency test failures on UNIVERSAL::require and version
0.25 Sat June 20, 2009
Add dependency for DateTime::Format::SQLite
0.24 Sat June 20, 2009
Refactor validation processing for api consistency
Skip empty undef array elements. Update Password and PrimaryKey fields.
Fix bugs: calling validate_ method, recognizing errors in repeatable fields,
handling empty repeatable elements,
incorrect cloning in Repeatable, rendering fixes/updates.
0.23 Fri May 22, 2009
Refactor HTH to use only 'process'. Deprecate 'validate' and 'update'
Add field_list array, deprecate other usages.
Clean up documentation
Add Repeatable field to support has_many relationships
0.22 Fri May 1, 2009, 17:00
Removed development only test from distribution
Expanded apply documentation.
0.21 Thu Apr 30, 2009, 20:00
Removed podcoverage, added skip to generator.t test, added
'apply' sugar for adding actions, doc for compound field
0.20 Thu Apr 23, 2009, 17:00
Added apply constraints, transforms, checks. Refactored code for future
use of nested fields. Improvements to compound fields. Bug fix for
checkboxes. Added ability to redefine attributes of existing fields
with '+fieldname'.
0.19 Thu Mar 05, 2009, 17:00
Fix problem with empty values from form. Add Compound field.
0.18 Sun Feb 22 2009, 15:00
Add missing test prereq DateTime::Format::MySQL.
Add 'values' method to form. Add 'accessor' attribute
to field.
0.17 Thurs Feb 19 2009, 17:30
Refactor validate, adding validate_form method
0.16 Thurs Feb 19 2009, 17:00
Add ability to use arrayrefs for primary key
Clear 'fif' for non-db forms. Allow init_object for non-db forms.
0.15 Mon Feb 16 2009, 19:00
Fix inheritance of has_field. Add ability to use has_field
in roles. Some refactoring of 'clear'. If a field is not
in params, don't touch in db.
0.14 Fri Feb 06 2009, 18:00
Wrong version in META.yml. Fix fif for password fields.
0.13 Wed Feb 04 2009, 23:00
Fix validate to set params if hash
0.12 Wed Feb 04 2009, 18:00
Fix 'dump_fields'. Add more output for verbose. Change so
that 'validate' doesn't require a separate 'clear' for
persistent forms. The controller test will only execute
with an environment variable.
0.11 Mon Feb 02 2009, 17:00
Change to use BEGIN block in controllers for Catalyst 5.80.
0.10 Thu Jan 29 2009, 07:00
Remove unnecessary 'use' from Render::Simple to eliminate install
failures. Change handling of 'has_field'.
0.09 Sun Jan 25 2009, 17:00
Minor changes.
0.08 Sat Jan 24 2009, 11:00
Remove controller and role. Refactor to support persistent
forms. Remove update_from_form method. Add 'process', and
'update' methods. Update documentation to match. Update tutorial.
0.07 Thurs Jan 22 2009, 04:00
Add prereq of DateTime. Minor doc changes.
0.06 Wed Jan 21 2009, 04:00
Add prereq skip tests to controller test. Clean up Makefile.PL.
Convert test controller Book.pm to use chained. Support empty
rows.
0.05 Mon Jan 19 2009, 15:00
Add skip test to htmlarea test. Add action, http_method, & submit to form.
Add javascript to field. Create widget directory for templates.
0.04 Fri Jan 16 2009, 19:00
Move example to test directory. Change controller; add controller
test. Add use for HashRefInflator. Add more documentation.
0.03 Tues Jan 12 2009, 16:00
Pod fix, remove failing test from htmlarea
0.02 Tues Jan 12 2009, 03:00
Fixed pod formatting, naming of files
0.01 Mon Jan 12 2009, 17:00
Released on an unsuspecting world
Conversion of Form::Processor to Moose, including
renaming many attributes and methods and refactoring
LICENSE 100644 000770 000024 43652 13134157564 15522 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068 This software is copyright (c) 2017 by Gerda Shank.
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) 2017 by Gerda Shank.
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) 2017 by Gerda Shank.
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
INSTALL 100644 000770 000024 2230 13134157564 15511 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068 This is the Perl distribution HTML-FormHandler.
Installing HTML-FormHandler is straightforward.
## Installation with cpanm
If you have cpanm, you only need one line:
% cpanm HTML::FormHandler
If it does not have permission to install modules to the current perl, cpanm
will automatically set up and install to a local::lib in your home directory.
See the local::lib documentation (https://metacpan.org/pod/local::lib) for
details on enabling it in your environment.
## Installing with the CPAN shell
Alternatively, if your CPAN shell is set up, you should just be able to do:
% cpan HTML::FormHandler
## Manual installation
As a last resort, you can manually install it. Download the tarball, untar it,
then build it:
% perl Makefile.PL
% make && make test
Then install it:
% make install
If your perl is system-managed, you can create a local::lib in your home
directory to install modules to. For details, see the local::lib documentation:
https://metacpan.org/pod/local::lib
## Documentation
HTML-FormHandler documentation is available as POD.
You can run perldoc from a shell to read the documentation:
% perldoc HTML::FormHandler
dist.ini 100644 000770 000024 3535 13134157564 16135 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068 ; Everything starting with ';' is a comment
name = HTML-FormHandler
main_module = lib/HTML/FormHandler.pm
author = FormHandler Contributors - see HTML::FormHandler
license = Perl_5
copyright_holder = Gerda Shank
copyright_year = 2017
version = 0.40068
[@Git]
tag_format = %v
[@Basic]
[PkgVersion]
[InstallGuide]
[MetaJSON]
[MetaResources]
bugtracker.web = http://github.com/gshank/html-formhandler/issues
; If you have a repository...
repository.url = git://github.com/gshank/html-formhandler.git
repository.web = http://github.com/gshank/html-formhandler
repository.type = git
; You have to have Dist::Zilla::Plugin:: for these to work
[PodWeaver]
[Test::NoTabs]
[Test::EOL]
[Signature]
[CheckChangeLog]
[Prereqs]
Class::Load = 0.06
Carp = 0
; raised Moose prereq because 2.0604 fails
Moose = 2.1403
Locale::Maketext = 1.09
DateTime = 0
DateTime::Format::Strptime = 0
MooseX::Getopt = 0.16
MooseX::Types = 0.20
MooseX::Types::Common = 0
MooseX::Types::LoadableClass = 0.006
aliased = 0
File::Spec = 0
File::ShareDir = 0
Try::Tiny = 0
namespace::autoclean = 0.09
Email::Valid = 0
Sub::Exporter = 0
HTML::TreeBuilder = 3.23
Sub::Name = 0
Data::Clone = 0
JSON::MaybeXS = 1.003003
List::Util = 1.33
HTML::Entities = 0
Crypt::CBC = 0
Crypt::Blowfish = 0
MIME::Base64 = 0
[Prereqs / TestRequires]
Test::More = 0.94
Test::Differences = 0
Test::Exception = 0
Test::Memory::Cycle = 1.04
Test::Warn = 0
PadWalker = 0
xt 000755 000770 000024 0 13134157564 14756 5 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068 dfv.t 100644 000770 000024 1460 13134157564 16063 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/xt use strict;
use warnings;
use Test::More;
use HTML::FormHandler::I18N;
$ENV{LANGUAGE_HANDLE} = 'en_en';
{
package MyApp::Form::Test;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
use Data::FormValidator::Constraints ('match_state');
has_field 'my_state' => (
apply => [ { check => \&match_state, message => 'Invalid State' } ] );
has_field 'two';
has_field 'three';
}
my $form = MyApp::Form::Test->new;
ok( $form );
my $params = { my_state => 'XX', two => 1, three => 2 };
$form->process( params => $params );
ok( ! $form->validated, 'form did not validate' );
my @errors = $form->errors;
is( $errors[0], 'Invalid State', 'correct error message' );
$params->{my_state} = 'NY';
ok( $form->process( params => $params ), 'correct State validated' );
done_testing;
eol.t 100644 000770 000024 307 13134157564 16042 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/xt use strict;
use warnings;
use Test::More;
eval 'use Test::EOL';
plan skip_all => 'Test::EOL required' if $@;
all_perl_files_ok({ trailing_whitespace => 1, all_reasons => 1 }, ('lib', 't', 'xt') );
META.yml 100644 000770 000024 2521 13134157564 15734 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068 ---
abstract: 'HTML forms using Moose'
author:
- 'FormHandler Contributors - see HTML::FormHandler'
build_requires:
PadWalker: '0'
Test::Differences: '0'
Test::Exception: '0'
Test::Memory::Cycle: '1.04'
Test::More: '0.94'
Test::Warn: '0'
configure_requires:
ExtUtils::MakeMaker: '0'
File::ShareDir::Install: '0.06'
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150005'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: HTML-FormHandler
requires:
Carp: '0'
Class::Load: '0.06'
Crypt::Blowfish: '0'
Crypt::CBC: '0'
Data::Clone: '0'
DateTime: '0'
DateTime::Format::Strptime: '0'
Email::Valid: '0'
File::ShareDir: '0'
File::Spec: '0'
HTML::Entities: '0'
HTML::TreeBuilder: '3.23'
JSON::MaybeXS: '1.003003'
List::Util: '1.33'
Locale::Maketext: '1.09'
MIME::Base64: '0'
Moose: '2.1403'
MooseX::Getopt: '0.16'
MooseX::Types: '0.20'
MooseX::Types::Common: '0'
MooseX::Types::LoadableClass: '0.006'
Sub::Exporter: '0'
Sub::Name: '0'
Try::Tiny: '0'
aliased: '0'
namespace::autoclean: '0.09'
resources:
bugtracker: http://github.com/gshank/html-formhandler/issues
repository: git://github.com/gshank/html-formhandler.git
version: '0.40068'
x_serialization_backend: 'YAML::Tiny version 1.70'
MANIFEST 100644 000770 000024 26772 13134157564 15652 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.010.
Changes
INSTALL
LICENSE
MANIFEST
META.json
META.yml
Makefile.PL
README
README.md
SIGNATURE
TODO
dist.ini
lib/HTML/FormHandler.pm
lib/HTML/FormHandler/Base.pm
lib/HTML/FormHandler/Blocks.pm
lib/HTML/FormHandler/BuildFields.pm
lib/HTML/FormHandler/BuildPages.pm
lib/HTML/FormHandler/Field.pm
lib/HTML/FormHandler/Field/AddElement.pm
lib/HTML/FormHandler/Field/BoolSelect.pm
lib/HTML/FormHandler/Field/Boolean.pm
lib/HTML/FormHandler/Field/Button.pm
lib/HTML/FormHandler/Field/Captcha.pm
lib/HTML/FormHandler/Field/Checkbox.pm
lib/HTML/FormHandler/Field/Compound.pm
lib/HTML/FormHandler/Field/Date.pm
lib/HTML/FormHandler/Field/DateMDY.pm
lib/HTML/FormHandler/Field/DateTime.pm
lib/HTML/FormHandler/Field/Display.pm
lib/HTML/FormHandler/Field/Duration.pm
lib/HTML/FormHandler/Field/Email.pm
lib/HTML/FormHandler/Field/File.pm
lib/HTML/FormHandler/Field/Float.pm
lib/HTML/FormHandler/Field/Hidden.pm
lib/HTML/FormHandler/Field/Hour.pm
lib/HTML/FormHandler/Field/IntRange.pm
lib/HTML/FormHandler/Field/Integer.pm
lib/HTML/FormHandler/Field/Minute.pm
lib/HTML/FormHandler/Field/Money.pm
lib/HTML/FormHandler/Field/Month.pm
lib/HTML/FormHandler/Field/MonthDay.pm
lib/HTML/FormHandler/Field/MonthName.pm
lib/HTML/FormHandler/Field/Multiple.pm
lib/HTML/FormHandler/Field/Nested.pm
lib/HTML/FormHandler/Field/NoValue.pm
lib/HTML/FormHandler/Field/NonEditable.pm
lib/HTML/FormHandler/Field/Password.pm
lib/HTML/FormHandler/Field/PasswordConf.pm
lib/HTML/FormHandler/Field/PosInteger.pm
lib/HTML/FormHandler/Field/PrimaryKey.pm
lib/HTML/FormHandler/Field/Repeatable.pm
lib/HTML/FormHandler/Field/Repeatable/Instance.pm
lib/HTML/FormHandler/Field/RequestToken.pm
lib/HTML/FormHandler/Field/Reset.pm
lib/HTML/FormHandler/Field/Result.pm
lib/HTML/FormHandler/Field/RmElement.pm
lib/HTML/FormHandler/Field/Role/RequestToken.pm
lib/HTML/FormHandler/Field/Second.pm
lib/HTML/FormHandler/Field/Select.pm
lib/HTML/FormHandler/Field/SelectCSV.pm
lib/HTML/FormHandler/Field/Submit.pm
lib/HTML/FormHandler/Field/Text.pm
lib/HTML/FormHandler/Field/TextArea.pm
lib/HTML/FormHandler/Field/TextCSV.pm
lib/HTML/FormHandler/Field/Upload.pm
lib/HTML/FormHandler/Field/Weekday.pm
lib/HTML/FormHandler/Field/Year.pm
lib/HTML/FormHandler/Fields.pm
lib/HTML/FormHandler/Foo.pm
lib/HTML/FormHandler/I18N.pm
lib/HTML/FormHandler/I18N/ar_kw.pm
lib/HTML/FormHandler/I18N/bg_bg.pm
lib/HTML/FormHandler/I18N/ca_es.pm
lib/HTML/FormHandler/I18N/cs_cz.pm
lib/HTML/FormHandler/I18N/de_de.pm
lib/HTML/FormHandler/I18N/en_us.pm
lib/HTML/FormHandler/I18N/es_es.pm
lib/HTML/FormHandler/I18N/hu_hu.pm
lib/HTML/FormHandler/I18N/it_it.pm
lib/HTML/FormHandler/I18N/ja_jp.pm
lib/HTML/FormHandler/I18N/pt_br.pm
lib/HTML/FormHandler/I18N/ru_ru.pm
lib/HTML/FormHandler/I18N/sv_se.pm
lib/HTML/FormHandler/I18N/tr_tr.pm
lib/HTML/FormHandler/I18N/ua_ua.pm
lib/HTML/FormHandler/InitResult.pm
lib/HTML/FormHandler/Manual.pod
lib/HTML/FormHandler/Manual/Catalyst.pod
lib/HTML/FormHandler/Manual/Cookbook.pod
lib/HTML/FormHandler/Manual/Database.pod
lib/HTML/FormHandler/Manual/Defaults.pod
lib/HTML/FormHandler/Manual/Errors.pod
lib/HTML/FormHandler/Manual/Fields.pod
lib/HTML/FormHandler/Manual/FromDFV.pod
lib/HTML/FormHandler/Manual/FromFF.pod
lib/HTML/FormHandler/Manual/InflationDeflation.pod
lib/HTML/FormHandler/Manual/Intro.pod
lib/HTML/FormHandler/Manual/Reference.pod
lib/HTML/FormHandler/Manual/Rendering.pod
lib/HTML/FormHandler/Manual/RenderingCookbook.pod
lib/HTML/FormHandler/Manual/Templates.pod
lib/HTML/FormHandler/Manual/Testing.pod
lib/HTML/FormHandler/Manual/Tutorial.pod
lib/HTML/FormHandler/Manual/Validation.pod
lib/HTML/FormHandler/Merge.pm
lib/HTML/FormHandler/Meta/Role.pm
lib/HTML/FormHandler/Model.pm
lib/HTML/FormHandler/Model/CDBI.pm
lib/HTML/FormHandler/Model/Object.pm
lib/HTML/FormHandler/Moose.pm
lib/HTML/FormHandler/Moose/Role.pm
lib/HTML/FormHandler/Page.pm
lib/HTML/FormHandler/Page/Simple.pm
lib/HTML/FormHandler/Pages.pm
lib/HTML/FormHandler/Params.pm
lib/HTML/FormHandler/Render/RepeatableJs.pm
lib/HTML/FormHandler/Render/Simple.pm
lib/HTML/FormHandler/Render/Table.pm
lib/HTML/FormHandler/Render/Util.pm
lib/HTML/FormHandler/Render/WithTT.pm
lib/HTML/FormHandler/Result.pm
lib/HTML/FormHandler/Result/Role.pm
lib/HTML/FormHandler/Test.pm
lib/HTML/FormHandler/TraitFor/Captcha.pm
lib/HTML/FormHandler/TraitFor/I18N.pm
lib/HTML/FormHandler/TraitFor/Types.pm
lib/HTML/FormHandler/Traits.pm
lib/HTML/FormHandler/Types.pm
lib/HTML/FormHandler/Validate.pm
lib/HTML/FormHandler/Widget/ApplyRole.pm
lib/HTML/FormHandler/Widget/Block.pm
lib/HTML/FormHandler/Widget/Block/Bootstrap.pm
lib/HTML/FormHandler/Widget/Field/Button.pm
lib/HTML/FormHandler/Widget/Field/ButtonTag.pm
lib/HTML/FormHandler/Widget/Field/Captcha.pm
lib/HTML/FormHandler/Widget/Field/Checkbox.pm
lib/HTML/FormHandler/Widget/Field/CheckboxGroup.pm
lib/HTML/FormHandler/Widget/Field/Compound.pm
lib/HTML/FormHandler/Widget/Field/Hidden.pm
lib/HTML/FormHandler/Widget/Field/HorizCheckboxGroup.pm
lib/HTML/FormHandler/Widget/Field/NoRender.pm
lib/HTML/FormHandler/Widget/Field/Password.pm
lib/HTML/FormHandler/Widget/Field/RadioGroup.pm
lib/HTML/FormHandler/Widget/Field/Repeatable.pm
lib/HTML/FormHandler/Widget/Field/Reset.pm
lib/HTML/FormHandler/Widget/Field/Role/HTMLAttributes.pm
lib/HTML/FormHandler/Widget/Field/Role/SelectedOption.pm
lib/HTML/FormHandler/Widget/Field/Select.pm
lib/HTML/FormHandler/Widget/Field/Span.pm
lib/HTML/FormHandler/Widget/Field/Submit.pm
lib/HTML/FormHandler/Widget/Field/Text.pm
lib/HTML/FormHandler/Widget/Field/Textarea.pm
lib/HTML/FormHandler/Widget/Field/Upload.pm
lib/HTML/FormHandler/Widget/Form/Role/HTMLAttributes.pm
lib/HTML/FormHandler/Widget/Form/Simple.pm
lib/HTML/FormHandler/Widget/Form/Table.pm
lib/HTML/FormHandler/Widget/Theme/Bootstrap.pm
lib/HTML/FormHandler/Widget/Theme/Bootstrap3.pm
lib/HTML/FormHandler/Widget/Theme/BootstrapFormMessages.pm
lib/HTML/FormHandler/Widget/Wrapper/Base.pm
lib/HTML/FormHandler/Widget/Wrapper/Bootstrap.pm
lib/HTML/FormHandler/Widget/Wrapper/Bootstrap3.pm
lib/HTML/FormHandler/Widget/Wrapper/Fieldset.pm
lib/HTML/FormHandler/Widget/Wrapper/None.pm
lib/HTML/FormHandler/Widget/Wrapper/Simple.pm
lib/HTML/FormHandler/Widget/Wrapper/SimpleInline.pm
lib/HTML/FormHandler/Widget/Wrapper/Table.pm
lib/HTML/FormHandler/Widget/Wrapper/TableInline.pm
lib/HTML/FormHandler/Wizard.pm
share/templates/field/button.tt
share/templates/field/checkbox.tt
share/templates/field/checkbox_group.tt
share/templates/field/compound.tt
share/templates/field/hidden.tt
share/templates/field/password.tt
share/templates/field/radio_group.tt
share/templates/field/repeatable.tt
share/templates/field/reset.tt
share/templates/field/select.tt
share/templates/field/submit.tt
share/templates/field/text.tt
share/templates/field/textarea.tt
share/templates/field/upload.tt
share/templates/foo/checkbox_tag.tt
share/templates/foo/end_form.tt
share/templates/foo/field.tt
share/templates/foo/form.tt
share/templates/foo/input.tt
share/templates/foo/input_tag.tt
share/templates/foo/label.tt
share/templates/foo/start_form.tt
share/templates/form/form.tt
share/templates/form/form22.tt
share/templates/form/form_end.tt
share/templates/form/form_in_one.tt
share/templates/form/form_start.tt
share/templates/wrapper/fieldset.tt
share/templates/wrapper/label.tt
share/templates/wrapper/none.tt
share/templates/wrapper/simple.tt
share/templates/wrapper/wrap_label.tt
t/01app.t
t/author-eol.t
t/author-no-tabs.t
t/basic.t
t/blocks/basic.t
t/blocks/block_list.t
t/blocks/blocktags.t
t/blocks/build_render_list_method.t
t/blocks/loading.t
t/blocks/nested.t
t/blocks/render_units.t
t/bootstrap/basic.t
t/bootstrap/control_states.t
t/bootstrap/controls.t
t/bootstrap/ext_controls.t
t/bootstrap/inline.t
t/bootstrap/other.t
t/bootstrap/search.t
t/bootstrap3/basic.t
t/bootstrap3/controls.t
t/bootstrap3/horiz.t
t/bootstrap3/horiz_checkboxgroup.t
t/bootstrap3/inlinecheckboxes.t
t/bootstrap3/layout_classes.t
t/compound/basic.t
t/compound/default.t
t/compound/empty.t
t/compound/include.t
t/compound/select.t
t/errors/basic.t
t/errors/compound.t
t/errors/form_messages.t
t/errors/messages.t
t/errors/req_message.t
t/field_setup/checkbox.t
t/field_setup/compound_update_fields.t
t/field_setup/defaults.t
t/field_setup/disabled.t
t/field_setup/id.t
t/field_setup/inactive.t
t/field_setup/init_object.t
t/field_setup/input_param.t
t/field_setup/missing.t
t/field_setup/plus_field.t
t/field_setup/update_fields.t
t/field_setup/update_subfields.t
t/fields/dates.t
t/fields/display.t
t/fields/fields.t
t/fields/float.t
t/fields/formhandlerx.t
t/fields/novalue.t
t/fields/password.t
t/fields/repeatable.t
t/fields/request_token.t
t/fields/select.t
t/fields/select2.t
t/fields/selectcsv.t
t/fields/textcsv.t
t/form_setup/api.t
t/form_setup/clone.t
t/form_setup/compound_field_list.t
t/form_setup/config.t
t/form_setup/dynamic.t
t/form_setup/include.t
t/form_setup/init_obj.t
t/form_setup/no_update.t
t/form_setup/posted.t
t/form_setup/render_roles.t
t/infl_defl/comp_field.t
t/infl_defl/default.t
t/infl_defl/defl_lives.t
t/infl_defl/infl_defl.t
t/infl_defl/infl_transform.t
t/infl_defl/undef_deflation.t
t/infl_defl/variations.t
t/lib/BookDB/Form/Upload.pm
t/lib/Field/Address.pm
t/lib/Field/AltText.pm
t/lib/Field/MyField.pm
t/lib/Form/Address.pm
t/lib/Form/AddressRole.pm
t/lib/Form/Multiple.pm
t/lib/Form/MultipleRole.pm
t/lib/Form/NoExtForm.pm
t/lib/Form/Person.pm
t/lib/Form/PersonRole.pm
t/lib/Form/Test.pm
t/lib/Form/Two.pm
t/lib/MyApp/Component/Section.pm
t/lib/MyApp/I18N/abc_de.pm
t/lib/Widget/Block/Test.pm
t/lib/Widget/Field/Omega.pm
t/lib/Widget/Field/TestWidget.pm
t/memory_cycles.t
t/moose/build_id.t
t/moose/composed.t
t/moose/field_traits.t
t/moose/no_extend.t
t/moose/subclass_roles.t
t/render/actions.t
t/render/array.t
t/render/basic.t
t/render/checkbox.t
t/render/checkbox_group.t
t/render/classes.t
t/render/compound.t
t/render/compound2.t
t/render/display.t
t/render/errors.t
t/render/escaping.t
t/render/ff.t
t/render/filter.t
t/render/form_errors.t
t/render/get_tag.t
t/render/html5_attributes.t
t/render/html_attr.t
t/render/html_attributes.t
t/render/inline.t
t/render/label.t
t/render/noneditable.t
t/render/optgroup.t
t/render/radio_group.t
t/render/rep_fieldset.t
t/render/rep_wrapper.t
t/render/repeatable.t
t/render/result.t
t/render/select.t
t/render/simple.t
t/render/submit.t
t/render/table.t
t/render/tags.t
t/render/tt_render_elementx.t
t/render/util.t
t/render/widget_loading.t
t/render/widget_tags.t
t/render/widgets.t
t/render/with_class.t
t/render/withtt.t
t/repeatable/defaults.t
t/repeatable/empty.t
t/repeatable/has_many.t
t/repeatable/hash.t
t/repeatable/js.t
t/repeatable/list.t
t/repeatable/nested.t
t/repeatable/nested2.t
t/repeatable/num_extra.t
t/repeatable/reload.t
t/repeatable/set_methods.t
t/repeatable/subfield.t
t/result/basic.t
t/result/blocks.t
t/result/compound.t
t/result/errors.t
t/result/repeatable.t
t/structured.t
t/template.t
t/validation/apply.t
t/validation/constraints.t
t/validation/dependency.t
t/validation/filters.t
t/validation/reqwhen.t
t/validation/type_tiny.t
t/validation/types.t
t/validation/validate_coderef.t
t/validation/when.t
t/var/form1.pl
t/var/form1.yml
t/wizard/basic.t
util/check_I18N.pl
util/get_messages.pl
util/messages
xt/02pod.t
xt/add_field.t
xt/captcha.t
xt/captcha2.t
xt/chbox_group.t
xt/check_selected_option.t
xt/custom_fields.t
xt/cycles.t
xt/dfv.t
xt/display.t
xt/email.t
xt/eol.t
xt/field_list.t
xt/form_errors.t
xt/init.t
xt/lib/MyCatalystApp.pm
xt/lib/MyCatalystApp/Controller/Captcha.pm
xt/lib/MyCatalystApp/Controller/Root.pm
xt/load_field.t
xt/locale.t
xt/locale_data_localize.t
xt/mb_form.t
xt/model_cdbi.t
xt/multiple_forms.t
xt/order.t
xt/params.t
xt/posted.t
xt/repeatable_clone.t
xt/submit.t
xt/upload.t
README.md 100644 000770 000024 3276 13134157564 15752 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068 # HTML::FormHandler - HTML forms using Moose
See the manual at [HTML::FormHandler::Manual]( https://metacpan.org/pod/HTML::FormHandler::Manual).
HTML::FormHandler maintains a clean separation between form construction and form rendering. It allows you to define your forms and fields in a number of flexible ways. Although it provides renderers for HTML, you can define custom renderers for any kind of presentation.
HTML::FormHandler allows you to define form fields and validators. It can be used for both database and non-database forms, and will automatically update or create rows in a database. It can be used to process structured data that doesn't come from an HTML form.
One of its goals is to keep the controller/application program interface as simple as possible, and to minimize the duplication of code. In most cases, interfacing your controller to your form is only a few lines of code.
The typical application for FormHandler would be in a Catalyst, DBIx::Class, Template Toolkit web application, but use is not limited to that. FormHandler can be used in any Perl application.
# QUICK START GUIDE:
This git repository can build a HTML::FormHandler distribution using [dzil]( https://metacpan.org/pod/distribution/Dist-Zilla/bin/dzil) command
from the [Dist::Zilla]( https://metacpan.org/pod/Dist::Zilla) distribution that you could install using cpan.
Once you have [Dist::Zilla]( https://metacpan.org/pod/Dist::Zilla) installed this distribution can be build or installed using [dzil]( https://metacpan.org/pod/distribution/Dist-Zilla/bin/dzil):
dzil build # Generates a build directory and the targz of the HTML::FormHandler distribution
dzil install # Installs the distribution.
t 000755 000770 000024 0 13134157564 14566 5 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068 01app.t 100644 000770 000024 510 13134157564 16010 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/t use Test::More;
use_ok( 'HTML::FormHandler::Model' );
use_ok( 'HTML::FormHandler' );
use_ok( 'HTML::FormHandler::Field' );
use_ok( 'HTML::FormHandler::Field::Select' );
use_ok( 'HTML::FormHandler::Field::Compound' );
use_ok( 'HTML::FormHandler::Field::Repeatable' );
use_ok( 'HTML::FormHandler::Model::CDBI' );
done_testing;
basic.t 100644 000770 000024 14217 13134157564 16221 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/t use strict;
use warnings;
use Test::More;
use HTML::FormHandler::I18N;
$ENV{LANGUAGE_HANDLE} = 'en_en';
use_ok('HTML::FormHandler');
{
package My::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has '+name' => ( default => 'testform_' );
has '+no_preload' => ( default => 1 );
has_field 'optname' => ( temp => 'First' );
has_field 'reqname' => ( required => 1 );
has_field 'somename';
has_field 'my_selected' => ( type => 'Checkbox' );
has_field 'must_select' => ( type => 'Checkbox', required => 1 );
sub field_list
{
return [
fruit => 'Select',
optname => { temp => 'Second' }
];
}
sub options_fruit
{
return (
1 => 'apples',
2 => 'oranges',
3 => 'kiwi',
);
}
}
my $form = My::Form->new;
is( $form->field('optname')->temp, 'Second', 'got second optname field' );
ok( !$form->process, 'Empty data' );
is_deeply( $form->value, {}, 'no values returns hashref');
my $good = {
reqname => 'hello',
optname => 'not req',
fruit => 2,
must_select => 1,
};
ok( $form->process($good), 'Good data' );
is( $form->field('somename')->value, undef, 'no value for somename' );
ok( !$form->field('somename')->has_value, 'predicate no value' );
$good->{somename} = 'testing';
$form->process($good);
is( $form->field('somename')->value, 'testing', 'use input for extra data' );
is( $form->field('my_selected')->value, 0, 'correct value for unselected checkbox' );
ok( !$form->process( {} ), 'form doesn\'t validate with empty params' );
is( $form->num_errors, 0, 'form doesn\'t have errors with empty params' );
my $bad_1 = {
reqname => '',
optname => 'not req',
fruit => 4,
};
ok( !$form->process($bad_1), 'bad 1' );
ok( $form->field('fruit')->has_errors, 'fruit has error' );
ok( $form->field('reqname')->has_errors, 'reqname has error' );
ok( $form->field('must_select')->has_errors, 'must_select has error' );
ok( !$form->field('optname')->has_errors, 'optname has no error' );
is( $form->field('fruit')->id, "fruit", 'field has id' );
is( $form->field('fruit')->label, 'Fruit', 'field label' );
ok( !$form->process( {} ), 'no leftover params' );
is( $form->num_errors, 0, 'no leftover errors' );
ok( !$form->field('reqname')->has_errors, 'no leftover error in field' );
ok( !$form->field('optname')->fif, 'no lefover fif values' );
my $init_object = {
reqname => 'Starting Perl',
optname => 'Over Again'
};
# if you're going to load something on new and expect it to work without
# process, you need to have no_preload turned off
$form = My::Form->new( init_object => $init_object, no_preload => 0 );
is( $form->field('optname')->value, 'Over Again', 'value with init_obj' );
# non-posted params
$form->process( params => {} );
ok( !$form->validated, 'form validated' );
# it's not crystal clear what the behavior should be here, but I think
# this is more correct than the previous behavior
# it fills in the missing fields, which is what always happened for an
# initial object (as opposed to hash), but it used to behave
# differently for a hash, which seems wrong
# TODO verify behavior is correct
my $init_obj_plus_defaults = {
'fruit' => undef,
'must_select' => undef,
'my_selected' => undef,
'optname' => 'Over Again',
'reqname' => 'Starting Perl',
'somename' => undef,
};
is_deeply( $form->value, $init_obj_plus_defaults, 'value with empty params' );
$init_object->{my_selected} = 0; # checkboxes must be forced to 0
$init_object->{must_select} = 0;
my %fif = %$init_object;
$fif{somename} = '';
$fif{fruit} = '';
$fif{must_select} = '';
$fif{my_selected} = '';
is_deeply( $form->fif, \%fif, 'get right fif with init_object' );
# make sure that checkbox is 0 in values
$init_object->{must_select} = 1;
$fif{must_select} = 1;
ok( $form->process($init_object), 'form validates with params' );
#my %init_obj_value = (%$init_object, fruit => undef );
#is_deeply( $form->value, \%init_obj_value, 'value init obj' );
$init_object->{fruit} = undef;
is_deeply( $form->value, $init_object, 'value init obj' );
$fif{must_select} = 1;
$fif{my_selected} = 0;
is_deeply( $form->fif, \%fif, 'get right fif with init_object' );
$form->clear;
ok( !$form->has_value, 'Form value cleared' );
ok( !$form->has_input, 'Form input cleared' );
# check that form is cleared if fif is done before process
$form->fif;
$form->process($init_object);
is_deeply( $form->fif, \%fif, 'get right fif when process preceded by fif');
$form = HTML::FormHandler->new( field_list => [ foo => { type => 'Text', required => 1 } ] );
if ( !$form->process( params => { bar => 1, } ) )
{
# On some versions, the above process() returned false, but
# error_fields did not return anything.
my @fields = $form->error_fields;
if ( is( scalar @fields, 1, "there is an error field" ) )
{
my @errors = $fields[0]->all_errors;
is( scalar @errors, 1, "there is an error" );
is( $errors[0], $fields[0]->label . " field is required", "error messages match" );
}
else
{
fail("there is an error");
fail("error messages match");
}
}
# 'image' input produces { foo => bar, 'foo.x' => 42, 'foo.y' => 23 }
$form = HTML::FormHandler->new( name => 'baz', html_prefix => 1, field_list => [ 'foo' ] );
eval{ $form->process( params => { 'baz.foo' => 'bar', 'baz.foo.x' => 42, 'baz.foo.y' => 23 } ) };
ok( !$@, 'image field processed' ) or diag $@;
is_deeply( $form->field( 'foo' )->value, { '' => 'bar', x => 42, y => 23 }, 'image field' );
{
package Test::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has_field 'foo';
has_field 'bar';
sub validate {
my $self = shift;
if( $self->field('foo')->value eq 'cow' ) {
$self->field('foo')->value('bovine');
}
}
}
$form = Test::Form->new;
$form->process( { foo => 'cow', bar => 'horse' } );
is_deeply( $form->value, { foo => 'bovine', bar => 'horse' }, 'correct value' );
# check for hashref constructor
$form = HTML::FormHandler->new( { name => 'test_form', field_list => { one => 'Text', two => 'Text' } } );
ok( $form, 'form constructed ok' );
done_testing;
init.t 100644 000770 000024 3331 13134157564 16246 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/xt use strict;
use warnings;
use Test::More;
{
package My::Default;
use Moose::Role;
sub build_default_over_obj {
return 'From Method';
}
}
{
package My::Other::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has '+name' => ( default => 'testform_' );
has_field 'optname' => ( temp => 'First' );
has_field 'reqname' => ( required => 1, default_over_obj => 'From Attribute' );
has_field 'altname' => ( traits => ['My::Default'] );
has_field 'somename';
has_field 'extraname' => ( default_over_obj => '' );
sub default_somename {
my $self = shift;
return 'SN from meth';
}
}
my $init_object = { reqname => 'Starting Perl', optname => 'Over Again', altname => 'test',
extraname => 'not_empty',
};
my $form = My::Other::Form->new;
ok( $form, 'get form' );
my $params = { reqname => 'Sweet', optname => 'Charity', somename => 'Exists' };
$form->process( init_object => $init_object, params => $params );
ok( $form->validated, 'form with init_obj & params validated' );
is( $form->field('reqname')->init_value, 'From Attribute', 'correct init_value');
is( $form->field('optname')->init_value, 'Over Again', 'correct init_value no meth');
is( $form->field('altname')->init_value, 'From Method', 'correct init_value from trait');
is( $form->field('somename')->init_value, 'SN from meth', 'correct for init_obj undef');
is( $form->field('somename')->value, 'Exists', 'correct value for init_obj undef');
is( $form->field('extraname')->init_value, '', 'correct value for empty string default');
$form = My::Other::Form->new( init_object => $init_object );
is( $form->field('somename')->init_value, 'SN from meth', 'correct init_value new w init_obj');
done_testing;
META.json 100644 000770 000024 4661 13134157564 16113 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068 {
"abstract" : "HTML forms using Moose",
"author" : [
"FormHandler Contributors - see HTML::FormHandler"
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150005",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : 2
},
"name" : "HTML-FormHandler",
"prereqs" : {
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0",
"File::ShareDir::Install" : "0.06"
}
},
"develop" : {
"requires" : {
"Test::EOL" : "0",
"Test::More" : "0.88",
"Test::NoTabs" : "0"
}
},
"runtime" : {
"requires" : {
"Carp" : "0",
"Class::Load" : "0.06",
"Crypt::Blowfish" : "0",
"Crypt::CBC" : "0",
"Data::Clone" : "0",
"DateTime" : "0",
"DateTime::Format::Strptime" : "0",
"Email::Valid" : "0",
"File::ShareDir" : "0",
"File::Spec" : "0",
"HTML::Entities" : "0",
"HTML::TreeBuilder" : "3.23",
"JSON::MaybeXS" : "1.003003",
"List::Util" : "1.33",
"Locale::Maketext" : "1.09",
"MIME::Base64" : "0",
"Moose" : "2.1403",
"MooseX::Getopt" : "0.16",
"MooseX::Types" : "0.20",
"MooseX::Types::Common" : "0",
"MooseX::Types::LoadableClass" : "0.006",
"Sub::Exporter" : "0",
"Sub::Name" : "0",
"Try::Tiny" : "0",
"aliased" : "0",
"namespace::autoclean" : "0.09"
}
},
"test" : {
"requires" : {
"PadWalker" : "0",
"Test::Differences" : "0",
"Test::Exception" : "0",
"Test::Memory::Cycle" : "1.04",
"Test::More" : "0.94",
"Test::Warn" : "0"
}
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "http://github.com/gshank/html-formhandler/issues"
},
"repository" : {
"type" : "git",
"url" : "git://github.com/gshank/html-formhandler.git",
"web" : "http://github.com/gshank/html-formhandler"
}
},
"version" : "0.40068",
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0231"
}
SIGNATURE 100644 000770 000024 74414 13134157564 16001 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068 This file contains message digests of all files listed in MANIFEST,
signed via the Module::Signature module, version 0.81.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
% cpansign -v
It will check each file's integrity, as well as the signature's
validity. If "==> Signature verified OK! <==" is not displayed,
the distribution may already have been compromised, and you should
not run its Makefile.PL or Build.PL.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
SHA1 4335ae3fb627fb0f19036b9c71d1f680c7f8e04b Changes
SHA1 e77249ae8f918144def0b5cfc9c1e20eb43c24e6 INSTALL
SHA1 8820223d4c37e54dc39a48323a37a84104e6005f LICENSE
SHA1 323a4f9496ae1d125bbc0061fabde6c11a7169da MANIFEST
SHA1 af03a9d0928809c5b8862d4e6d40bc9602ffab0a META.json
SHA1 7b00877ccf093d2d9ec0fc27b9b5514947767348 META.yml
SHA1 1402cd01c7b8636a3b658a6ed33f85b71406eef1 Makefile.PL
SHA1 44ad616020e5020c60dd6a1be5c8d876323f2734 README
SHA1 8a40d9fbb82d10a39336670b2a3981de090705ff README.md
SHA1 d764cc72a4d6465a03e8d04bdbf58096068c619d TODO
SHA1 c7a58ecc6a3f1cddd41ffcc6d6fe9db2e8865e8d dist.ini
SHA1 ca7f444ce8b36231aedf9ce974909d4fd171adba lib/HTML/FormHandler.pm
SHA1 05060a5988b74b80ee10dc800fa3a4a0b4c84bc2 lib/HTML/FormHandler/Base.pm
SHA1 c0004a83674c3c49941a230b8371e567b6c82719 lib/HTML/FormHandler/Blocks.pm
SHA1 e907e93596b02b413adf23164004854431dca5c5 lib/HTML/FormHandler/BuildFields.pm
SHA1 d87548a20cb29016f542f8008920e87a44cbbd3d lib/HTML/FormHandler/BuildPages.pm
SHA1 4adfb2f2a6320b66c75675d3941cf14fd3f3e506 lib/HTML/FormHandler/Field.pm
SHA1 66ccc512c692d2b03e5be3431998c9bcc1872dc0 lib/HTML/FormHandler/Field/AddElement.pm
SHA1 5d17fde0a1d3adb0b971efd246b868e49efc881c lib/HTML/FormHandler/Field/BoolSelect.pm
SHA1 a2f09d0f22e5c23817e005f95160d0a6d9a16c22 lib/HTML/FormHandler/Field/Boolean.pm
SHA1 2ef3bf05a2f59ef80b0dd3549130469b27491ca8 lib/HTML/FormHandler/Field/Button.pm
SHA1 3732577709e23f62556f287a42b2565fa8509fe4 lib/HTML/FormHandler/Field/Captcha.pm
SHA1 120d1fe984d9f2a79614f7e9ea03ee01a5d365da lib/HTML/FormHandler/Field/Checkbox.pm
SHA1 8f5d5f3cec305b5714afa448b1ac8c24106a23bf lib/HTML/FormHandler/Field/Compound.pm
SHA1 8d94c0d3d1966951bef1a9a6863b3c6853fc64cb lib/HTML/FormHandler/Field/Date.pm
SHA1 ddbbbe00514c411e9dd80ecda802caeafedf447c lib/HTML/FormHandler/Field/DateMDY.pm
SHA1 192a37f4164cfc0845755dc7916a024cebd4aa7a lib/HTML/FormHandler/Field/DateTime.pm
SHA1 3b2c1308e3f65b8435f5abc78e3949c9c804eac2 lib/HTML/FormHandler/Field/Display.pm
SHA1 6d82ffc88ea75407e47485f060cd264a8d30ef1a lib/HTML/FormHandler/Field/Duration.pm
SHA1 e83af895db3fe0db0e87244aa81a85aac60e7378 lib/HTML/FormHandler/Field/Email.pm
SHA1 2e7d0ce718b417478b1c2f9e747ade9939f053a0 lib/HTML/FormHandler/Field/File.pm
SHA1 80547551e44268409436638f93926108bc7aed7b lib/HTML/FormHandler/Field/Float.pm
SHA1 cc5061cec03ceec184f4d300154f64291c93e98b lib/HTML/FormHandler/Field/Hidden.pm
SHA1 0537abfb337c2b23fd63150abde4dac906116cbb lib/HTML/FormHandler/Field/Hour.pm
SHA1 9a2336086a65dedf9ec5edf7a89d097847469bb3 lib/HTML/FormHandler/Field/IntRange.pm
SHA1 770beeef73f838bf542e7538182180d9b7afc761 lib/HTML/FormHandler/Field/Integer.pm
SHA1 6944ab66faa155ce2536b94e014c3d2ac35884b0 lib/HTML/FormHandler/Field/Minute.pm
SHA1 0f262e9c2f77a1d8026c6ed9b47a93e99fd4e7aa lib/HTML/FormHandler/Field/Money.pm
SHA1 1e0d5fdc3010a44fa78303c2a438cc49d4230b80 lib/HTML/FormHandler/Field/Month.pm
SHA1 63dc1303605a06205ba6827fbd3a0cfaad9a9e69 lib/HTML/FormHandler/Field/MonthDay.pm
SHA1 72b761dfd7f77d075e751f0122a78ed3bd4aa6ec lib/HTML/FormHandler/Field/MonthName.pm
SHA1 e208341aa6383a8fd2ca516ebf82485ef732aca1 lib/HTML/FormHandler/Field/Multiple.pm
SHA1 0797105bb4155395cf0827d256f0827aec63ba5a lib/HTML/FormHandler/Field/Nested.pm
SHA1 7a6c20b878845a0fcf935799529ffc2b7967c028 lib/HTML/FormHandler/Field/NoValue.pm
SHA1 eee112cae6498ff3b59f06ee1e0dd4c31369f638 lib/HTML/FormHandler/Field/NonEditable.pm
SHA1 b45f48d9813044c30848c5d5449f5a9e4ad1a5ed lib/HTML/FormHandler/Field/Password.pm
SHA1 4802820f5cfad0ca09e62a0e0f3fcbadd288ab72 lib/HTML/FormHandler/Field/PasswordConf.pm
SHA1 bebaec98bf8b078d84aab11c40649656b377f49b lib/HTML/FormHandler/Field/PosInteger.pm
SHA1 431dfdf016b67d7e2103522c39de4bd7fbd417c6 lib/HTML/FormHandler/Field/PrimaryKey.pm
SHA1 2730727ed990d3b488b4b8d3296c154a53c04dc9 lib/HTML/FormHandler/Field/Repeatable.pm
SHA1 2fece549d61957fe1d0817a247453b89de92d906 lib/HTML/FormHandler/Field/Repeatable/Instance.pm
SHA1 185ed5e32d8d8cc4b2ce52cfa3714b14614cfd3e lib/HTML/FormHandler/Field/RequestToken.pm
SHA1 b9e28efacbba533d4f714142ed76dd3dab9c5ec6 lib/HTML/FormHandler/Field/Reset.pm
SHA1 0af7b810a270d4f2dd547fdc62fa2452d6889432 lib/HTML/FormHandler/Field/Result.pm
SHA1 d7b9db729978d6d1857ca293171e55fa2d6278a4 lib/HTML/FormHandler/Field/RmElement.pm
SHA1 926910b1b28478854b005648e57c876382466542 lib/HTML/FormHandler/Field/Role/RequestToken.pm
SHA1 48243474846f7ebdd3a0cbe44e4bf5097f25e9d1 lib/HTML/FormHandler/Field/Second.pm
SHA1 7293111f5cdf5712f17e5ec9a6dd0dfc93562a67 lib/HTML/FormHandler/Field/Select.pm
SHA1 dd7ca9bfd055b9a55f7f156753632eaa2f48925a lib/HTML/FormHandler/Field/SelectCSV.pm
SHA1 82da8d7957e58f3266c2a3a79bf12f6dd2819aaf lib/HTML/FormHandler/Field/Submit.pm
SHA1 44dbb8075bd2a7d5197fe1c0d5fadb4274f62970 lib/HTML/FormHandler/Field/Text.pm
SHA1 4bdd0a5677df135c054d9884438e09cbf725ea58 lib/HTML/FormHandler/Field/TextArea.pm
SHA1 91bdb415033fd4afe073c00c335fe3b84d1902ee lib/HTML/FormHandler/Field/TextCSV.pm
SHA1 d07cd7f6e8f47848428c9d32e9bc9b76507e9496 lib/HTML/FormHandler/Field/Upload.pm
SHA1 a322a789d135e1be9355d04f39f620c12a010a35 lib/HTML/FormHandler/Field/Weekday.pm
SHA1 2c434eb1972c09eed363a0f3758199dc810035eb lib/HTML/FormHandler/Field/Year.pm
SHA1 a84f655837500f73c048d79ee6d82d18713dca53 lib/HTML/FormHandler/Fields.pm
SHA1 baefcfc5b6338cdb75ac12436c4f77075cbda56a lib/HTML/FormHandler/Foo.pm
SHA1 42b99791545777b5e5037f7dd5964d0e4b89086f lib/HTML/FormHandler/I18N.pm
SHA1 2a5c091f82bc986edc8fcbf43ce5e0a5ee115332 lib/HTML/FormHandler/I18N/ar_kw.pm
SHA1 01e0515e84f1f39d01ba3081184f37f9cbb2713f lib/HTML/FormHandler/I18N/bg_bg.pm
SHA1 a964ddd67377e07b019db6509e467f36344c2595 lib/HTML/FormHandler/I18N/ca_es.pm
SHA1 4981d14c5d84a1d476b5c6fc6c9c9d9db9d61601 lib/HTML/FormHandler/I18N/cs_cz.pm
SHA1 c73728e82e66f3014ee27a15128e7b0a8df9d482 lib/HTML/FormHandler/I18N/de_de.pm
SHA1 01e1fd719a4362c68aa49e7ec55bec5cc8279a2e lib/HTML/FormHandler/I18N/en_us.pm
SHA1 8dc277a0d7efccc500960eabe20691fa2240b2a4 lib/HTML/FormHandler/I18N/es_es.pm
SHA1 f51a8762479d53f9706c177a3767bdc0da270d93 lib/HTML/FormHandler/I18N/hu_hu.pm
SHA1 c477404c8c0297e7c352ff8912f26c11e17090fe lib/HTML/FormHandler/I18N/it_it.pm
SHA1 cc2ec77abe392a0119cce47e6b3c9b43081f41e5 lib/HTML/FormHandler/I18N/ja_jp.pm
SHA1 e87e6c1fdd76f7ff92e06c851be6b1e6dd2b9bf6 lib/HTML/FormHandler/I18N/pt_br.pm
SHA1 86b092c23c89c1866ba21276abf61e2077453588 lib/HTML/FormHandler/I18N/ru_ru.pm
SHA1 d61221870f5ce2d27a5c045781c5b93816bd4b46 lib/HTML/FormHandler/I18N/sv_se.pm
SHA1 9597be31f3329b72cc75402b6295c22753c4ab1a lib/HTML/FormHandler/I18N/tr_tr.pm
SHA1 e5c08c0c816394efb5d51851b54b5e20d317eb87 lib/HTML/FormHandler/I18N/ua_ua.pm
SHA1 ee9e6011a118e506c86e84b1f2c420e26fa9855b lib/HTML/FormHandler/InitResult.pm
SHA1 5e377d7ee2373c96904dff76f8944d2295ddf861 lib/HTML/FormHandler/Manual.pod
SHA1 690219579485e975b3776f072a697d4bb27880a7 lib/HTML/FormHandler/Manual/Catalyst.pod
SHA1 e39d7cf19d6d5abffca3206a60cf667e78a7c997 lib/HTML/FormHandler/Manual/Cookbook.pod
SHA1 485db98310fc7626cb154ac4677d47821c5181f6 lib/HTML/FormHandler/Manual/Database.pod
SHA1 3fd59698c8fb9cdbc6587ff54eec3520ec03c127 lib/HTML/FormHandler/Manual/Defaults.pod
SHA1 9ab42d26bfac55fb85e5fa406dd6da811a930032 lib/HTML/FormHandler/Manual/Errors.pod
SHA1 d77088a696807d4a38bf3badc3e77740d0dbca73 lib/HTML/FormHandler/Manual/Fields.pod
SHA1 f362b5498db915137772c22cc1d59bb82d037f14 lib/HTML/FormHandler/Manual/FromDFV.pod
SHA1 d9ad65bfac550eefbbbdbc4d5cea2ee97bd314c9 lib/HTML/FormHandler/Manual/FromFF.pod
SHA1 ed2ece7fed3dd59801ea12c17be842ad5beeabc4 lib/HTML/FormHandler/Manual/InflationDeflation.pod
SHA1 3eb129163102b8eb03e118ec8ce86f04a4ce895c lib/HTML/FormHandler/Manual/Intro.pod
SHA1 db2cf9b15a3fb74189383fe890a3d51c6ee280fd lib/HTML/FormHandler/Manual/Reference.pod
SHA1 3a79b9992815042601f2089b8f259c8d3c1ee1b5 lib/HTML/FormHandler/Manual/Rendering.pod
SHA1 2dcc33b482946274e203b933542831264468190e lib/HTML/FormHandler/Manual/RenderingCookbook.pod
SHA1 bdf7d5dd5f8638d62cec2918521399bb871449c3 lib/HTML/FormHandler/Manual/Templates.pod
SHA1 c871f0158b7a190f66edf6a960cb0a9b7771c00a lib/HTML/FormHandler/Manual/Testing.pod
SHA1 d2269f5b3a9186e530a4ae5264d1470686fd8181 lib/HTML/FormHandler/Manual/Tutorial.pod
SHA1 21e10f0a8f0185bb942d64fa6c0cc7f697b7ff74 lib/HTML/FormHandler/Manual/Validation.pod
SHA1 e3be406217d0fea30a2ca4efc8e0a9370e1ede80 lib/HTML/FormHandler/Merge.pm
SHA1 ea298ee3ef0e92a2e73a5d71da40c9933f533779 lib/HTML/FormHandler/Meta/Role.pm
SHA1 2eb1c39b3124fa926710513fed984479f7ffb48e lib/HTML/FormHandler/Model.pm
SHA1 09e03bb06c886368500f58da00cdc9368f336328 lib/HTML/FormHandler/Model/CDBI.pm
SHA1 346410418b3692a6b92262140352264052c2226c lib/HTML/FormHandler/Model/Object.pm
SHA1 89fddc0e4401948f08470565b7989ecf274e02fc lib/HTML/FormHandler/Moose.pm
SHA1 0fe2edb0ed9188441a7415570e81d9310867625e lib/HTML/FormHandler/Moose/Role.pm
SHA1 35aaa570a01042d433d29626e1ce36390e7e1149 lib/HTML/FormHandler/Page.pm
SHA1 ae5f277288949276437b27d86737d6c26f67ee93 lib/HTML/FormHandler/Page/Simple.pm
SHA1 1508464ca917d0642cbf86eaf1045dfff96427a9 lib/HTML/FormHandler/Pages.pm
SHA1 7c0113b8cea45f0172cbbc81b1d574abf9ad9d61 lib/HTML/FormHandler/Params.pm
SHA1 83b308ac0ff4c25e404bd26eb3e2280f7d0cafe1 lib/HTML/FormHandler/Render/RepeatableJs.pm
SHA1 c91b0ffaa9b79bb146ad2b98feb640ea6666b34b lib/HTML/FormHandler/Render/Simple.pm
SHA1 fc2068442e091d0b64695e827dc0df43112761ea lib/HTML/FormHandler/Render/Table.pm
SHA1 ec590e496b5133e76023c69b01333ab463822944 lib/HTML/FormHandler/Render/Util.pm
SHA1 440fd140667cf299568590c6068796b2d3ead209 lib/HTML/FormHandler/Render/WithTT.pm
SHA1 6deee5601a29691bb621c88cea289cd1484f5d2a lib/HTML/FormHandler/Result.pm
SHA1 d6a80f17d18193bb301b5383a8b486da764124a6 lib/HTML/FormHandler/Result/Role.pm
SHA1 ebe8d25c774bd5cf9884e894d517df1801b6282e lib/HTML/FormHandler/Test.pm
SHA1 917524ead0a26671737104b4da5253a9e1c5d49b lib/HTML/FormHandler/TraitFor/Captcha.pm
SHA1 abe98e6510597afbfa33d496535f06be6ec7ab76 lib/HTML/FormHandler/TraitFor/I18N.pm
SHA1 7ddb7595c4374c6018e4a607b2ab447d6c976a46 lib/HTML/FormHandler/TraitFor/Types.pm
SHA1 497d1974f0bd9c7cb2e91498b515d08a7442f32a lib/HTML/FormHandler/Traits.pm
SHA1 46f4c32b20fe4ccff98f275661c5db46cef12ea6 lib/HTML/FormHandler/Types.pm
SHA1 f4fe36b1baa87288220fd66dafe6fdb63429bc7f lib/HTML/FormHandler/Validate.pm
SHA1 4ace65b2ffb2c391c965d136290915b1d2cfbe1e lib/HTML/FormHandler/Widget/ApplyRole.pm
SHA1 f18d83aba5861d39d83e5b0d7c8fbeda2114a0db lib/HTML/FormHandler/Widget/Block.pm
SHA1 ed0d7f20353442d20dac810d17f629a1bc4f75ba lib/HTML/FormHandler/Widget/Block/Bootstrap.pm
SHA1 f40ee2fd3b3ab42c68532d5efd59c137fe827ee1 lib/HTML/FormHandler/Widget/Field/Button.pm
SHA1 a49ca6c98ff04888965583d07c52e665edf05a9d lib/HTML/FormHandler/Widget/Field/ButtonTag.pm
SHA1 dbd6b7701c5599c3b0b14c137da0475473b93589 lib/HTML/FormHandler/Widget/Field/Captcha.pm
SHA1 8aa198567d33d3b6ea7315393af1bd8e4e01440d lib/HTML/FormHandler/Widget/Field/Checkbox.pm
SHA1 b50209e2426495d73e612acd46896f3592ac666f lib/HTML/FormHandler/Widget/Field/CheckboxGroup.pm
SHA1 a25989aea6c4ab465124238c28830c60d128f9a6 lib/HTML/FormHandler/Widget/Field/Compound.pm
SHA1 f98ebbaa31018b4139445f2a4785a3446e9141ba lib/HTML/FormHandler/Widget/Field/Hidden.pm
SHA1 1ee84f5b7df4895acd4be05603e714d204ed40f5 lib/HTML/FormHandler/Widget/Field/HorizCheckboxGroup.pm
SHA1 b02c298b32a397fba1f4219b416c1992eb3d29b4 lib/HTML/FormHandler/Widget/Field/NoRender.pm
SHA1 4fef1d42d267a8fde82d6e22b8f2f1207546e1c4 lib/HTML/FormHandler/Widget/Field/Password.pm
SHA1 cea71a1224bb44ce6101f010cc9205ac8d59979b lib/HTML/FormHandler/Widget/Field/RadioGroup.pm
SHA1 af8d58e72a3d11dc0c67f5b15c122cb97f161b1e lib/HTML/FormHandler/Widget/Field/Repeatable.pm
SHA1 adb3e4772c16a66a7b79df4e87baf2f3ff1981ed lib/HTML/FormHandler/Widget/Field/Reset.pm
SHA1 9ef9875ab47c00a4d7dae917d86e2254d36fcc56 lib/HTML/FormHandler/Widget/Field/Role/HTMLAttributes.pm
SHA1 8f7449f604c27f886dc3302b47dfce04f8839a77 lib/HTML/FormHandler/Widget/Field/Role/SelectedOption.pm
SHA1 d4ced2cbe930169f62368cb6356235f590cc71b9 lib/HTML/FormHandler/Widget/Field/Select.pm
SHA1 60e276eb422f15c7ad1247cce62fb7bd1f487e4e lib/HTML/FormHandler/Widget/Field/Span.pm
SHA1 0277d7d558f1a598513bc3855dcd89bd2ec8db93 lib/HTML/FormHandler/Widget/Field/Submit.pm
SHA1 1d28d67c0cc88f8472d38a29af1e5f473a17c670 lib/HTML/FormHandler/Widget/Field/Text.pm
SHA1 8f939319a84f12f4550348e36d72e96e26b6addf lib/HTML/FormHandler/Widget/Field/Textarea.pm
SHA1 901de057ab431634a86529b914f68f4aa5326a6e lib/HTML/FormHandler/Widget/Field/Upload.pm
SHA1 bae6d6e2c19e961ad8a55e5ab4593b51af2a8eab lib/HTML/FormHandler/Widget/Form/Role/HTMLAttributes.pm
SHA1 48cf5fab91448f6503b490a074135cdf0ee7a9b5 lib/HTML/FormHandler/Widget/Form/Simple.pm
SHA1 1652f87a9422b45999ab8dc32dd7292833a8593c lib/HTML/FormHandler/Widget/Form/Table.pm
SHA1 bee3182c8467da24fa549592adffd431460e6a60 lib/HTML/FormHandler/Widget/Theme/Bootstrap.pm
SHA1 57302aff09e63261f1e7a5a73265cd32e934d43a lib/HTML/FormHandler/Widget/Theme/Bootstrap3.pm
SHA1 7903d189aacc78a854961845814615fbd3cce0b5 lib/HTML/FormHandler/Widget/Theme/BootstrapFormMessages.pm
SHA1 7c252b6d7eae229cb89a94be1484d24a3c0e2256 lib/HTML/FormHandler/Widget/Wrapper/Base.pm
SHA1 e95bd801e5ca3e20bb2d8ad7e27cef172385df06 lib/HTML/FormHandler/Widget/Wrapper/Bootstrap.pm
SHA1 8e68be78a4a444c3f49f06fee7f8c5c48e4f3bfc lib/HTML/FormHandler/Widget/Wrapper/Bootstrap3.pm
SHA1 b84fd57f64bde11f71c9f1e8ed8d800132172729 lib/HTML/FormHandler/Widget/Wrapper/Fieldset.pm
SHA1 a783638463b59b81a42d5625ce3a49c3898c9671 lib/HTML/FormHandler/Widget/Wrapper/None.pm
SHA1 1bb2ac971517531d08722cfd4101a605a0306157 lib/HTML/FormHandler/Widget/Wrapper/Simple.pm
SHA1 a689eb7d2e7d183d186da5ba581fec4fb81e9a90 lib/HTML/FormHandler/Widget/Wrapper/SimpleInline.pm
SHA1 0f5c6d6f17eb25c0e216958841de7423d7a19925 lib/HTML/FormHandler/Widget/Wrapper/Table.pm
SHA1 52876c826e84e5c2658c5c7712269784c39f56eb lib/HTML/FormHandler/Widget/Wrapper/TableInline.pm
SHA1 db5241377e6ff22c006b3258ea5fe833dbb56423 lib/HTML/FormHandler/Wizard.pm
SHA1 794da1f2f7c41af8edd5fc53e766a33072c10c91 share/templates/field/button.tt
SHA1 3681fc90aef0523ca43663e10a2e2798d7a413ab share/templates/field/checkbox.tt
SHA1 acc9394577fdda7a1408ee052792c70f00340c34 share/templates/field/checkbox_group.tt
SHA1 86d4b217c985f6a4f501b32f4c92a8e388285f1d share/templates/field/compound.tt
SHA1 67db06d5868ee6bd9ef38350325436f4da3e19ac share/templates/field/hidden.tt
SHA1 44ac0e6fc4db1bcfe561598258528e6f0000f37e share/templates/field/password.tt
SHA1 c5c430236706e7bcbb2d88b43c3fdd10ea7b8fa5 share/templates/field/radio_group.tt
SHA1 a660124b371ce25428bc1a9f9facaa31eca9d8cb share/templates/field/repeatable.tt
SHA1 cb99bbd10c2067d02e0e9b7a898e7535a1108c59 share/templates/field/reset.tt
SHA1 5de099392c362013ea3dc49c17be7f01cac987fc share/templates/field/select.tt
SHA1 776c16b7c5744cd197bdeb8b7b2981ec631eab31 share/templates/field/submit.tt
SHA1 f539376e39505417ed106c9a8239aad1102ee226 share/templates/field/text.tt
SHA1 5ed10a483ec32dde1dbcd92a9c89e364ec75c401 share/templates/field/textarea.tt
SHA1 d963677f9ec0d30e1abe3a604fbc6a80c8489498 share/templates/field/upload.tt
SHA1 b2faa01201389f379517e3955f686b04c045793a share/templates/foo/checkbox_tag.tt
SHA1 90d389dd6cd2ad7431f9172a225eea49975a3712 share/templates/foo/end_form.tt
SHA1 b128ee5ab6181501a2a7675efa8d908845e545f7 share/templates/foo/field.tt
SHA1 04b81260d43b3c7a4cd324556f6e9ab47f1e2644 share/templates/foo/form.tt
SHA1 d21cd1dc150147d5688ae048dc0c1f3c5ae59283 share/templates/foo/input.tt
SHA1 dbc5ab703565e950469a288390dfd94be437d7d2 share/templates/foo/input_tag.tt
SHA1 5886e336a836a6ce4df0559dee82cfcd30ff35eb share/templates/foo/label.tt
SHA1 63cb1701b6b97d8c092b5b5afd66cd03faaf5dfd share/templates/foo/start_form.tt
SHA1 378ff945471b9b88de9a04cec914d900dc2dd06f share/templates/form/form.tt
SHA1 78b7b8068756334ca53c8a7624076918c71fce40 share/templates/form/form22.tt
SHA1 90d389dd6cd2ad7431f9172a225eea49975a3712 share/templates/form/form_end.tt
SHA1 8b310b0206b7126daf1d7812a884df95e3751c70 share/templates/form/form_in_one.tt
SHA1 63cb1701b6b97d8c092b5b5afd66cd03faaf5dfd share/templates/form/form_start.tt
SHA1 27e0470ee115b9f96c9cef602703e71c0d71b725 share/templates/wrapper/fieldset.tt
SHA1 a6f1dc7378d74c91fca73dd9cda322636c9f6dc8 share/templates/wrapper/label.tt
SHA1 475346c385a4f2fdd668aab9f6b0e1f8d63522d0 share/templates/wrapper/none.tt
SHA1 96b3d105205e2bde31af480ae3774c6c58c1589d share/templates/wrapper/simple.tt
SHA1 edbdd55a879e452a4bbd0efad463c2be27dcb80d share/templates/wrapper/wrap_label.tt
SHA1 d55b2da9ebb18c4da78ae398a555d19728397acd t/01app.t
SHA1 4ed25ed927ed6874191dff44b95fc6a719a77896 t/author-eol.t
SHA1 18032bf7f866341708bfdeeee48dd19314e4c767 t/author-no-tabs.t
SHA1 cd5f377bc07357aae0ddf592fdf97aef6ff60489 t/basic.t
SHA1 9ccc83343d981613ac0c71f941a206b9d50223e4 t/blocks/basic.t
SHA1 d164545e6a42ed3cc2e8323abe759ace1b2f8765 t/blocks/block_list.t
SHA1 0ac8fde2c904dfb30544de720fbef9c9580c4bd7 t/blocks/blocktags.t
SHA1 72fcf38937a9674c51acb3f66f327e039e0530f7 t/blocks/build_render_list_method.t
SHA1 b1f78d867fcf6aa011d9286ab1d05e018a49eddf t/blocks/loading.t
SHA1 1e8ec64e5640cfccfdfe2d0d2ab921d25891a917 t/blocks/nested.t
SHA1 f09cd0aba1ed89940f4b3e75d6dbd8b7b6235ab6 t/blocks/render_units.t
SHA1 733e77823d3d86ea38382d691397353b87ac26ab t/bootstrap/basic.t
SHA1 7301ecf03852708029d8e59997e149590f596f60 t/bootstrap/control_states.t
SHA1 ae16a51d2a268b80c575175904cd6795073636ae t/bootstrap/controls.t
SHA1 6110d50ed54a4606e882494064c11d933bd766ae t/bootstrap/ext_controls.t
SHA1 eaa1754ec21ec4fd417ba15d1cded0002169b36d t/bootstrap/inline.t
SHA1 8e7d351b4f1b296106c6928785c02c69745c7338 t/bootstrap/other.t
SHA1 125b1f1217851c8d468d33316a017b8756b63221 t/bootstrap/search.t
SHA1 b7f3d404d5ae0aa94c1b5f61f7e5582beb983a45 t/bootstrap3/basic.t
SHA1 3ba503de363c86bbe821e986455bad58f95976d7 t/bootstrap3/controls.t
SHA1 fbac5e409e361615cd723635299cf7e06132b01c t/bootstrap3/horiz.t
SHA1 cfc7b730c83305dd93946678c4289cb4e401de08 t/bootstrap3/horiz_checkboxgroup.t
SHA1 0718779ad9787d39230aa12efdb0ecf3d0cee275 t/bootstrap3/inlinecheckboxes.t
SHA1 aa4a34c0a641d66ca56140cbcc732b5942d34b79 t/bootstrap3/layout_classes.t
SHA1 99db89ba2029b09d8aceebe7ca3a0d2a4bc3804e t/compound/basic.t
SHA1 076f5508b176cc8df148e3c54f8c02506c61ebfc t/compound/default.t
SHA1 5113d3260a143cbb4214c532b0267013485f9866 t/compound/empty.t
SHA1 3484c409ef375e7c7a383fe1a21afdffa88bcb67 t/compound/include.t
SHA1 e70e61d29017ca572169563f5bc5f04409d75223 t/compound/select.t
SHA1 9b3346315f550ac726c9733c750ff26cf205789e t/errors/basic.t
SHA1 45c2969b6e22b940d89c282f29cb12393320b5ce t/errors/compound.t
SHA1 96b02b3f93ab1c096ab6e64d6cadfde6cfb887eb t/errors/form_messages.t
SHA1 4da7ca25cadbdddd2c61f5fd43b8d46568e03c6a t/errors/messages.t
SHA1 a98bd1e8013013d26ca7ecd2bdcac079969a255a t/errors/req_message.t
SHA1 b34ec719574cc0bbad22b820a6ba617f8f7afcdc t/field_setup/checkbox.t
SHA1 39c71d5c367b29a0ca4fc7a8b96ce19f226cb913 t/field_setup/compound_update_fields.t
SHA1 d0e5f8d2b24883af8e1d835c7f777b0cc4dbcf80 t/field_setup/defaults.t
SHA1 d48b9904cd8546c3fd23653628bb0aad999e7b51 t/field_setup/disabled.t
SHA1 c9ce3ecb482109d83fdac934784d81f5c21ee743 t/field_setup/id.t
SHA1 4867c2f3cfc14d5b82e3ce8177dc4b355771ec6c t/field_setup/inactive.t
SHA1 97744c22607da7adacafa6a3952bc0568a817de8 t/field_setup/init_object.t
SHA1 3963aec76768a163add932eb82d3700ef19c0820 t/field_setup/input_param.t
SHA1 e5e246a2d74b0cf478c859fa7f5d59f26e4886ac t/field_setup/missing.t
SHA1 99b4bed094f697439910d0106e1018a4688f209f t/field_setup/plus_field.t
SHA1 5ef5f0dca7f29790083872ded07fbdaddba5b4b5 t/field_setup/update_fields.t
SHA1 ee3294fdd0643d1a13fdf0f813f6b75b5c1762fa t/field_setup/update_subfields.t
SHA1 5d6655e57a6cb1a65ed1420cc24e962d421cb59e t/fields/dates.t
SHA1 b49610114fcca34d34b2d3a302efeb7a4499c8fe t/fields/display.t
SHA1 fb5ae16799827bb26bf3fad0674cffee79912dd3 t/fields/fields.t
SHA1 32ffb3e7403b82fd033326ed8dfa1950330f8f99 t/fields/float.t
SHA1 1c7e3714c63b6ca0f42bad837b9fde746bcfac2c t/fields/formhandlerx.t
SHA1 eb62c3ad672f8697c0cf6eafd6a5474c904cee8d t/fields/novalue.t
SHA1 03e8a04c7c3e5590deea887bb176e59dcea90472 t/fields/password.t
SHA1 544f7a16def20df3347f502e3357b85a435d1671 t/fields/repeatable.t
SHA1 e50a8b03de076100f724adfbfec23e44477da325 t/fields/request_token.t
SHA1 f138e0279eef965f14f9c91152be7a06bea027eb t/fields/select.t
SHA1 f233d0276585178953f92da2dbd51b8482676c0d t/fields/select2.t
SHA1 267cb4dddb0fb7e7ba5c93b33c209fc95c50dbbf t/fields/selectcsv.t
SHA1 e1582fd64f41b469df00358c17be77dbdf101aac t/fields/textcsv.t
SHA1 5ff79691362b0cf53ed26c80e2867d4c28149fad t/form_setup/api.t
SHA1 4e01795fb844699a5482d0429bf678d63002b94a t/form_setup/clone.t
SHA1 76bef41216e5703501cbdc5e1524ad6d9e9693df t/form_setup/compound_field_list.t
SHA1 f4bf6e023e39186b1fe371e41033c689ea0fcc84 t/form_setup/config.t
SHA1 f6d1ddf31d2715bc0e0fae057905658bd9234cb1 t/form_setup/dynamic.t
SHA1 3322e427487ebea857befbdde07f3ec404a7047e t/form_setup/include.t
SHA1 d0eb67a45078195f6d4a3281f51cf66820ed31db t/form_setup/init_obj.t
SHA1 93559f482788e583eb24d7bcb5fd1187b4e66a4b t/form_setup/no_update.t
SHA1 4b95ce6100c2b052109ec965ac52c864a58f751b t/form_setup/posted.t
SHA1 0972c2048c440a92020f7eba9473e09eac3105ea t/form_setup/render_roles.t
SHA1 12375d16dfb7f3c00385c0834976e594172319d3 t/infl_defl/comp_field.t
SHA1 8685c2e531341016ed61439c2ab9df7b50818266 t/infl_defl/default.t
SHA1 e1cb08e56c1268ea619c5bf80731b90047f95735 t/infl_defl/defl_lives.t
SHA1 458176d710595080122f1ee6d93adfc5938dc87d t/infl_defl/infl_defl.t
SHA1 8e2043b8edf2a460282743a6edfb15859958426d t/infl_defl/infl_transform.t
SHA1 26dab7a7c9034b26697c7a7336b29dce46ad64bd t/infl_defl/undef_deflation.t
SHA1 cda457f835bc268a1d3c4e6d7b177ab4a4e2be51 t/infl_defl/variations.t
SHA1 e330f72586852fb7f18c444008ab792c3e04b6c6 t/lib/BookDB/Form/Upload.pm
SHA1 f5a80fcbc4f14894c274ea1e896067cc45143312 t/lib/Field/Address.pm
SHA1 df80db13f94fe5044c995228ade46b8cd341045e t/lib/Field/AltText.pm
SHA1 498e59d660a0b78b32565494484cb75ce9cad9c3 t/lib/Field/MyField.pm
SHA1 3de5695a354809ff50f2900d257ec7eb195f9db7 t/lib/Form/Address.pm
SHA1 3fa8edbecc482588a667d4ff0f938da4ab60b3c6 t/lib/Form/AddressRole.pm
SHA1 37ae2600a3998048b253de1e96ee7b7d7597281c t/lib/Form/Multiple.pm
SHA1 f01a56814525ff213d829b7499bbfef06fc90538 t/lib/Form/MultipleRole.pm
SHA1 cf460b1f0a0106df286bffeae39cc321472d4e7b t/lib/Form/NoExtForm.pm
SHA1 58469593246683e39a8fa3bdcf07b2669c9cb59a t/lib/Form/Person.pm
SHA1 51ceda9acbd63d49a81a959adc27285a42e5ff27 t/lib/Form/PersonRole.pm
SHA1 94cd172b90fd02eab01eb6e528c9e701eb914fd1 t/lib/Form/Test.pm
SHA1 d6ce4712417f325870983a7e6f7d07e52c10974f t/lib/Form/Two.pm
SHA1 d92e6eaa78b5fe830c108a1f91fb0aa6ea82cd39 t/lib/MyApp/Component/Section.pm
SHA1 5239c744281b45b5ee49e4498fe5a04822ea1766 t/lib/MyApp/I18N/abc_de.pm
SHA1 3b549a8c8d4fdc4e55ec323fac3eaf48111f8320 t/lib/Widget/Block/Test.pm
SHA1 364e324607d74434dc26938a08fec784de110737 t/lib/Widget/Field/Omega.pm
SHA1 7d6fdb503d9aee63eb6a79ec86d33997faf8b383 t/lib/Widget/Field/TestWidget.pm
SHA1 eed8ac3446c4a13d80720503345cfb54395571b9 t/memory_cycles.t
SHA1 725aeac4b9c347859d451fe700fd5988dab60055 t/moose/build_id.t
SHA1 9489e970b3d3f5bd0ca82ba7704a0589546d278c t/moose/composed.t
SHA1 7ad31d0a34a696fc1b05aca77302b050abeb189a t/moose/field_traits.t
SHA1 1908e358a05fb889f1d3e76bc462df747766f5eb t/moose/no_extend.t
SHA1 2fcb1cf1667bbf821cac0eba3389357dec953857 t/moose/subclass_roles.t
SHA1 d69dcbcff41cd0df28bf36527ddb37d447754932 t/render/actions.t
SHA1 c1191d24fc2785ef40103d2191e87dfe92ee71e9 t/render/array.t
SHA1 5a953cb7108e91b26087649ce7aa7cf9d213b650 t/render/basic.t
SHA1 07244bfe73f681547ed1f51fa6f9b81d17ce356a t/render/checkbox.t
SHA1 8541c93eca5d0804ae369fd226022c2371193621 t/render/checkbox_group.t
SHA1 a5df3850dc018534a798cb15ea6150c00e165753 t/render/classes.t
SHA1 b3bb4fcdaf7528300f7d3853c768812d86fe0f78 t/render/compound.t
SHA1 8e30bceab9974e70669803515b19ba17848877f2 t/render/compound2.t
SHA1 9d74a680a8b8420ccf65fca01ed631c25ca8e724 t/render/display.t
SHA1 4e2142b5f91f776af188e3edeea4b8530ed0f59f t/render/errors.t
SHA1 e9779e6c5b64ac56a003e9ce4678b1f61149c5f3 t/render/escaping.t
SHA1 34169ac2fd52733922c55e3b1371ac47d3d49d9c t/render/ff.t
SHA1 ae10e2cea31a74caae799668c2742e9596dc2a85 t/render/filter.t
SHA1 baee60bf749cdd64dbe05404b5fbb97f9246f07b t/render/form_errors.t
SHA1 10c270e17ff97aebde06110159bb3662ccdfc7b5 t/render/get_tag.t
SHA1 782a804a2ed9a197f983ef954a31babd316a35c7 t/render/html5_attributes.t
SHA1 ae53d67a44b13e3c1da6fcc79bca8c9221c974f0 t/render/html_attr.t
SHA1 93a47fa99029371cca018337acd5a56911a90064 t/render/html_attributes.t
SHA1 429398d9de168ed3f03b6d4ce01ab1bdccc787e6 t/render/inline.t
SHA1 f43bbd9c8aedd00c513e72a5748bce5355b188b3 t/render/label.t
SHA1 055b6f61d8e45ddb9b2c6905680dcb70b256c63b t/render/noneditable.t
SHA1 5b88d772b395d9f2876be4e8e1498ba6266842e2 t/render/optgroup.t
SHA1 654948efd382323ce4bb0d267f4f9c168868204b t/render/radio_group.t
SHA1 7175a9276b2f6cabcd4382ef846ec84157ba79d4 t/render/rep_fieldset.t
SHA1 b6ef18105cb6d136f78217e38f42f09f93c7d2f6 t/render/rep_wrapper.t
SHA1 406f852e54337b6b1888398e6042f399cbffb9fc t/render/repeatable.t
SHA1 b9b3e4d218182714100a52561502c9c14e34bb1b t/render/result.t
SHA1 90e802e12c26b25a7f88802cfdcc3eb6f1ae9198 t/render/select.t
SHA1 17dc198e476104266c590d5dd8bc61c8f7934c1d t/render/simple.t
SHA1 544a4a24dcb34fc50fc4c18ebc6aaa48f5cceb3a t/render/submit.t
SHA1 7ac35647e2a90f8de10a0b8f5569ce2728c2972b t/render/table.t
SHA1 17c04b46c520260fadf04cc4a7c5acdc0004dcb2 t/render/tags.t
SHA1 aa807aff3acbda893ccbd6400c1c473fcf67189d t/render/tt_render_elementx.t
SHA1 d977f8cecf28d424cde917093535cbfc6fb27ea3 t/render/util.t
SHA1 f4e53913e5882a765e13e93d84d5a498a03569fa t/render/widget_loading.t
SHA1 98dcba91ccb83597ef0170ad045291bded439c41 t/render/widget_tags.t
SHA1 93033625a3a956991cfb3e5354141a3e924aab0d t/render/widgets.t
SHA1 7d5d0825b48ea1047f5de81e696daebca856df32 t/render/with_class.t
SHA1 23ea3683a53943fcba024599cbba28761cb5b8e4 t/render/withtt.t
SHA1 fe4e8b94c36d1707101b3d329069172536e4aa6e t/repeatable/defaults.t
SHA1 2778a516f22e0b0d8d14db468304821fa262e3ab t/repeatable/empty.t
SHA1 0362d4289b5d7c15f31d0fc9aadc32738b894704 t/repeatable/has_many.t
SHA1 388ed334251b9db9f096a6884c01ff00e3e3fe2b t/repeatable/hash.t
SHA1 34075dacb6d838e9f9b88e1966678230efaf87fb t/repeatable/js.t
SHA1 f50d0e2ed62e9a9a8e455aa4ccecc533801ee8ad t/repeatable/list.t
SHA1 c875b3c645f32bb58ee195aae4042a6e4851dc94 t/repeatable/nested.t
SHA1 4e0978924167cb79c7be49ffa104b9fffada8616 t/repeatable/nested2.t
SHA1 bf316fc1f7fb0ab2e90b50244fae2f7d71b5872a t/repeatable/num_extra.t
SHA1 f08e15a8370c204d16b4a4dd899f0b8c8f6f2773 t/repeatable/reload.t
SHA1 fbe8ae9d5062acb07c81ac8c5d733ac2be22154a t/repeatable/set_methods.t
SHA1 359087d5f8a029fabad7944fa3ff2af9c6a6ed79 t/repeatable/subfield.t
SHA1 b771d6ebc02f44fbebd3868894022a0bd959b001 t/result/basic.t
SHA1 e94436b6500a0e51fcfce7b217547775f65e58a5 t/result/blocks.t
SHA1 24b760833e98e72c96a41ab615568f825b0c358b t/result/compound.t
SHA1 14babbbd7dbbf7acf3e8a887066eb1b6a66b3259 t/result/errors.t
SHA1 724bf07cbf1f65c22fdf7c211ed758874f6d2aef t/result/repeatable.t
SHA1 b83f7770be71ea9e5b627f0323a207bf6e94efce t/structured.t
SHA1 ed8a1b0d5f149f02df2dde44f58fc814516171c8 t/template.t
SHA1 2c0584c0a616ec1f3ab7cef0b4310df844d45fce t/validation/apply.t
SHA1 c8b2d029acdc6c58ff0e44a25404549ac6c6680f t/validation/constraints.t
SHA1 a7469a1fb8a0e7b3e1af9e5dfd9674eae54e8d7f t/validation/dependency.t
SHA1 fa54bae035104eac9559c449aa0d80ba8e2649d3 t/validation/filters.t
SHA1 8bebaf81f0a777a646972ea49a0e07b0d700effe t/validation/reqwhen.t
SHA1 8e379034c33ab1ee3d70c6e9db1b067777bf7f86 t/validation/type_tiny.t
SHA1 faeb551197e7447f8a466d43076c83a2cdf255b4 t/validation/types.t
SHA1 60761cd04a6350433097c91e438bef74f5ca53b7 t/validation/validate_coderef.t
SHA1 bc0b36210f8c7fcc56c9fb9b805cbc993c4394bf t/validation/when.t
SHA1 8e040ebd13ce2e819310418baeca2b44c46eadf0 t/var/form1.pl
SHA1 2d8d392a1c132b6c6f49fbf2c8eea327d89f1104 t/var/form1.yml
SHA1 d23691c4eb64f6237f37959e18ac1d40b0d5c618 t/wizard/basic.t
SHA1 6cbc9f61f49670b2211f2fa5157631246b65ebf5 util/check_I18N.pl
SHA1 6df1c66c420e0f42840fa6d6c46daf4290630e7a util/get_messages.pl
SHA1 93eaf3c7a86b387b60e8724f4cf02d3adde49a21 util/messages
SHA1 86d255a7c9f065a13049108362c949b3e35a4c24 xt/02pod.t
SHA1 65ca268d24f92823c6a33fcbe7640857315e0d0e xt/add_field.t
SHA1 77fc699934e5885b083a8e4485ed3d20c76550b8 xt/captcha.t
SHA1 84bae2a79191282ea96e987c00439d7c72bcdad6 xt/captcha2.t
SHA1 a536583356d1f37258e77d8bae3491bd3b36793e xt/chbox_group.t
SHA1 2148bb20efb65181d062d0906e4d10a904735e2f xt/check_selected_option.t
SHA1 1edadbbec253933b48f5185dc9c367acb8472163 xt/custom_fields.t
SHA1 4c47aa23f9cdaf64d628ff069666a1caca5c385a xt/cycles.t
SHA1 6fe7330dcf9aeb70f6fb8f6f17d1a691df027f36 xt/dfv.t
SHA1 4e292478d5ce0ba4b4dc98cfffd15d767e442378 xt/display.t
SHA1 2a3193b807b6df2f6964d98a854b95b2bac12184 xt/email.t
SHA1 88654c3432fbde212db1de54ba74478ded6c38cc xt/eol.t
SHA1 0f80fc1a2dd60772c5ec83096af23b54398b63c1 xt/field_list.t
SHA1 e0bae1206838fa9f79e11899182601e1ede46176 xt/form_errors.t
SHA1 c08a4366a8d2aad7ac677541352d5ea3cd708043 xt/init.t
SHA1 a4f3c6e37039a856f555e8923dcb7b09809b24cf xt/lib/MyCatalystApp.pm
SHA1 b689a246cde895936371a1b33245a5c78e4eda68 xt/lib/MyCatalystApp/Controller/Captcha.pm
SHA1 aefd98c4a4d10ca1063ebc43d0ee979c01c46154 xt/lib/MyCatalystApp/Controller/Root.pm
SHA1 d02a4b95dfe88f5b748acdcd1efda6f4c53012d5 xt/load_field.t
SHA1 fbada2c08ac6f80f03050d4af4b0b889b03146b9 xt/locale.t
SHA1 183db3551cff148adc7d611af316f3739953afec xt/locale_data_localize.t
SHA1 db6e66c79f25cdcf6435f021499473475fdb15a1 xt/mb_form.t
SHA1 1ce3a2c875d974a0f81e1233be575386a1bc5612 xt/model_cdbi.t
SHA1 a4127156e8dad3f81624bf6b5f5683931f76f88f xt/multiple_forms.t
SHA1 94f2ae2ffc6b9e178bf144604b2b68d94af2ecb3 xt/order.t
SHA1 b89aefcbbc7f6fbb350932bdedd031b15c66cb9f xt/params.t
SHA1 1a18e8b9e12e2a35fe3e08a40547da667c047d3a xt/posted.t
SHA1 5554a5710a78de48ea5e7e639eb2483a33e72e40 xt/repeatable_clone.t
SHA1 0ad8d5fe3ee1aef6f9f78b7035cf7058ad0eb814 xt/submit.t
SHA1 11cfd9ee49b356722fc0b09c75b5110fed8759c2 xt/upload.t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
iF4EAREIAAYFAllw33QACgkQlX0ZOkgCucjQ8QD+OZrmQJpuNcYkZcpzo1gssfpU
+7cCk9MWHyeOFYz6r7gA/1s+6lwdDE5IbfiJ+IPKHSa5dOF9O0WOyIsEDlWKmBBb
=PobA
-----END PGP SIGNATURE-----
02pod.t 100644 000770 000024 276 13134157564 16214 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/xt use Test::More;
eval "use Test::Pod 1.14";
plan skip_all => 'Test::Pod 1.14 required' if $@;
plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
all_pod_files_ok();
email.t 100644 000770 000024 2121 13134157564 16366 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/xt use strict;
use warnings;
use Test::More;
BEGIN
{
eval "use Email::Valid";
plan skip_all => 'Email::Valid required' if $@;
plan tests => 7;
}
$ENV{LANG} = 'en_us'; # in case user has LANG set
my $class = 'HTML::FormHandler::Field::Email';
use_ok($class);
my $field = $class->new( name => 'test_field', );
$field->build_result;
ok( defined $field, 'new() called' );
$field->_set_input('foo@bar.com');
$field->validate_field;
ok( !$field->has_errors, 'Test for errors 1' );
is( $field->value, 'foo@bar.com', 'value returned' );
$field->_set_input('foo@bar');
$field->validate_field;
ok( $field->has_errors, 'Test for errors 2' );
is(
$field->errors->[0],
'Email should be of the format someuser@example.com',
'Test error message'
);
$field->_set_input('someuser@example.com');
$field->validate_field;
ok( !$field->has_errors, 'Test for errors 3' );
{
package MyApp::Form::Test;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has_field 'foo';
has_field 'email' => (
type => 'Email',
email_valid_params => { -mxcheck => 1 },
);
}
order.t 100644 000770 000024 767 13134157564 16410 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/xt use Test::More tests => 3;
use_ok( 'HTML::FormHandler' );
{
package My::Form;
use Moose;
extends 'HTML::FormHandler';
sub field_list {
[
field_one => 'Text',
field_two => 'Text',
field_three => 'Text',
field_four => 'Text',
field_five => 'Text',
]
}
}
my $form = My::Form->new;
is( $form->field('field_one')->order, 1, 'first field order');
is( $form->field('field_five')->order, 5, 'last field order');
cycles.t 100644 000770 000024 710 13134157564 16543 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/xt use strict;
use warnings;
use Test::More 0.88;
use Devel::Cycle;
{
package FormHandlerMemLeak;
use HTML::FormHandler::Moose;
extends qw/HTML::FormHandler/;
has_field test => ( type => "Text");
sub default_test {
return "test";
}
sub validate_test {
return 1;
}
__PACKAGE__->meta->make_immutable;
}
my $i = FormHandlerMemLeak->new;
find_cycle($i, sub { fail("Cycle found") });
ok $i;
done_testing;
locale.t 100644 000770 000024 11204 13134157564 16560 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/xt use strict;
use warnings;
use Test::More;
use Test::Exception;
use HTML::FormHandler::Field::Text;
use lib ('t/lib');
# ensure $ENV is properly set up
my @LH_VARS = ('LANGUAGE_HANDLE', 'HTTP_ACCEPT_LANGUAGE', 'LANG', 'LANGUAGE' );
my %LOC_ENV;
$LOC_ENV{$_} = delete $ENV{$_} for @LH_VARS;
# a primitive translation package
{
package HTML::FormHandler::I18N::xx_xx;
use base 'HTML::FormHandler::I18N';
# Auto define lexicon
our %Lexicon = (
'_AUTO' => 1,
'You lost, insert coin' => 'Not won, coin needed',
'Test field' => 'Grfg svryq',
);
}
# a simple demo form
{
package Test::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has_field 'test_field';
}
my $form;
################ Locale -none-
$ENV{LANGUAGE} = 'en-US';
# create form w/o locale must work
lives_ok { $form = Test::Form->new } 'create form w/o locale lives';
ok($form, 'create form w/o locale');
is(ref($form->language_handle), 'HTML::FormHandler::I18N::en_us', 'locale en_us');
# ensure we know / don't know the translations
$HTML::FormHandler::I18N::en_us::Lexicon{'You lost, insert coin'} = 'XX Dummy 42';
$HTML::FormHandler::I18N::en_us::Lexicon{'Must insert a [_1] coin'} = 'Want a [_1] coin';
delete $HTML::FormHandler::I18N::en_us::Lexicon{'Test field'};
delete $HTML::FormHandler::I18N::en_us::Lexicon{'You won'};
# translating a known error works
$form->field('test_field')->clear_errors;
$form->field('test_field')->add_error('You lost, insert coin');
is_deeply($form->field('test_field')->errors, ['XX Dummy 42'], 'error is translated into en_us');
# translating a known label
is($form->field('test_field')->label, 'Test field', 'Label w/o translation = ok');
# translating a known error with a positional parameter
$form->field('test_field')->clear_errors;
$form->field('test_field')->add_error('Must insert a [_1] coin', 'cleaned');
is_deeply($form->field('test_field')->errors, ['Want a cleaned coin'], 'error w/parameter is translated into en_us');
# translating an unknown error also works
$form->field('test_field')->clear_errors;
$form->field('test_field')->add_error('You won');
is_deeply($form->field('test_field')->errors, ['You won'], 'error is translated into en_us');
# translating an error with bracket issues
$form->field('test_field')->clear_errors;
dies_ok( sub { $form->field('test_field')->add_error('You are not authorized for this archive. See: [more information], [request authorization]') }, 'dies on maketext error' );
lives_ok( sub { $form->field('test_field')->add_error('An error with ~[escaped brackets~]'); },
'does not die when brackets are escaped with tilde' );
################ Locale xx_xx set via ENV{LANGUAGE_HANDLE}
$ENV{LANGUAGE_HANDLE} = 'xx_xx';
# create form w/ locale must work
undef $form;
lives_ok { $form = Test::Form->new } 'create form w/ locale lives';
ok($form, 'create form w/ locale');
is(ref($form->language_handle), 'HTML::FormHandler::I18N::xx_xx', 'locale xx_xx');
# translating a known error works
$form->field('test_field')->clear_errors;
$form->field('test_field')->add_error('You lost, insert coin');
is_deeply($form->field('test_field')->errors, ['Not won, coin needed'], 'error is translated into xx_xx');
# translating an unknown error also works
$form->field('test_field')->clear_errors;
$form->field('test_field')->add_error('You won');
is_deeply($form->field('test_field')->errors, ['You won'], 'error is translated into xx_xx');
# translating a known label
is($form->field('test_field')->loc_label, 'Grfg svryq', 'label rot13 to xx_xx');
# remove from environment variable, so we can use builder
delete $ENV{LANGUAGE_HANDLE};
{
package MyApp::Test::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
use MyApp::I18N::abc_de;
sub _build_language_handle { MyApp::I18N::abc_de->new }
has_field 'foo';
has_field 'bar';
sub validate_foo {
my ( $self, $field ) = @_;
$field->add_error('You lost, insert coin');
}
}
$form = MyApp::Test::Form->new;
ok( $form, 'form built' );
$form->process( params => { foo => 'test' } );
is( $form->field('foo')->errors->[0], 'Loser! coin needed', 'right message' );
is( ref $form->language_handle, 'MyApp::I18N::abc_de', 'using right lh');
is( ref $form->field('foo')->language_handle, 'MyApp::I18N::abc_de', 'field uses form language handle' );
$form->process( language_handle => HTML::FormHandler::I18N->get_handle('en_us'), params => { foo => 'byebye' } );
my $field_lh = $form->field('bar')->language_handle;
is( ref $field_lh, 'HTML::FormHandler::I18N::en_us', 'field uses form language handle' );
$ENV{$_} = 'en-US' for @LH_VARS;
done_testing;
params.t 100644 000770 000024 4036 13134157564 16571 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/xt use Test::More tests => 6;
use_ok( 'HTML::FormHandler::Params' );
my $_params = HTML::FormHandler::Params->new;
my $p1 = {
'book.author' => 'J.Doe',
'book.title' => 'Doing something',
'book.date' => '2002',
};
my $p1_exp = $_params->expand_hash( $p1 );
is_deeply( $p1_exp, { book => { author => 'J.Doe',
title => 'Doing something',
date => '2002' } }, 'get expanded has' );
my $p2 = {
'books.0.author' => 'Jane Doe',
'books.0.title' => 'Janes Book',
'books.0.date' => '2003',
'books.1.author' => 'Miss Muffet',
'books.1.title' => 'Sitting on a Tuffet',
'books.1.date' => '2004'
};
my $p_hash = {
books => [
{ author => 'Jane Doe',
title => 'Janes Book',
date => '2003',
},
{
author => 'Miss Muffet',
title => 'Sitting on a Tuffet',
date => '2004',
}
]
};
my $p2_exp = $_params->expand_hash( $p2 );
is_deeply( $p2_exp, $p_hash, 'get expanded hash for dot notation' );
my $p3 = {
'books+0+author' => 'Jane Doe',
'books+0+title' => 'Janes Book',
'books+0+date' => '2003',
'books+1+author' => 'Miss Muffet',
'books+1+title' => 'Sitting on a Tuffet',
'books+1+date' => '2004'
};
my $p3_exp = $_params->expand_hash( $p3, '+' );
is_deeply( $p3_exp, $p_hash, 'get expanded hash for plus notation' );
my $p4 = {
'books[0]author' => 'Jane Doe',
'books[0]title' => 'Janes Book',
'books[0]date' => '2003',
'books[1]author' => 'Miss Muffet',
'books[1]title' => 'Sitting on a Tuffet',
'books[1]date' => '2004'
};
my $p4_exp = $_params->expand_hash( $p4, '[]' );
is_deeply( $p4_exp, $p_hash, 'get expanded hash for bracket notation' );
my $p5 = {
'book.author' => 'Jane Doe',
'book.title' => 'Janes Book',
'book.date' => '2003',
};
my $p5_hash = {
book =>
{ author => 'Jane Doe',
title => 'Janes Book',
date => '2003',
},
};
my $p5_exp = $_params->expand_hash( $p5 );
is_deeply( $p5_exp, $p5_hash, 'get hash from single brackets');
posted.t 100644 000770 000024 3073 13134157564 16604 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/xt use strict;
use warnings;
use Test::More;
use HTML::FormHandler::I18N;
$ENV{LANGUAGE_HANDLE} = 'en_en';
{
package Test::SingleBool;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has_field 'opt_in' => ( type => 'Boolean', required => 1 );
}
{
my $form = Test::SingleBool->new;
ok( $form, 'form built' );
$form->process( params => {} );
ok( !$form->ran_validation, 'form did not run validation' );
my $test = 'POST';
$form->process( posted => ($test eq 'POST'), params => {} );
ok( $form->ran_validation, 'form did run validation' );
ok( $form->has_errors, 'form has errors' );
my @errors = $form->errors;
is( scalar @errors, 1, 'form has an error' );
is( $errors[0], 'Opt in field is required', 'error message is correct' );
}
{
package Test::SingleBoolCompound;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has_field 'a' => ( type => 'Compound', required => 1 );
has_field 'a.opt_in' => ( type => 'Boolean', required => 1 );
}
{
my $form = Test::SingleBoolCompound->new;
ok( $form, 'form built' );
$form->process( params => {} );
ok( !$form->ran_validation, 'form did not run validation' );
my $test = 'POST';
$form->process( posted => ($test eq 'POST'), params => {} );
ok( $form->ran_validation, 'form did run validation' );
ok( $form->has_errors, 'form has errors' );
my @errors = $form->errors;
is( scalar @errors, 1, 'form has an error' );
is( $errors[0], 'A field is required', 'error message is correct' );
}
done_testing;
submit.t 100644 000770 000024 2463 13134157564 16613 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/xt use strict;
use warnings;
use Test::More;
use HTML::FormHandler::Test;
use_ok( 'HTML::FormHandler::Field::Submit' );
my $field = HTML::FormHandler::Field::Submit->new(name => 'submit');
$field->build_result;
is( $field->value, 'Save', 'get right value');
ok( $field->result, 'returns result');
{
package Test::Submit;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
with 'HTML::FormHandler::Render::Simple';
has '+name' => (default => 'test_submit');
has_field 'some_field';
has_field 'submit' => ( type => 'Submit', value => 'Submit' );
}
my $form = Test::Submit->new;
ok( $form, 'get form');
my $params = { some_field => 'test' };
$form->process($params);
my $result = $form->result;
is( $result->num_results, 2, 'two results');
is( $form->field('submit')->input, undef, 'no input for submit field');
$form->process( { some_field => 'test', submit => 'Submit' } );
is( $form->field('submit')->input, 'Submit', 'input for submit field');
my $rendered = $form->render;
is_html( $rendered,
'',
'form renders');
done_testing;
upload.t 100644 000770 000024 7304 13134157564 16573 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/xt use strict;
use warnings;
use Test::More;
use HTML::FormHandler::Test;
use_ok('HTML::FormHandler::Field::Upload');
use HTML::FormHandler::I18N;
$ENV{LANGUAGE_HANDLE} = 'en_en';
{
package Mock::Upload;
use Moose;
use File::Copy ();
use IO::File ();
use File::Spec::Unix;
has filename => ( is => 'rw' );
has size => ( is => 'rw' );
has tempname => ( is => 'rw', lazy_build => 1 );
has basename => ( is => 'ro', lazy_build => 1 );
has tmpdir => ( is => 'ro', default => '' );
has fh => ( is => 'rw', required => 1, lazy_build => 1 );
sub _build_fh {
my $self = shift;
my $fh = IO::File->new( $self->tempname, IO::File::O_RDONLY );
unless ( defined $fh ) {
my $filename = $self->tempname;
die "Can't open '$filename': '$!'";
}
return $fh;
}
sub _build_tempname {
my $self = shift;
return $self->tmpdir . $self->basename;
}
sub _build_basename {
my $self = shift;
my $basename = $self->filename;
$basename =~ s|\\|/|g;
$basename = ( File::Spec::Unix->splitpath($basename) )[2];
$basename =~ s|[^\w\.-]+|_|g;
return $basename;
}
sub copy_to {
my $self = shift;
return File::Copy::copy( $self->tempname, @_ );
}
sub link_to {
my ( $self, $target ) = @_;
return CORE::link( $self->tempname, $target );
}
sub slurp {
my ( $self, $layer ) = @_;
unless ($layer) {
$layer = ':raw';
}
my $content = undef;
my $handle = $self->fh;
binmode( $handle, $layer );
while ( $handle->sysread( my $buffer, 8192 ) ) {
$content .= $buffer;
}
return $content;
}
}
{
package My::Form::Upload;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has '+enctype' => ( default => 'multipart/form-data');
has_field 'file' => ( type => 'Upload' );
has_field 'submit' => ( type => 'Submit', value => 'Upload' );
}
my $form = My::Form::Upload->new;
ok( $form, 'created form with upload field' );
is_html( $form->field('file')->render, '
',
'renders ok' );
my $upload = Mock::Upload->new( filename => 'test.txt', size => 1024 );
$form->process( params => { file => $upload } );
ok( $form->validated, 'form validated' );
$upload->size( 20000000 );
$form->process( params => { file => $upload } );
ok( !$form->validated, 'form did not validate' );
# file exists, is empty
`touch temp.txt`;
open ( my $fh, '>', 'temp.txt' );
$form->process( params => { file => $fh } );
my @errors = $form->errors;
is( $errors[0], 'File uploaded is empty', 'empty file fails' );
# file exists, is not empty
print {$fh} "testing\n";
close( $fh );
open ( $fh, '<', 'temp.txt' );
$form->process( params => { file => $fh } );
ok( $form->validated, 'form validated' );
# file doesn't exist
$form->process( params => { file => 'not_there.txt' } );
@errors = $form->errors;
is( $errors[0], 'File not found for upload field', 'error when file does not exist' );
unlink('temp.txt');
{
package My::Form::Upload::NoSize;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has '+enctype' => ( default => 'multipart/form-data');
has_field 'file' => ( type => 'Upload', min_size => undef, max_size => undef );
has_field 'submit' => ( type => 'Submit', value => 'Upload' );
}
$form = My::Form::Upload::NoSize->new;
$upload = Mock::Upload->new( filename => 'test.txt', size => 4000000 );
$form->process( params => { file => $upload } );
ok( $form->validated, 'form validated with no size limit' );
done_testing;
Makefile.PL 100644 000770 000024 6111 13134157564 16434 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.010.
use strict;
use warnings;
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 forms using Moose",
"AUTHOR" => "FormHandler Contributors - see HTML::FormHandler",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => 0,
"File::ShareDir::Install" => "0.06"
},
"DISTNAME" => "HTML-FormHandler",
"LICENSE" => "perl",
"NAME" => "HTML::FormHandler",
"PREREQ_PM" => {
"Carp" => 0,
"Class::Load" => "0.06",
"Crypt::Blowfish" => 0,
"Crypt::CBC" => 0,
"Data::Clone" => 0,
"DateTime" => 0,
"DateTime::Format::Strptime" => 0,
"Email::Valid" => 0,
"File::ShareDir" => 0,
"File::Spec" => 0,
"HTML::Entities" => 0,
"HTML::TreeBuilder" => "3.23",
"JSON::MaybeXS" => "1.003003",
"List::Util" => "1.33",
"Locale::Maketext" => "1.09",
"MIME::Base64" => 0,
"Moose" => "2.1403",
"MooseX::Getopt" => "0.16",
"MooseX::Types" => "0.20",
"MooseX::Types::Common" => 0,
"MooseX::Types::LoadableClass" => "0.006",
"Sub::Exporter" => 0,
"Sub::Name" => 0,
"Try::Tiny" => 0,
"aliased" => 0,
"namespace::autoclean" => "0.09"
},
"TEST_REQUIRES" => {
"PadWalker" => 0,
"Test::Differences" => 0,
"Test::Exception" => 0,
"Test::Memory::Cycle" => "1.04",
"Test::More" => "0.94",
"Test::Warn" => 0
},
"VERSION" => "0.40068",
"test" => {
"TESTS" => "t/*.t t/blocks/*.t t/bootstrap/*.t t/bootstrap3/*.t t/compound/*.t t/errors/*.t t/field_setup/*.t t/fields/*.t t/form_setup/*.t t/infl_defl/*.t t/moose/*.t t/render/*.t t/repeatable/*.t t/result/*.t t/validation/*.t t/wizard/*.t"
}
);
my %FallbackPrereqs = (
"Carp" => 0,
"Class::Load" => "0.06",
"Crypt::Blowfish" => 0,
"Crypt::CBC" => 0,
"Data::Clone" => 0,
"DateTime" => 0,
"DateTime::Format::Strptime" => 0,
"Email::Valid" => 0,
"File::ShareDir" => 0,
"File::Spec" => 0,
"HTML::Entities" => 0,
"HTML::TreeBuilder" => "3.23",
"JSON::MaybeXS" => "1.003003",
"List::Util" => "1.33",
"Locale::Maketext" => "1.09",
"MIME::Base64" => 0,
"Moose" => "2.1403",
"MooseX::Getopt" => "0.16",
"MooseX::Types" => "0.20",
"MooseX::Types::Common" => 0,
"MooseX::Types::LoadableClass" => "0.006",
"PadWalker" => 0,
"Sub::Exporter" => 0,
"Sub::Name" => 0,
"Test::Differences" => 0,
"Test::Exception" => 0,
"Test::Memory::Cycle" => "1.04",
"Test::More" => "0.94",
"Test::Warn" => 0,
"Try::Tiny" => 0,
"aliased" => 0,
"namespace::autoclean" => "0.09"
);
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);
}
template.t 100644 000770 000024 375 13134157564 16713 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/t use strict;
use warnings;
use Test::More;
{
package MyApp::Form::Test;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has_field 'foo';
has_field 'bar';
}
my $form = MyApp::Form::Test->new;
ok( $form );
done_testing;
captcha.t 100644 000770 000024 4647 13134157564 16721 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/xt use strict;
use warnings;
use Test::More;
use HTML::FormHandler::Test;
BEGIN {
eval "use GD::SecurityImage";
plan skip_all => 'GD::SecurityImage required' if $@;
}
use_ok( 'HTML::FormHandler::Field::Captcha' );
{
package Test::Captcha;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
with 'HTML::FormHandler::TraitFor::Captcha';
with 'HTML::FormHandler::Render::Simple';
has_field 'some_field';
has_field 'subject';
has_field '+captcha' => ( id => 'captcha', wrapper_class => 'captcha' );
sub validate_subject {
my ( $self, $field ) = @_;
$field->add_error("Incorrect")
unless $field->value eq 'Correct';
}
}
{
package Mock::Ctx;
use Moose;
has '_session' => ( isa => 'HashRef', is => 'rw', builder => 'build_session' );
sub build_session {{}}
sub session {
my $self = shift;
my $session = $self->_session;
if (@_) {
my $new_values = @_ > 1 ? { @_ } : $_[0];
croak('session takes a hash or hashref') unless ref $new_values;
for my $key (keys %$new_values) {
$session->{$key} = $new_values->{$key};
}
}
$session;
}
}
my $ctx = Mock::Ctx->new;
ok( $ctx, 'get mock ctx' );
my $form = Test::Captcha->new( ctx => $ctx );
ok( $form, 'get form' );
my $rnd = $ctx->session->{captcha}->{rnd};
ok( $rnd, 'captcha is in session' );
my $params = { some_field => 'test', subject => 'Correct', captcha => '1234' };
$form->process( ctx => $ctx, params => $params );
ok( !$form->validated, 'form did not validate with wrong captcha');
my $rnd2 = $ctx->session->{captcha}->{rnd};
ok( $rnd ne $rnd2, 'we now have a different captcha');
ok( !$form->field('captcha')->fif, 'no fif for captcha' );
$params->{captcha} = $rnd2;
$params->{subject} = 'Incorrect';
$form->process( ctx => $ctx, params => $params );
# valid captcha, invalid subject
ok( !$form->validated, 'form did not validate: valid captcha, invalid field' );
ok( $rnd2 == $ctx->session->{captcha}->{rnd}, 'captcha has not changed' );
$params->{subject} = 'Correct';
$form->process( ctx => $ctx, params => $params );
ok( $form->validated, 'form validated; old captcha, valid fields' );
my $render = $form->render_field('captcha');
is_html( $render, '
', 'captcha renders ok' );
done_testing;
display.t 100644 000770 000024 2414 13134157564 16751 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/xt use strict;
use warnings;
use Test::More;
{
package Test::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has_field 'foo';
has_field 'bar' => ( type => 'Display' );
has_field 'baz' => ( type => 'Display' );
sub html_bar {
my ( $self, $field ) = @_;
my $html = '
My Bar:&nbps;' . $field->value . '
';
return $html;
}
sub html_baz {
my ( $self, $field ) = @_;
my $html = '
My Baz:&nbps;' . $field->value . '
';
return $html;
}
}
my $form = Test::Form->new;
my $init_obj = {
foo => 'we have a foo',
bar => '...and a bar...',
baz => '...and a baz!!',
};
$form->process( init_object => $init_obj, params => {} );
my $rendered = $form->render;
like( $rendered, qr/and a bar/, 'value for display field renders' );
like( $rendered, qr/and a baz!!/, 'value for display field renders' );
# testing
$form->process( init_object => $init_obj, params => { foo => 'new foo' } );
$rendered = $form->render;
like( $rendered, qr/and a bar/, 'value for display field still renders' );
is_deeply( $form->value, { foo => 'new foo' }, 'value for form is correct' );
is_deeply( $form->fif, { foo => 'new foo' }, 'fif for form is correct' );
done_testing;
mb_form.t 100644 000770 000024 4644 13134157564 16734 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/xt use strict;
use warnings;
use Test::More;
{
package Hello::Form::Page;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has '+html_prefix' => ( default => 0 );
has_field 'wizard_session_id' => ( type => 'Hidden' );
has_field 'cancel' => ( type => 'Submit', value => "Cancel" );
has_field 'prev' => ( type => 'Submit', value => "Prev" );
has_field 'next' => ( type => 'Submit', value => "Next" );
}
{
package Hello::Form::Page2;
use HTML::FormHandler::Moose;
extends 'Hello::Form::Page';
has_field 'organization' => ( type => 'Text' );
has_field 'mediums' => ( type => 'Repeatable', num_when_empty => 0 );
has_field 'mediums.id' => ( type => 'Integer' );
has_field 'mediums.tracklist' => ( type => 'Compound' );
has_field 'mediums.tracklist.id' => ( type => 'Integer' );
has_field 'mediums.tracklist.tracks' => ( type => 'Repeatable', num_when_empty => 0 );
has_field 'mediums.tracklist.tracks.id' => ( type => 'Integer' );
}
my $form = Hello::Form::Page2->new;
ok( $form, 'form builds ok' );
diag( $form->peek );
diag( $form->result->peek );
my $init_obj = {
mediums => [
{
id => 1,
tracklist => {
id => 10,
tracks => [
{ id => 100 },
{ id => 200 },
],
},
},
{
id => 2,
tracklist => {
id => 20,
tracks => [
{ id => 300 },
{ id => 400 },
],
},
},
]
};
my $extra_values = {
'next' => 'Next',
cancel => 'Cancel',
organization => undef,
prev => 'Prev',
wizard_session_id => undef,
};
$form->process( init_object => $init_obj );
diag( $form->peek );
diag( $form->result->peek );
my $value = $form->value;
is_deeply( $value, { %$init_obj, %$extra_values}, 'right values' );
my $good_fif = {
'mediums.0.id' => 1,
'mediums.0.tracklist.id' => 10,
'mediums.0.tracklist.tracks.0.id' => 100,
'mediums.0.tracklist.tracks.1.id' => 200,
'mediums.1.id' => 2,
'mediums.1.tracklist.id' => 20,
'mediums.1.tracklist.tracks.0.id' => 300,
'mediums.1.tracklist.tracks.1.id' => 400,
'organization' => '',
'wizard_session_id' => '',
};
my $fif = $form->fif;
is_deeply( $fif, $good_fif, 'fif is right' );
$form->process( $fif );
done_testing;
render 000755 000770 000024 0 13134157564 16045 5 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/t ff.t 100644 000770 000024 4374 13134157564 16775 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/t/render use strict;
use warnings;
use Test::More;
use HTML::FormHandler::Test;
{
package HTML::FormHandler::Render::FFTheme;
use Moose::Role;
sub build_update_subfields {{ all => { tags => { no_wrapped_label => 1 } } }}
sub html_attributes {
my ( $self, $field, $type, $attr ) = @_;
my $class = $attr->{class} || [];
if( $type eq 'wrapper' ) {
# this is not exactly like what FF does, but it's close
push @$class, $field->type_attr;
push @$class, 'label' if $field->do_label;
$attr->{class} = $class;
}
return $attr;
}
}
{
package Test::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
with 'HTML::FormHandler::Render::FFTheme';
has '+name' => ( default => 'test_form' );
has '+action' => ( default => '/form' );
has_field 'user' => ( label => 'Username' );
has_field 'pass' => ( type => 'Password', label => 'Password' );
has_field 'opt_in' => ( type => 'Checkbox',
label => 'Opt in?',
);
has_field 'choose' => ( type => 'Select',
label => 'Choose some',
options => [ { label => 'blue', value => 1 }, { label => 'red', value => 2 }] );
has_field 'submit' => ( type => 'Submit', value => "Save" );
}
my $expected =
'';
my $form = Test::Form->new;
$form->process;
my $rendered = $form->render;
is_html($rendered, $expected, 'renders ok' );
done_testing;
util 000755 000770 000024 0 13134157564 15300 5 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068 messages 100644 000770 000024 11127 13134157564 17214 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/util [
{
'Field' => {
'error_occurred' => 'error occurred',
'range_incorrect' => 'Value must be between [_1] and [_2]',
'required' => '[_1] field is required',
'range_too_high' => 'Value must be less than or equal to [_1]',
'range_too_low' => 'Value must be greater than or equal to [_1]',
'unique' => 'Duplicate value for [_1]',
'wrong_value' => 'Wrong value',
'no_match' => '[_1] does not match',
'not_allowed' => '[_1] not allowed',
'field_invalid' => 'field is invalid'
}
},
{
'Types' => {
'SimpleStr' => 'Must be a single line of no more than 255 chars',
'NegativeNum' => 'Must be a negative number',
'Zip' => 'Zip is not valid',
'Email' => 'Email is not valid',
'Password' => 'Must be between 4 and 255 chars',
'NotAllDigits' => 'Must not be all digits',
'IPAddress' => 'Not a valid IP address',
'PositiveInt' => 'Must be a positive integer',
'NonEmptyStr' => 'Must not be empty',
'State' => 'Not a valid state',
'StrongPassword' => 'Must be between 8 and 255 chars, and contain a non-alpha char',
'NoSpaces' => 'Must not contain spaces',
'NegativeInt' => 'Must be a negative integer',
'SingleDigit' => 'Must be a single digit',
'SingleWord' => 'Field must contain a single word',
'PrintableAndNewline' => 'Field contains non-printable characters',
'NonEmptySimpleStr' => 'Must be a non-empty single line of no more than 255 chars',
'Printable' => 'Field contains non-printable characters',
'WordChars' => 'Must be made up of letters, digits, and underscores',
'PositiveNum' => 'Must be a positive number'
}
},
{
'Date' => {
'date_late' => 'Date is too late',
'date_early' => 'Date is too early'
}
},
{
'DateTime' => {
'datetime_invalid' => 'Not a valid DateTime'
}
},
{
'Duration' => {
'duration_invalid' => 'Invalid value for [_1]: [_2]'
}
},
{
'Email' => {
'email_format' => 'Email should be of the format [_1]'
}
},
{
'Float' => {
'float_precision' => 'May have a maximum of [quant,_1,digit] after the decimal point, but has [_2]',
'float_needed' => 'Must be a number. May contain numbers, +, - and decimal separator \'[_1]\'',
'float_size' => 'Total size of number must be less than or equal to [_1], but is [_2]'
}
},
{
'Integer' => {
'integer_needed' => 'Value must be an integer'
}
},
{
'Money' => {
'money_convert' => 'Value cannot be converted to money',
'money_real' => 'Value must be a real number'
}
},
{
'Password' => {
'password_ne_username' => 'Password must not match [_1]',
'required' => 'Please enter a password in this field'
}
},
{
'PasswordConf' => {
'required' => 'Please enter a password confirmation',
'pass_conf_not_matched' => 'The password confirmation does not match the password'
}
},
{
'PosInteger' => {
'integer_positive' => 'Value must be a positive integer'
}
},
{
'Select' => {
'select_invalid_value' => '\'[_1]\' is not a valid value',
'select_not_multiple' => 'This field does not take multiple values'
}
},
{
'Text' => {
'text_minlength' => 'Field must be at least [quant,_1,character]. You entered [_2]',
'multiple_values_disallowed' => 'Field must contain a single value',
'text_maxlength' => 'Field should not exceed [quant,_1,character]. You entered [_2]'
}
},
{
'Upload' => {
'upload_file_too_big' => 'File is too big (> [_1] bytes)',
'upload_file_too_small' => 'File is too small (< [_1] bytes)',
'upload_file_not_found' => 'File not found for upload field',
'upload_file_empty' => 'File uploaded is empty'
}
}
]
captcha2.t 100644 000770 000024 2754 13134157564 17000 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/xt use strict;
use warnings;
use lib 'xt/lib/';
# HFH::TraitFor::Captcha and HFH::Field::Captcha do not work with current
# versions of Catalyst.
#
# The reason seems to be that get_captcha and set_captcha use
# $form->ctx->{session} directly, instead of using the accessor
# $from->ctx->session.
#
# I am not sure if this works with older versions of Catalyst, but it is
# definitely broken when using Catalyst 5.90007
#
# I have attached a simple test.
#
# The patch makes get_captcha and set_captcha using the session-accessor
# IF $form->ctx has one. (if it is a catalyst context). Otherwise, the old
# behaviour will not change. The module should still work with
# non-catalyst applications.
use Test::More;
my @missing;
eval" use Test::WWW::Mechanize::Catalyst; ";
if($@){
push @missing, "Test::WWW::Mechanize";
}
eval" use GD::SecurityImage; ";
if($@){
push @missing, "GD::SecurityImage";
}
if(@missing){
plan skip_all => "The following Modules are required to run this test: " . join ", ", @missing;
}
else{
plan tests => 7;
}
my $mech = Test::WWW::Mechanize::Catalyst->new(catalyst_app => "MyCatalystApp");
$mech->get_ok("/captcha");
#diag explain $mech;
$mech->content_contains('');
$mech->get_ok("/captcha/get_rnd");
my $rnd = $mech->content;
$mech->get_ok("/captcha/image");
is $mech->res->content_type, "image/png";
$mech->get_ok("/captcha?captcha=$rnd");
$mech->content_is("verification succeeded");
done_testing;
exit;
structured.t 100644 000770 000024 10574 13134157564 17346 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/t use strict;
use warnings;
use Test::More;
my $struct = {
username => 'Joe Blow',
occupation => 'Programmer',
tags => ['Perl', 'programming', 'Moose' ],
employer => {
name => 'TechTronix',
country => 'Utopia',
},
options => {
flags => {
opt_in => 1,
email => 0,
},
cc_cards => [
{
type => 'Visa',
number => '4248999900001010',
},
{
type => 'MasterCard',
number => '4335992034971010',
},
],
},
addresses => [
{
street => 'First Street',
city => 'Prime City',
country => 'Utopia',
id => 0,
},
{
street => 'Second Street',
city => 'Secondary City',
country => 'Graustark',
id => 1,
},
{
street => 'Third Street',
city => 'Tertiary City',
country => 'Atlantis',
id => 2,
}
]
};
{
package Structured::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has_field 'username';
has_field 'occupation';
has_field 'tags' => ( type => 'Repeatable' );
has_field 'tags.contains' => ( type => 'Text' );
has_field 'employer' => ( type => 'Compound' );
has_field 'employer.name';
has_field 'employer.country';
has_field 'options' => ( type => 'Compound' );
has_field 'options.flags' => ( type => 'Compound' );
has_field 'options.flags.opt_in' => ( type => 'Boolean' );
has_field 'options.flags.email' => ( type => 'Boolean' );
has_field 'options.cc_cards' => ( type => 'Repeatable' );
has_field 'options.cc_cards.type';
has_field 'options.cc_cards.number';
has_field 'addresses' => ( type => 'Repeatable' );
has_field 'addresses.street';
has_field 'addresses.city';
has_field 'addresses.country';
has_field 'addresses.id';
}
#===========
# test structured params
my $form = Structured::Form->new;
ok( $form, 'form created' );
$form->process( params => $struct );
is( $form->result->num_results, 6, 'correct number of results' );
ok( $form->validated, 'form validated');
is_deeply( $form->field('tags')->value, ['Perl', 'programming', 'Moose' ],
'list field tags has right values' );
is( $form->field('addresses.0.city')->value, 'Prime City', 'get address field OK' );
is( $form->field('options.flags.opt_in')->value, 1, 'get opt_in flag');
#============
# test structured init_object/item
my $form2 = Structured::Form->new;
ok( $form2, 'form created' );
$form2->process( init_object => $struct, params => {} );
is( $form2->result->num_results, 6, 'correct number of results' );
ok( !$form2->validated, 'form validated');
is_deeply( $form2->field('employer')->item, { name => 'TechTronix', country => 'Utopia', }, 'has item');
is_deeply( $form2->field('addresses')->item, $struct->{addresses}, 'item for repeatable' );
#=============
my $fif = {
'addresses.0.city' => 'Prime City',
'addresses.0.country' => 'Utopia',
'addresses.0.id' => 0,
'addresses.0.street' => 'First Street',
'addresses.1.city' => 'Secondary City',
'addresses.1.country' => 'Graustark',
'addresses.1.id' => 1,
'addresses.1.street' => 'Second Street',
'addresses.2.city' => 'Tertiary City',
'addresses.2.country' => 'Atlantis',
'addresses.2.id' => 2,
'addresses.2.street' => 'Third Street',
'employer.country' => 'Utopia',
'employer.name' => 'TechTronix',
'occupation' => 'Programmer',
'options.cc_cards.0.number' => '4248999900001010',
'options.cc_cards.0.type' => 'Visa',
'options.cc_cards.1.number' => '4335992034971010',
'options.cc_cards.1.type' => 'MasterCard',
'options.flags.email' => 0,
'options.flags.opt_in' => 1,
'tags.0' => 'Perl',
'tags.1' => 'programming',
'tags.2' => 'Moose',
'username' => 'Joe Blow'
};
#=========
is_deeply( $form->fif, $fif, 'fif is correct' );
$form->process( $fif );
ok( $form->validated, 'form processed from fif' );
is_deeply( $form->values, $struct, 'values round-tripped from fif');
#=========
# works with item and params
$form2->process( item => $struct, params => $fif );
ok( $form2->validated, 'form processed from fif' );
is( $form2->result->num_results, 6, 'correct number of results' );
is_deeply( $form2->field('employer')->item, { name => 'TechTronix', country => 'Utopia', }, 'has item');
is_deeply( $form2->field('addresses')->item, $struct->{addresses}, 'item for repeatable' );
done_testing;
var 000755 000770 000024 0 13134157564 15356 5 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/t form1.pl 100644 000770 000024 610 13134157564 17054 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/t/var {
action => '/login',
field_list => [
{ type => 'Text',
name => 'user',
label => 'Username',
required => 1,
},
{ type => 'Password',
name => 'pass',
label => 'Password',
required => 1,
},
{ type => 'Submit',
name => 'submit',
value => 'Login',
},
],
}
add_field.t 100644 000770 000024 1352 13134157564 17177 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/xt use Test::More tests => 2;
use HTML::FormHandler::Field::Text;
use HTML::FormHandler::Field;
{
package My::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has '+name' => ( default => 'testform' );
sub field_list {
[
meat => 'Text',
starch => { required => 1 },
fruit => 'Select',
]
}
sub options_fruit {
return (
1 => 'apples',
2 => 'oranges',
3 => 'kiwi',
);
}
}
my $form = My::Form->new;
ok( $form, 'get form' );
my $field = HTML::FormHandler::Field::Text->new( name => 'Testfield' );
$form->push_field($field);
ok( $form->field('Testfield'), 'form now has test field' );
author-eol.t 100644 000770 000024 30505 13134157564 17215 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/t
BEGIN {
unless ($ENV{AUTHOR_TESTING}) {
print qq{1..0 # SKIP these tests are for testing by the author\n};
exit
}
}
use 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/FormHandler.pm',
'lib/HTML/FormHandler/Base.pm',
'lib/HTML/FormHandler/Blocks.pm',
'lib/HTML/FormHandler/BuildFields.pm',
'lib/HTML/FormHandler/BuildPages.pm',
'lib/HTML/FormHandler/Field.pm',
'lib/HTML/FormHandler/Field/AddElement.pm',
'lib/HTML/FormHandler/Field/BoolSelect.pm',
'lib/HTML/FormHandler/Field/Boolean.pm',
'lib/HTML/FormHandler/Field/Button.pm',
'lib/HTML/FormHandler/Field/Captcha.pm',
'lib/HTML/FormHandler/Field/Checkbox.pm',
'lib/HTML/FormHandler/Field/Compound.pm',
'lib/HTML/FormHandler/Field/Date.pm',
'lib/HTML/FormHandler/Field/DateMDY.pm',
'lib/HTML/FormHandler/Field/DateTime.pm',
'lib/HTML/FormHandler/Field/Display.pm',
'lib/HTML/FormHandler/Field/Duration.pm',
'lib/HTML/FormHandler/Field/Email.pm',
'lib/HTML/FormHandler/Field/File.pm',
'lib/HTML/FormHandler/Field/Float.pm',
'lib/HTML/FormHandler/Field/Hidden.pm',
'lib/HTML/FormHandler/Field/Hour.pm',
'lib/HTML/FormHandler/Field/IntRange.pm',
'lib/HTML/FormHandler/Field/Integer.pm',
'lib/HTML/FormHandler/Field/Minute.pm',
'lib/HTML/FormHandler/Field/Money.pm',
'lib/HTML/FormHandler/Field/Month.pm',
'lib/HTML/FormHandler/Field/MonthDay.pm',
'lib/HTML/FormHandler/Field/MonthName.pm',
'lib/HTML/FormHandler/Field/Multiple.pm',
'lib/HTML/FormHandler/Field/Nested.pm',
'lib/HTML/FormHandler/Field/NoValue.pm',
'lib/HTML/FormHandler/Field/NonEditable.pm',
'lib/HTML/FormHandler/Field/Password.pm',
'lib/HTML/FormHandler/Field/PasswordConf.pm',
'lib/HTML/FormHandler/Field/PosInteger.pm',
'lib/HTML/FormHandler/Field/PrimaryKey.pm',
'lib/HTML/FormHandler/Field/Repeatable.pm',
'lib/HTML/FormHandler/Field/Repeatable/Instance.pm',
'lib/HTML/FormHandler/Field/RequestToken.pm',
'lib/HTML/FormHandler/Field/Reset.pm',
'lib/HTML/FormHandler/Field/Result.pm',
'lib/HTML/FormHandler/Field/RmElement.pm',
'lib/HTML/FormHandler/Field/Role/RequestToken.pm',
'lib/HTML/FormHandler/Field/Second.pm',
'lib/HTML/FormHandler/Field/Select.pm',
'lib/HTML/FormHandler/Field/SelectCSV.pm',
'lib/HTML/FormHandler/Field/Submit.pm',
'lib/HTML/FormHandler/Field/Text.pm',
'lib/HTML/FormHandler/Field/TextArea.pm',
'lib/HTML/FormHandler/Field/TextCSV.pm',
'lib/HTML/FormHandler/Field/Upload.pm',
'lib/HTML/FormHandler/Field/Weekday.pm',
'lib/HTML/FormHandler/Field/Year.pm',
'lib/HTML/FormHandler/Fields.pm',
'lib/HTML/FormHandler/Foo.pm',
'lib/HTML/FormHandler/I18N.pm',
'lib/HTML/FormHandler/I18N/ar_kw.pm',
'lib/HTML/FormHandler/I18N/bg_bg.pm',
'lib/HTML/FormHandler/I18N/ca_es.pm',
'lib/HTML/FormHandler/I18N/cs_cz.pm',
'lib/HTML/FormHandler/I18N/de_de.pm',
'lib/HTML/FormHandler/I18N/en_us.pm',
'lib/HTML/FormHandler/I18N/es_es.pm',
'lib/HTML/FormHandler/I18N/hu_hu.pm',
'lib/HTML/FormHandler/I18N/it_it.pm',
'lib/HTML/FormHandler/I18N/ja_jp.pm',
'lib/HTML/FormHandler/I18N/pt_br.pm',
'lib/HTML/FormHandler/I18N/ru_ru.pm',
'lib/HTML/FormHandler/I18N/sv_se.pm',
'lib/HTML/FormHandler/I18N/tr_tr.pm',
'lib/HTML/FormHandler/I18N/ua_ua.pm',
'lib/HTML/FormHandler/InitResult.pm',
'lib/HTML/FormHandler/Manual.pod',
'lib/HTML/FormHandler/Manual/Catalyst.pod',
'lib/HTML/FormHandler/Manual/Cookbook.pod',
'lib/HTML/FormHandler/Manual/Database.pod',
'lib/HTML/FormHandler/Manual/Defaults.pod',
'lib/HTML/FormHandler/Manual/Errors.pod',
'lib/HTML/FormHandler/Manual/Fields.pod',
'lib/HTML/FormHandler/Manual/FromDFV.pod',
'lib/HTML/FormHandler/Manual/FromFF.pod',
'lib/HTML/FormHandler/Manual/InflationDeflation.pod',
'lib/HTML/FormHandler/Manual/Intro.pod',
'lib/HTML/FormHandler/Manual/Reference.pod',
'lib/HTML/FormHandler/Manual/Rendering.pod',
'lib/HTML/FormHandler/Manual/RenderingCookbook.pod',
'lib/HTML/FormHandler/Manual/Templates.pod',
'lib/HTML/FormHandler/Manual/Testing.pod',
'lib/HTML/FormHandler/Manual/Tutorial.pod',
'lib/HTML/FormHandler/Manual/Validation.pod',
'lib/HTML/FormHandler/Merge.pm',
'lib/HTML/FormHandler/Meta/Role.pm',
'lib/HTML/FormHandler/Model.pm',
'lib/HTML/FormHandler/Model/CDBI.pm',
'lib/HTML/FormHandler/Model/Object.pm',
'lib/HTML/FormHandler/Moose.pm',
'lib/HTML/FormHandler/Moose/Role.pm',
'lib/HTML/FormHandler/Page.pm',
'lib/HTML/FormHandler/Page/Simple.pm',
'lib/HTML/FormHandler/Pages.pm',
'lib/HTML/FormHandler/Params.pm',
'lib/HTML/FormHandler/Render/RepeatableJs.pm',
'lib/HTML/FormHandler/Render/Simple.pm',
'lib/HTML/FormHandler/Render/Table.pm',
'lib/HTML/FormHandler/Render/Util.pm',
'lib/HTML/FormHandler/Render/WithTT.pm',
'lib/HTML/FormHandler/Result.pm',
'lib/HTML/FormHandler/Result/Role.pm',
'lib/HTML/FormHandler/Test.pm',
'lib/HTML/FormHandler/TraitFor/Captcha.pm',
'lib/HTML/FormHandler/TraitFor/I18N.pm',
'lib/HTML/FormHandler/TraitFor/Types.pm',
'lib/HTML/FormHandler/Traits.pm',
'lib/HTML/FormHandler/Types.pm',
'lib/HTML/FormHandler/Validate.pm',
'lib/HTML/FormHandler/Widget/ApplyRole.pm',
'lib/HTML/FormHandler/Widget/Block.pm',
'lib/HTML/FormHandler/Widget/Block/Bootstrap.pm',
'lib/HTML/FormHandler/Widget/Field/Button.pm',
'lib/HTML/FormHandler/Widget/Field/ButtonTag.pm',
'lib/HTML/FormHandler/Widget/Field/Captcha.pm',
'lib/HTML/FormHandler/Widget/Field/Checkbox.pm',
'lib/HTML/FormHandler/Widget/Field/CheckboxGroup.pm',
'lib/HTML/FormHandler/Widget/Field/Compound.pm',
'lib/HTML/FormHandler/Widget/Field/Hidden.pm',
'lib/HTML/FormHandler/Widget/Field/HorizCheckboxGroup.pm',
'lib/HTML/FormHandler/Widget/Field/NoRender.pm',
'lib/HTML/FormHandler/Widget/Field/Password.pm',
'lib/HTML/FormHandler/Widget/Field/RadioGroup.pm',
'lib/HTML/FormHandler/Widget/Field/Repeatable.pm',
'lib/HTML/FormHandler/Widget/Field/Reset.pm',
'lib/HTML/FormHandler/Widget/Field/Role/HTMLAttributes.pm',
'lib/HTML/FormHandler/Widget/Field/Role/SelectedOption.pm',
'lib/HTML/FormHandler/Widget/Field/Select.pm',
'lib/HTML/FormHandler/Widget/Field/Span.pm',
'lib/HTML/FormHandler/Widget/Field/Submit.pm',
'lib/HTML/FormHandler/Widget/Field/Text.pm',
'lib/HTML/FormHandler/Widget/Field/Textarea.pm',
'lib/HTML/FormHandler/Widget/Field/Upload.pm',
'lib/HTML/FormHandler/Widget/Form/Role/HTMLAttributes.pm',
'lib/HTML/FormHandler/Widget/Form/Simple.pm',
'lib/HTML/FormHandler/Widget/Form/Table.pm',
'lib/HTML/FormHandler/Widget/Theme/Bootstrap.pm',
'lib/HTML/FormHandler/Widget/Theme/Bootstrap3.pm',
'lib/HTML/FormHandler/Widget/Theme/BootstrapFormMessages.pm',
'lib/HTML/FormHandler/Widget/Wrapper/Base.pm',
'lib/HTML/FormHandler/Widget/Wrapper/Bootstrap.pm',
'lib/HTML/FormHandler/Widget/Wrapper/Bootstrap3.pm',
'lib/HTML/FormHandler/Widget/Wrapper/Fieldset.pm',
'lib/HTML/FormHandler/Widget/Wrapper/None.pm',
'lib/HTML/FormHandler/Widget/Wrapper/Simple.pm',
'lib/HTML/FormHandler/Widget/Wrapper/SimpleInline.pm',
'lib/HTML/FormHandler/Widget/Wrapper/Table.pm',
'lib/HTML/FormHandler/Widget/Wrapper/TableInline.pm',
'lib/HTML/FormHandler/Wizard.pm',
't/01app.t',
't/author-eol.t',
't/author-no-tabs.t',
't/basic.t',
't/blocks/basic.t',
't/blocks/block_list.t',
't/blocks/blocktags.t',
't/blocks/build_render_list_method.t',
't/blocks/loading.t',
't/blocks/nested.t',
't/blocks/render_units.t',
't/bootstrap/basic.t',
't/bootstrap/control_states.t',
't/bootstrap/controls.t',
't/bootstrap/ext_controls.t',
't/bootstrap/inline.t',
't/bootstrap/other.t',
't/bootstrap/search.t',
't/bootstrap3/basic.t',
't/bootstrap3/controls.t',
't/bootstrap3/horiz.t',
't/bootstrap3/horiz_checkboxgroup.t',
't/bootstrap3/inlinecheckboxes.t',
't/bootstrap3/layout_classes.t',
't/compound/basic.t',
't/compound/default.t',
't/compound/empty.t',
't/compound/include.t',
't/compound/select.t',
't/errors/basic.t',
't/errors/compound.t',
't/errors/form_messages.t',
't/errors/messages.t',
't/errors/req_message.t',
't/field_setup/checkbox.t',
't/field_setup/compound_update_fields.t',
't/field_setup/defaults.t',
't/field_setup/disabled.t',
't/field_setup/id.t',
't/field_setup/inactive.t',
't/field_setup/init_object.t',
't/field_setup/input_param.t',
't/field_setup/missing.t',
't/field_setup/plus_field.t',
't/field_setup/update_fields.t',
't/field_setup/update_subfields.t',
't/fields/dates.t',
't/fields/display.t',
't/fields/fields.t',
't/fields/float.t',
't/fields/formhandlerx.t',
't/fields/novalue.t',
't/fields/password.t',
't/fields/repeatable.t',
't/fields/request_token.t',
't/fields/select.t',
't/fields/select2.t',
't/fields/selectcsv.t',
't/fields/textcsv.t',
't/form_setup/api.t',
't/form_setup/clone.t',
't/form_setup/compound_field_list.t',
't/form_setup/config.t',
't/form_setup/dynamic.t',
't/form_setup/include.t',
't/form_setup/init_obj.t',
't/form_setup/no_update.t',
't/form_setup/posted.t',
't/form_setup/render_roles.t',
't/infl_defl/comp_field.t',
't/infl_defl/default.t',
't/infl_defl/defl_lives.t',
't/infl_defl/infl_defl.t',
't/infl_defl/infl_transform.t',
't/infl_defl/undef_deflation.t',
't/infl_defl/variations.t',
't/lib/BookDB/Form/Upload.pm',
't/lib/Field/Address.pm',
't/lib/Field/AltText.pm',
't/lib/Field/MyField.pm',
't/lib/Form/Address.pm',
't/lib/Form/AddressRole.pm',
't/lib/Form/Multiple.pm',
't/lib/Form/MultipleRole.pm',
't/lib/Form/NoExtForm.pm',
't/lib/Form/Person.pm',
't/lib/Form/PersonRole.pm',
't/lib/Form/Test.pm',
't/lib/Form/Two.pm',
't/lib/MyApp/Component/Section.pm',
't/lib/MyApp/I18N/abc_de.pm',
't/lib/Widget/Block/Test.pm',
't/lib/Widget/Field/Omega.pm',
't/lib/Widget/Field/TestWidget.pm',
't/memory_cycles.t',
't/moose/build_id.t',
't/moose/composed.t',
't/moose/field_traits.t',
't/moose/no_extend.t',
't/moose/subclass_roles.t',
't/render/actions.t',
't/render/array.t',
't/render/basic.t',
't/render/checkbox.t',
't/render/checkbox_group.t',
't/render/classes.t',
't/render/compound.t',
't/render/compound2.t',
't/render/display.t',
't/render/errors.t',
't/render/escaping.t',
't/render/ff.t',
't/render/filter.t',
't/render/form_errors.t',
't/render/get_tag.t',
't/render/html5_attributes.t',
't/render/html_attr.t',
't/render/html_attributes.t',
't/render/inline.t',
't/render/label.t',
't/render/noneditable.t',
't/render/optgroup.t',
't/render/radio_group.t',
't/render/rep_fieldset.t',
't/render/rep_wrapper.t',
't/render/repeatable.t',
't/render/result.t',
't/render/select.t',
't/render/simple.t',
't/render/submit.t',
't/render/table.t',
't/render/tags.t',
't/render/tt_render_elementx.t',
't/render/util.t',
't/render/widget_loading.t',
't/render/widget_tags.t',
't/render/widgets.t',
't/render/with_class.t',
't/render/withtt.t',
't/repeatable/defaults.t',
't/repeatable/empty.t',
't/repeatable/has_many.t',
't/repeatable/hash.t',
't/repeatable/js.t',
't/repeatable/list.t',
't/repeatable/nested.t',
't/repeatable/nested2.t',
't/repeatable/num_extra.t',
't/repeatable/reload.t',
't/repeatable/set_methods.t',
't/repeatable/subfield.t',
't/result/basic.t',
't/result/blocks.t',
't/result/compound.t',
't/result/errors.t',
't/result/repeatable.t',
't/structured.t',
't/template.t',
't/validation/apply.t',
't/validation/constraints.t',
't/validation/dependency.t',
't/validation/filters.t',
't/validation/reqwhen.t',
't/validation/type_tiny.t',
't/validation/types.t',
't/validation/validate_coderef.t',
't/validation/when.t',
't/var/form1.pl',
't/var/form1.yml',
't/wizard/basic.t'
);
eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files;
done_testing;
tags.t 100644 000770 000024 5044 13134157564 17333 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40068/t/render use strict;
use warnings;
use Test::More;
use HTML::FormHandler::Test;
{
package Test::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
sub build_form_tags {{
form_text => 'testing',
}}
sub build_update_subfields {{
all => { tags => { wrapper_tag => 'p', label_tag => 'span', } },
}}
has_field 'foo';
has_field 'bar';
has_field 'vax';
has_field 'multi' => ( type => 'Compound' );
has_field 'multi.one';
has_field 'multi.two';
has_field 'records' => ( type => 'Repeatable' );
has_field 'records.one';
has_field 'records.two';
sub html_attributes {
my ( $self, $field, $type, $attr ) = @_;
$attr->{class} = ['label'] if $type eq 'label';
return $attr;
}
}
my $form = Test::Form->new;
$form->process({});
my $rendered = $form->render;
unlike( $rendered, qr/fieldset/, 'no fieldset rendered' );
unlike( $rendered, qr/Foo: /, 'no colon in label' );
like( $rendered, qr/