Catalyst::Controller::DBIC::API::StaticArguments - Provides controller level configuration arguments
version 2.006002
StaticArguments is a role that is composed by the controller to provide configuration parameters such as where to find specific elements in the request data and if to use JSON boolean types.
These attributes control requirements and limits to columns when creating or updating objects.
Each provides a number of handles:
"get_${var}_column" => 'get' "set_${var}_column" => 'set' "delete_${var}_column" => 'delete' "insert_${var}_column" => 'insert' "count_${var}_column" => 'count' "all_${var}_columns" => 'elements'
prefetch_allows limits what relations may be prefetched when executing searches with joins. This is necessary to avoid denial of service attacks in form of queries which would return a large number of data and unwanted disclosure of data.
Like the synopsis in DBIC::API shows, you can declare a "template" of what is allowed (by using an '*'). Each element passed in, will be converted into a Data::DPath and added to the validator.
prefetch_allows => [ 'cds', { cds => tracks }, { cds => producers } ] # to be explicit prefetch_allows => [ 'cds', { cds => '*' } ] # wildcard means the same thing
Controls how to reference 'count' in the the request_data, defaults to 'list_count'.
Controls how to reference 'page' in the the request_data, defaults to 'list_page'.
Controls how to reference 'offset' in the the request_data, defaults to 'list_offset'.
Controls how to reference 'select' in the the request_data, defaults to 'list_returns'.
Controls how to reference 'as' in the the request_data, defaults to 'as'.
Controls how to reference 'search' in the the request_data, defaults to 'search'.
Controls how to reference 'grouped_by' in the the request_data, defaults to 'list_grouped_by'.
Controls how to reference 'ordered_by' in the the request_data, defaults to 'list_ordered_by'.
Controls how to reference 'prefetch' in the the request_data, defaults to 'list_prefetch'.
Controls where in the stash the request_data should be stored, defaults to 'response'.
Controls how to reference where the data is in the the request_data, defaults to 'list'.
Controls how to reference where the data for single object requests is in the the request_data, defaults to 'data'.
Controls how to reference 'total_entries' in the the request_data, defaults to 'totalcount'.
Controls whether JSON boolean types are used in the success parameter of the response or if raw strings are used, defaults to false.
Controls whether the results of create/update are serialized and returned in the response, defaults to false.
Nicholas Perez <nperez@cpan.org>
Luke Saunders <luke.saunders@gmail.com>
Alexander Hartmaier <abraxxa@cpan.org>
Florian Ragwitz <rafl@debian.org>
Oleg Kostyuk <cub.uanic@gmail.com>
Samuel Kaufman <sam@socialflow.com>
This software is copyright (c) 2014 by Luke Saunders, Nicholas Perez, Alexander Hartmaier, et al..
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Catalyst::Controller::DBIC::API, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Controller::DBIC::API
CPAN shell
perl -MCPAN -e shell install Catalyst::Controller::DBIC::API
For more information on module installation, please visit the detailed CPAN module installation guide.