Catalyst-Plugin-SmartURI
view release on metacpan or search on metacpan
4849505152535455565758596061626364656667
- improved request class, better Host header parsing, fixed POD.
0.025 2008-06-28 08:33:57
- fucked up the pod
for
SYNOPSIS...
0.024 2008-06-28 03:01:53
- added
'host-header'
disposition.
- converted conf key to
'Plugin::SmartURI'
0.023 2008-06-28 01:14:49
- weaken saved context.
0.022 2008-06-24 16:52:55
- fix weird bug
with
initialization that sometimes happens.
0.021 2008-06-16 22:20:42
- minor speedup, avoiding unnecessary string evals.
0.02 2008-06-03 21:58:17
- moved Catalyst::SmartURI into a separate dist as URI::SmartURI
lib/Catalyst/Plugin/SmartURI.pm view on Meta::CPAN
12345678910111213141516171819202122232425262728package
Catalyst::Plugin::SmartURI;
our
$AUTHORITY
=
'cpan:RKITOVER'
;
$Catalyst::Plugin::SmartURI::VERSION
=
'0.041'
;
use
Moose;
use
5.008001;
use
Catalyst::Exception ();
use
Class::Load ();
has
uri_disposition
=> (
is
=>
'rw'
,
isa
=>
'Str'
);
has
uri_class
=> (
is
=>
'rw'
,
isa
=>
'Str'
);
my
$context
;
# keep a weakend copy for the Request class to use
my
(
$conf_disposition
,
$conf_uri_class
);
# configured values
=head1 NAME
Catalyst::Plugin::SmartURI - Configurable URIs for Catalyst
=head1 SYNOPSIS
In your lib/MyApp.pm, load the plugin and your other plugins, for example:
lib/Catalyst/Plugin/SmartURI.pm view on Meta::CPAN
281282283284285286287288289290291292293294295296297298299300301
$res
}
# Reset accessors to configured values at beginning of request.
sub
prepare {
my
$app
=
shift
;
# Also save a copy of the context for the Request class to use.
my
$c
=
$context
=
$app
->
next
::method(
@_
);
weaken
$context
;
$c
->uri_class(
$conf_uri_class
);
$c
->uri_disposition(
$conf_disposition
);
$c
}
__PACKAGE__->meta->make_immutable;
=head1 SEE ALSO
( run in 0.245 second using v1.01-cache-2.11-cpan-cba739cd03b )