Activator
view release on metacpan or search on metacpan
lib/Activator/Dictionary.pm view on Meta::CPAN
Examples:
key1 value1 # value eq 'value1'
# key2 value2 # ignored
# key3 value3 # ignored
# ignored
key4 multiple words # value eq 'multiple words'
key5 " value5 is quoted" # value eq ' value5 is quoted'
key6 ""OMG!" "quotes!"" # value eq '"OMG!" "quotes!"'
key7 " whitespaced " # value eq ' whitespaced '
=head1 DATABASE CONFIGURATION
If you would rather that your dictionary definitions are in a database,
or need more complex values than can be reasonably contained within a
single line, create a table of any name with this schema:
CREATE TABLE db_table_name (
# primary column must end with '_id'
*_id serial,
lang enum('en','de','es') default 'en',
realm text NOT NULL,
lib/Catalyst/Plugin/Activator/Config.pm view on Meta::CPAN
This method substitutes macros found with calls to a function. There are three
default macros:
=over 4
=item * C<__HOME__> - replaced with C<$c-E<gt>path_to('')>
=item * C<__path_to(foo/bar)__> - replaced with C<$c-E<gt>path_to('foo/bar')>
=item * C<__literal(__FOO__)__> - leaves __FOO__ alone (allows you to use
C<__DATA__> as a config value, for example)
=back
The parameter list is split on comma (C<,>). You can override this method to
do your own string munging, or you can define your own macros in
C<MyApp-E<gt>config-E<gt>{ 'Plugin::ConfigLoader' }-E<gt>{ substitutions }>.
Example:
MyApp->config->{ 'Plugin::ConfigLoader' }->{ substitutions } = {
baz => sub { my $c = shift; qux( @_ ); }
( run in 0.731 second using v1.01-cache-2.11-cpan-140bd7fdf52 )