Web::Components::Util - Functions used in this distribution
use Web::Components::Util qw( load_components );
Functions used in this distribution
Defines no attributes
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 class Class::Usul::Exception. Returns a new error object
catch
first_char
$single_char = first_char $some_string;
Returns the first character of $string
$string
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 and log must be specified. If application is specified it must define config and log attributes
application
config
log
The configuration object or hash reference must define the appclass and components attributes
appclass
components
The 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 dependencies
An adaptor pattern is possible using the config_comps attribute
config_comps
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
None
There are no known incompatibilities in this module
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
Larry Wall - For the Perl programming language
Peter Flanigan, <pjfl@cpan.org>
<pjfl@cpan.org>
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
To install Web::Components, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Web::Components
CPAN shell
perl -MCPAN -e shell install Web::Components
For more information on module installation, please visit the detailed CPAN module installation guide.