CatalystX::CRUD::Test::Form - mock form class for testing CatalystX::CRUD packages
package MyApp::Form::Foo; use strict; use base qw( CatalystX::CRUD::Test::Form ); sub foo_from_form { my $self = shift; return $self->SUPER::object_from_form(@_); } sub init_with_foo { my $self = shift; return $self->SUPER::init_with_object(@_); } 1;
CatalystX::CRUD::Test::Form is a mock form class for testing CatalystX::CRUD packages. The API is similar to Rose::HTML::Form, but implements very naive methods only.
Returns new object instance. args must be a hashref and must contain at least a key/value pair for fields.
Get/set the arrayref of field names.
This must be set in new().
An alias for fields().
Get/set the hashref of key/value pairs for the form object. The keys should be the names of form fields and should match the value of fields().
Sets the key/value pair for a field. key should be the name of a field, as indicated by params().
Placeholder only. Does nothing.
Resets params() to an empty hashref.
Does nothing. Always returns true.
You should override this method in your subclass. Basically sets all accessors in form equal to the equivalent value in object.
Returns the Form object.
You should override this method in your subclass. Basically sets all accessors in object equal to the equivalent value in form.
Wrapper around Data::Dump::dump. Returns the form object serialized.
Peter Karman, <perl at peknet.com>
<perl at peknet.com>
Please report any bugs or feature requests to bug-catalystx-crud at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CatalystX-CRUD. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-catalystx-crud at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc CatalystX::CRUD
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/CatalystX-CRUD
CPAN Ratings
http://cpanratings.perl.org/d/CatalystX-CRUD
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=CatalystX-CRUD
Search CPAN
http://search.cpan.org/dist/CatalystX-CRUD
Copyright 2008 Peter Karman, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install CatalystX::CRUD, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CatalystX::CRUD
CPAN shell
perl -MCPAN -e shell install CatalystX::CRUD
For more information on module installation, please visit the detailed CPAN module installation guide.