The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Name

CatalystX::Usul::TraitFor::Model::QueryingRequest - Creates a query request object

Version

Describes v0.16.$Rev: 1 $

Synopsis

   package YourApp::Model::YourModel;

   extends q(CatalystX::Usul::Model);
   with    q(CatalystX::Usul::TraitFor::Model::QueryingRequest);

Description

Creates a CatalystX::Usul::QueryRequest object and on demand a Data::Validation object

Configuration and Environment

Requires; context and usul attributes

Defines the following attributes

query_attributes

Hash ref which defaults to { encoding => $_[ 0 ]->encoding }

query_class

Defaults to CatalystX::Usul::QueryRequest

query

An instance of CatalystX::Usul::QueryRequest

validator_class

Loadable class which defaults to Data::Validation

Subroutines/Methods

check_field

   $self->check_field( $id, $val );

Expose "check_field" in Data::Validation

check_field_wrapper

   $self->check_field_wrapper;

Extract parameters from the query and call "check_field". Stash the result

check_form

   $fields = $self->check_form( \%fields );

Expose "check_form" in Data::Validation

deserialize_request

   $request_body = $model_obj->deserialze_request;

Call the deserialize method on the current view

_build_query

   $query_request_object = $self->_build_query;

Create in instance of CatalystX::Usul::QueryRequest. Uses the current request object so this is called to instantiate the query attribute at the end of build_per_context_instance

Diagnostics

None

Dependencies

CatalystX::Usul::QueryRequest
Data::Validation
Moose::Role
TryCatch

Incompatibilities

There are no known incompatibilities in this module

Bugs and Limitations

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Acknowledgements

Larry Wall - For the Perl programming language

Author

Peter Flanigan, <Support at RoxSoft.co.uk>

License and Copyright

Copyright (c) 2014 Peter Flanigan. All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic

This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE