AxKit2
view release on metacpan or search on metacpan
lib/AxKit2/Config.pm view on Meta::CPAN
($val, $str) = _get_quoted($str, $1);
push @vals, $val;
}
else {
$str =~ s/^(\S+)\s*// || die "bad format";
push @vals, $1;
}
}
die "No data found" unless @vals;
return @vals;
}
1;
__END__
=head1 DIRECTIVES
DocumentRoot
ConsolePort
ConsoleAddr
PluginDir
Plugin
<Server> / <Server name>
Port
<Location path>
...
=head1 API
=head2 C<< $config->docroot( [ STRING ] ) >>
Get/set the DocumentRoot.
=head2 C<< $config->console_port( [ NUMBER ] ) >>
Get/set the ConsolePort. See L<AxKit2::Console>.
=head2 C<< $config->console_addr( [ STRING ] ) >>
Get/set the ConsoleAddr bind address.
=head2 C<< $config->plugin_dir( [ STRING ] ) >>
Get/set the PluginDir (directory to look in for plugins).
=head2 C<< $config->notes( KEY [, VALUE] ) >>
Get/set per-config key-value pairs.
=head1 CASCADING
Lookup of values cascades from the location to the server to the global config
class. So if the docroot isn't set in the C<< <Location> >> section, the config
class will automatically cascade down to the C<< <Server> >> section to look
for the value, and down to the global level if it is still not found.
=head1 LOCATION MATCHING
How AxKit2 matches a request to a particular C<< <Location> >> section is at
best described as naive. It simply looks for the last matching location section
in the config file. This has consequences that I should document better.
=cut
( run in 0.685 second using v1.01-cache-2.11-cpan-39bf76dae61 )