Catalyst-Plugin-SmartURI
view release on metacpan or search on metacpan
- 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
package Catalyst::Plugin::SmartURI;
our $AUTHORITY = 'cpan:RKITOVER';
$Catalyst::Plugin::SmartURI::VERSION = '0.041';
use Moose;
use mro 'c3';
use 5.008001;
use Class::C3::Componentised;
use Scalar::Util 'weaken';
use Catalyst::Exception ();
use Class::Load ();
use namespace::clean -except => 'meta';
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
$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.279 second using v1.01-cache-2.11-cpan-bb97c1e446a )