Name
Web::Components::Util - Functions used in this distribution
Synopsis
use Web::Components::Util qw( load_components );
Description
Functions used in this distribution
Configuration and Environment
Defines no attributes
Subroutines/Methods
clear_redirect
-
Deletes the stashed entry that would otherwise cause a redirect response
deref
-
$value = deref $object_or_hash_ref, $key, $optional_default;
Returns the value associated with the supplied key. Accepts either an object or hash reference as the first argument. Returns the default if the result is otherwise undefined
exception
-
$e = exception $error;
Expose the
catch
method in the exception classEXCEPTION_CLASS
defined in constants. Returns a new exception object first_char
-
$single_char = first_char $some_string;
Returns the first character of
$string
formpost
-
Returns a hash references which is stashed to indicate that a link is really a button wrapped in a form
fqdn
-
$domain_name = fqdn $hostname;
Call
gethostbyname
on the supplied hostname which defaults to this host is_arrayref
-
$bool = is_arrayref $scalar_variable;
Tests to see if the scalar variable is an array ref
load_components
-
$hash_ref_of_objects = load_components $search_path, @options_list;
Load and instantiates MVC components. The search path is appended to the applications classname to define the package namespace that is searched for components
The options list is a list of keys and values. Either
application
or,config
andlog
must be specified. Ifapplication
is specified it must defineconfig
andlog
attributesThe configuration object or hash reference must define the
appclass
andweb_components
attributesThe
web_components
attribute (one of the collection references held by Web::Components::Loader) is passed to the component constructor method and is used by a component to discover it's dependenciesAn adaptor pattern is possible using the
web_components_adaptors
attribute ns_environment
-
$value = ns_environment $class, $key, [$value];
An accessor/mutator for the environment variables prefixed by the supplied class name. Providing a value is optional, always returns the current value
throw
-
throw 'message', [ 'arg1', 'arg2' ];
Expose "throw" in Web::ComposableRequest::Util. Web::ComposableRequest::Constants has a class attribute Exception_Class which can be set change the class of the thrown exception
Diagnostics
None
Dependencies
Incompatibilities
There are no known incompatibilities in this module
Bugs and Limitations
There are no known bugs in this module. Please report problems to http://rt.cpan.org/NoAuth/Bugs.html?Dist=Web-Components. Patches are welcome
Acknowledgements
Larry Wall - For the Perl programming language
Author
Peter Flanigan, <pjfl@cpan.org>
License and Copyright
Copyright (c) 2017 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