Revision dae5fe9b
Von Sven Schöling vor etwa 4 Jahren hinzugefügt
SL/Request.pm | ||
---|---|---|
22 | 22 |
use Rose::Object::MakeMethods::Generic |
23 | 23 |
( |
24 | 24 |
scalar => [ qw(applying_database_upgrades post_data) ], |
25 |
'scalar --get_set_init' => [ qw(cgi layout presenter is_ajax type cookies request_uri) ], |
|
25 |
'scalar --get_set_init' => [ qw(cgi layout presenter is_ajax type cookies request_uri request_base_uri) ],
|
|
26 | 26 |
); |
27 | 27 |
|
28 | 28 |
sub init_cgi { |
... | ... | |
419 | 419 |
return $uri; |
420 | 420 |
} |
421 | 421 |
|
422 |
sub init_request_base_uri { |
|
423 |
my $uri = $_[0]->request_uri; |
|
424 |
my $base_uri = $uri->clone; |
|
425 |
my @segments = $base_uri->path_segments; |
|
426 |
pop @segments; |
|
427 |
$base_uri->path_segments(@segments); |
|
428 |
$base_uri; |
|
429 |
} |
|
430 |
|
|
422 | 431 |
1; |
423 | 432 |
|
424 | 433 |
__END__ |
Auch abrufbar als: Unified diff
SL::Request: request_base_uri