| CatalystX-Usul documentation | view source | Contained in the CatalystX-Usul distribution. |
CatalystX::Usul::Model - Application independent common model methods
0.3.$Revision: 589 $
package CatalystX::Usul; use parent qw(Catalyst::Component CatalystX::Usul::Base); package CatalystX::Usul::Model; use parent qw(CatalystX::Usul CatalystX::Usul::Utils); package YourApp::Model::YourModel; use parent qw(CatalystX::Usul::Model);
Common core model methods
Defines the following accessors:
The external command to execute to lock the display. Defaults to one that works with KDE as the window manager. Should move this to a plugin because its silly
Boolean used by query_array and query_value to determine if input value should be cleaned of potentially dangerous characters
List of characters to scrub from input values. Defaults to '"/\;
Loads model plugins including;
Calls build_per_context_instance for each new context
Called by ACCEPT_CONTEXT. Takes a copy of the Catalyst object so
that we don't have to pass $c into get_action in CatalystX::Usul,
localize in CatalystX::Usul and uri_for in CatalystX::Usul
$self->check_field( $id, $val );
$self->check_form( \%fields );
$self->form( @rest );
Calls the form method to stuff the stash with the data for the
requested form. Uses the $c->stash->{form}->{name} value to
construct the method name
$local_text = $self->localize( $message, $args );
Localizes the message. Optionally calls markdown on the text
Locks the display by running the external screensaver command
Returns the requested parameter in a list context. Uses the encoding attribute to generate the method call to decode the input values. The decode method is provided by CatalystX::Usul::Encoding. Will try to guess the encoding if one is not provided
Returns the requested parameter in a scalar context. Uses encoding attribute to generate the method call to decode the input value. The decode method is provided by CatalystX::Usul::Encoding. Will try to guess the encoding if one is not provided
$value = $self->scrub( $value );
Removes the $self->scrub_chars from the value
$uri = $self->uri_for( $action_path, @args );
Provide defaults for the Catalyst uri_for method. Search for the uri
with differing numbers of capture args
my $array_ref = $self->_get_req_array( $field );
Takes a request object that must implement a params method which
returns a hash ref. The method returns the value for $field from
that hash. This method will always return a array ref. This method is
wrapped by Catalystx::Usul::Encoding::mk_encoding_methods
and as such is not called directly
my $value = $self->_get_req_value( $field );
Takes a request object that must implement a params method which
returns a hash ref. The method returns the value for $field from
that hash. This method will always return a scalar. This method is
wrapped by Catalystx::Usul::Encoding::mk_encoding_methods
and as such is not called directly
None
None
There are no known incompatibilities in this module.
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Peter Flanigan, <Support at RoxSoft.co.uk>
Copyright (c) 2008 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
| CatalystX-Usul documentation | view source | Contained in the CatalystX-Usul distribution. |