ASP4x-Router

 view release on metacpan or  search on metacpan

inc/Module/Install.pm  view on Meta::CPAN

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
 
 
 
 
# 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:
 
        use inc::${\__PACKAGE__};
 
not:
 
        use ${\__PACKAGE__};

lib/ASP4x/Router.pm  view on Meta::CPAN

85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# 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

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  "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 )