ASP4x-Router
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
394041424344454647484950515253545556575859# Whether or not inc::Module::Install is actually loaded, the
# $INC{inc/Module/Install.pm} is what will still get set as long as
# the caller loaded module this in the documented manner.
# If not set, the caller may NOT have loaded the bundled version, and thus
# they may not have a MI version that works with the Makefile.PL. This would
# result in false errors or unexpected behaviour. And we don't want that.
my
$file
=
join
(
'/'
,
'inc'
,
split
/::/, __PACKAGE__ ) .
'.pm'
;
unless
(
$INC
{
$file
} ) {
die
<<
"END_DIE"
}
Please invoke ${\__PACKAGE__}
with
:
not:
use
${\__PACKAGE__};
lib/ASP4x/Router.pm view on Meta::CPAN
858687888990919293949596979899100101102103104105# Require a trailing '/' on the end of the URI:
unless
(
$r
->uri =~ m{\.[^/]+$} ||
$r
->uri =~ m{/$} )
{
my
$loc
=
$r
->uri .
'/'
;
if
(
$r
->args )
{
$loc
.=
"?"
.
$r
->args;
}
# end if()
$r
->status( 301 );
$r
->err_headers_out->add(
Location
=>
$loc
);
return
301;
}
# end unless()
my
(
$uri
,
$args
) =
split
/\?/,
$new_uri
;
my
@args
=
split
/&/,
$args
if
defined
(
$args
) &&
length
(
$args
);
$r
->args(
join
'&'
,
@args
);
$ENV
{QUERY_STRING} =
$r
->args;
$r
->uri(
$uri
);
return
-1;
t/conf/asp4-config.json view on Meta::CPAN
5678910111213141516171819202122232425262728
"libs"
: [
"@ServerRoot@/lib"
],
"load_modules"
: [
],
"env_vars"
: {
},
"settings"
: {
}
},
"errors"
: {
"error_handler"
:
"ASP4::ErrorHandler"
,
"mail_errors_to"
:
"you@your-server.com"
,
"mail_errors_from"
:
"root@localhost"
,
"smtp_server"
:
"localhost"
},
"web"
: {
"application_name"
:
"ASP4xRoutes"
,
"application_root"
:
"@ServerRoot@"
,
"www_root"
:
"@ServerRoot@/htdocs"
,
"handler_root"
:
"@ServerRoot@/handlers"
,
"page_cache_root"
:
"/tmp/PAGE_CACHE"
,
"handler_resolver"
:
"ASP4::HandlerResolver"
,
"handler_runner"
:
"ASP4::HandlerRunner"
,
( run in 0.672 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )