Dispatch::Profile::CodeStore - Dispatch::Profile coderef store
version 0.002
This module provides a Moose BUILD constructor that is utilised by the Dispatch::Profile package. It is responsible for parsing the supplied profile and storing the associated target code references.
Moose constructor with the following configurable parameters
A string containing a module to load at runtime
class_loader => 'Data::Dumper'
Multiple modules can be loaded through an array of strings
class_loader => [ 'Data::Dumper', 'DBI' ]
Profiles are defined through a HashRef of profile parameters
profile => { }
Multiple profiles can be defined through an array of hashref profile parameters
profile => [ { }, { }, ],
The following parameters can be used within the profile hashref
Specifies the target method for use with the profile
profile => { target => 'target_method', }
Specifies the class can be used for the associated target. When omitted, the target class should be available within the main namespace.
profile => { class => 'Target::Class', target => 'target_method', }
The object parameter works in conjunction with the class parameter and initialises an object for the given class. Upon dispatch, the target method is actioned against the initialised object.
profile => { class => 'Target::Class', target => 'target_method', object => { param1 => 'entry1', param2 => 'entry2', } }
James Spurin <james@spurin.com>
This software is copyright (c) 2014 by James Spurin.
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 Dispatch::Profile::CodeStore, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dispatch::Profile::CodeStore
CPAN shell
perl -MCPAN -e shell install Dispatch::Profile::CodeStore
For more information on module installation, please visit the detailed CPAN module installation guide.