ASP4
view release on metacpan or search on metacpan
lib/ASP4/ConfigNode/Web.pm view on Meta::CPAN
$Config->web->application_root; # '/usr/local/projects/mysite.com'
$Config->web->handler_root; # '/usr/local/projects/mysite.com/handlers'
$Config->web->www_root; # '/usr/local/projects/mysite.com/htdocs'
$Config->web->page_cache_root; # '/tmp/PAGE_CACHE'
You will never need to do this:
foreach my $filter ( $Config->web->request_filters )
{
my $regexp = $filter->uri_match;
my $class = $filter->class;
}# end foreach()
=head1 DESCRIPTION
ASP4::ConfigNode::Web provides access to the C<web> portion of the configuration.
=head1 PUBLIC PROPERTIES
=head2 application_name
Returns the name of the application.
=head2 application_root
Returns the absolute path to the root of the application, i.e. C</usr/local/projects/mysite.com>
=head2 handler_root
Returns the absolute path to where the 'handlers' are installed, i.e. C</usr/local/projects/mysite.com/handlers>
=head2 www_root
Returns the absolute path to where the normal website files (ASP, images, css, javascripts, etc) are located,
i.e. C</usr/local/projects/mysite.com/htdocs>
=head2 page_cache_root
Returns the absolute path to where 'compiled' ASP scripts are stored, i.e. C</tmp/PAGE_CACHE>
Since the 'compiled' ASP scripts are overwritten whenever the source ASP script has been changed on disk,
the webserver process must have read/write access to this location.
It is recommended that a temporary path is used - '/tmp' on most Linux distributions.
=head2 request_filters
Returns a list of ConfigNodes that represent individual C<filter> elements in the configuration.
=head2 router
B<*IF*> you have defined a "routes" section in your config - like this:
...
"web": {
...
"routes": [
{
"name": "Wiki",
"path": "/:lang-:locale/{*page}",
"target": "/wiki-page.asp",
"defaults": {
"page": "home",
"lang": "en",
"locale": "us"
}
}
]
...
}
Then the C<router> property will return a L<Router::Generic> object based on your routes.
You can access it from the C<$Config> like this:
$Config->web->router
=head1 SEE ALSO
L<ASP4::RequestFilter>
=head1 BUGS
It's possible that some bugs have found their way into this release.
Use RT L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=ASP4> to submit bug reports.
=head1 HOMEPAGE
Please visit the ASP4 homepage at L<http://0x31337.org/code/> to see examples
of ASP4 in action.
=head1 AUTHOR
John Drago <jdrago_999@yahoo.com>
=head1 COPYRIGHT AND LICENSE
Copyright 2007 John Drago, All rights reserved.
This software is free software. It may be used and distributed under the
same terms as Perl itself.
=cut
( run in 0.654 second using v1.01-cache-2.11-cpan-39bf76dae61 )