[Catalyst-commits] r7532 - in
Catalyst-Plugin-SmartURI/1.000/trunk/lib/Catalyst: . Plugin
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Sat Mar 29 06:02:07 GMT 2008
Author: caelum
Date: 2008-03-29 06:02:07 +0000 (Sat, 29 Mar 2008)
New Revision: 7532
Modified:
Catalyst-Plugin-SmartURI/1.000/trunk/lib/Catalyst/Plugin/SmartURI.pm
Catalyst-Plugin-SmartURI/1.000/trunk/lib/Catalyst/SmartURI.pm
Log:
Oops, forgot a few minor details.
Modified: Catalyst-Plugin-SmartURI/1.000/trunk/lib/Catalyst/Plugin/SmartURI.pm
===================================================================
--- Catalyst-Plugin-SmartURI/1.000/trunk/lib/Catalyst/Plugin/SmartURI.pm 2008-03-29 05:43:48 UTC (rev 7531)
+++ Catalyst-Plugin-SmartURI/1.000/trunk/lib/Catalyst/Plugin/SmartURI.pm 2008-03-29 06:02:07 UTC (rev 7532)
@@ -19,8 +19,12 @@
=head1 SYNOPSIS
smarturi:
- disposition: hostless
+ disposition: hostless # application-wide
+ $c->uri_disposition('absolute'); # per request
+
+ <a href="[% c.uri_for('/foo').relative %]" ...
+
Configure whether $c->uri_for and $c->req->uri_with return absolute, hostless or
relative URIs and/or configure which URI class to use, on an application or
request basis.
@@ -41,6 +45,10 @@
This plugin installs a custom $c->request_class, however it does so in a way
that won't break if you've already set your own request_class.
+There will be a slight performance penalty for your first few requests, due to
+the way L<Catalyst::SmartURI> works, but after that you shouldn't notice
+it.
+
=head1 CONFIGURATION
In myapp.yml:
Modified: Catalyst-Plugin-SmartURI/1.000/trunk/lib/Catalyst/SmartURI.pm
===================================================================
--- Catalyst-Plugin-SmartURI/1.000/trunk/lib/Catalyst/SmartURI.pm 2008-03-29 05:43:48 UTC (rev 7531)
+++ Catalyst-Plugin-SmartURI/1.000/trunk/lib/Catalyst/SmartURI.pm 2008-03-29 06:02:07 UTC (rev 7532)
@@ -277,7 +277,7 @@
my @uri_pms = File::Find::Rule->extras({untaint => 1})->file->name('*.pm')
->in( File::Find::Rule->extras({untaint => 1})->directory
- ->maxdepth(1)->name('URI')->in(grep !/^CODE\(/, @INC)
+ ->maxdepth(1)->name('URI')->in(grep !ref($_), @INC)
);
my @new_uri_pms;
More information about the Catalyst-commits
mailing list