[Catalyst-commits] r12999 - in
Catalyst-Runtime/5.80/branches/uri_for_utf8: . lib lib/Catalyst
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Wed Mar 3 22:09:23 GMT 2010
Author: t0m
Date: 2010-03-03 22:09:23 +0000 (Wed, 03 Mar 2010)
New Revision: 12999
Modified:
Catalyst-Runtime/5.80/branches/uri_for_utf8/
Catalyst-Runtime/5.80/branches/uri_for_utf8/Changes
Catalyst-Runtime/5.80/branches/uri_for_utf8/lib/Catalyst.pm
Catalyst-Runtime/5.80/branches/uri_for_utf8/lib/Catalyst/Upgrading.pod
Log:
r12889 at t0mlaptop (orig r12853): caelum | 2010-02-09 22:26:23 +0000
update Changes, put comment back in
r12890 at t0mlaptop (orig r12854): t0m | 2010-02-11 20:06:15 +0000
Fix typo
r12891 at t0mlaptop (orig r12855): t0m | 2010-02-11 20:36:22 +0000
First attempt to make this make more sense.
r12897 at t0mlaptop (orig r12861): rafl | 2010-02-14 11:30:23 +0000
Make the debug log say the cat version with all its digits.
r13014 at t0mlaptop (orig r12978): rafl | 2010-02-23 17:52:30 +0000
fix doc typo.
Property changes on: Catalyst-Runtime/5.80/branches/uri_for_utf8
___________________________________________________________________
Modified: svk:merge
- 1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst/trunk/Catalyst-Runtime:9763
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/compres:7999
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/context_go:8001
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/trunk:8533
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/Catalyst-Test-Updates:8363
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/add_captures_to_visit:9546
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/aggregate_more:11803
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/better_scripts:12074
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/disable_regex_fallback:11456
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/fix_path_info_decoding:12089
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/index_default_fuckage:10646
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/moose:7911
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/namespace_handling_refactor:10655
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/uri_encode_captures_andor_args_take2:11811
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/trunk:12811
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-ChildOf:4443
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Runtime-jrockway:5857
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-component-setup:4320
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-docs:4325
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/current/Catalyst-Runtime:5142
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst:4483
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Runtime:6165
6d45476b-5895-46b8-b13a-8b969fa34c98:/local/Catalyst-Runtime-better_scripts:11331
8a9521aa-ff93-41d6-9f87-b05cafcdab40:/local/cat/Catalyst-Runtime/5.80/trunk:8157
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime:8339
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime-jrockway:8342
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime:6511
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime-current:10442
+ 1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst/trunk/Catalyst-Runtime:9763
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/compres:7999
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/context_go:8001
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/trunk:8533
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/Catalyst-Test-Updates:8363
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/add_captures_to_visit:9546
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/aggregate_more:11803
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/better_scripts:12074
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/disable_regex_fallback:11456
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/fix_path_info_decoding:12089
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/index_default_fuckage:10646
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/moose:7911
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/namespace_handling_refactor:10655
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/uri_encode_captures_andor_args_take2:11811
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/trunk:12978
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-ChildOf:4443
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Runtime-jrockway:5857
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-component-setup:4320
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-docs:4325
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/current/Catalyst-Runtime:5142
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst:4483
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Runtime:6165
6d45476b-5895-46b8-b13a-8b969fa34c98:/local/Catalyst-Runtime-better_scripts:11331
8a9521aa-ff93-41d6-9f87-b05cafcdab40:/local/cat/Catalyst-Runtime/5.80/trunk:8157
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime:8339
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime-jrockway:8342
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime:6511
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime-current:10442
Modified: Catalyst-Runtime/5.80/branches/uri_for_utf8/Changes
===================================================================
--- Catalyst-Runtime/5.80/branches/uri_for_utf8/Changes 2010-03-02 23:03:19 UTC (rev 12998)
+++ Catalyst-Runtime/5.80/branches/uri_for_utf8/Changes 2010-03-03 22:09:23 UTC (rev 12999)
@@ -1,5 +1,8 @@
# This file documents the revision history for Perl extension Catalyst.
+ Bug fixed:
+ - uri_for will now escape unsafe chars in captures and encode utf8 chars
+
5.80020 2010-02-04 06:51:18
New features:
Modified: Catalyst-Runtime/5.80/branches/uri_for_utf8/lib/Catalyst/Upgrading.pod
===================================================================
--- Catalyst-Runtime/5.80/branches/uri_for_utf8/lib/Catalyst/Upgrading.pod 2010-03-02 23:03:19 UTC (rev 12998)
+++ Catalyst-Runtime/5.80/branches/uri_for_utf8/lib/Catalyst/Upgrading.pod 2010-03-03 22:09:23 UTC (rev 12999)
@@ -217,7 +217,7 @@
Using this now causes infinite recursion between MyApp::setup and
Catalyst::setup, due to other backwards compatibility issues related to how
-plugin setup works. Moose method modifiers like C<< before|after|around 'setup
+plugin setup works. Moose method modifiers like C<< before|after|around setup
=> sub { ... }; >> also will not operate correctly on the setup method.
The right way to do it is this:
Modified: Catalyst-Runtime/5.80/branches/uri_for_utf8/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/uri_for_utf8/lib/Catalyst.pm 2010-03-02 23:03:19 UTC (rev 12998)
+++ Catalyst-Runtime/5.80/branches/uri_for_utf8/lib/Catalyst.pm 2010-03-03 22:09:23 UTC (rev 12999)
@@ -79,6 +79,8 @@
# Remember to update this in Catalyst::Runtime as well!
our $VERSION = '5.80020';
+our $PRETTY_VERSION = $VERSION;
+
$VERSION = eval $VERSION;
sub import {
@@ -1144,7 +1146,7 @@
if ( $class->debug ) {
my $name = $class->config->{name} || 'Application';
- $class->log->info("$name powered by Catalyst $Catalyst::VERSION");
+ $class->log->info("$name powered by Catalyst $Catalyst::PRETTY_VERSION");
}
# Make sure that the application class becomes immutable at this point,
@@ -1182,24 +1184,21 @@
return 1; # Explicit return true as people have __PACKAGE__->setup as the last thing in their class. HATE.
}
-
=head2 $app->setup_finalize
-A hook to attach modifiers to.
-Using C<< after setup => sub{}; >> doesn't work, because of quirky things done for plugin setup.
-Also better than C< setup_finished(); >, as that is a getter method.
+A hook to attach modifiers to. This method does not do anything except set the
+C<setup_finished> accessor.
- sub setup_finalize {
+Applying method modifiers to the C<setup> method doesn't work, because of quirky thingsdone for plugin setup.
+Example:
+
+ after setup_finalize => sub {
my $app = shift;
- ## do stuff, i.e., determine a primary key column for sessions stored in a DB
+ ## do stuff here..
+ };
- $app->next::method(@_);
-
-
- }
-
=cut
sub setup_finalize {
@@ -1327,6 +1326,7 @@
(map {
my $param = "$_";
utf8::encode( $param ) if utf8::is_utf8($param);
+ # using the URI::Escape pattern here so utf8 chars survive
$param =~ s/([^A-Za-z0-9\-_.!~*'() ])/$URI::Escape::escapes{$1}/go;
$param =~ s/ /+/g;
"${key}=$param"; } ( ref $val eq 'ARRAY' ? @$val : $val ));
More information about the Catalyst-commits
mailing list