Merge 'trunk' into 'fix_request_uri'
Tomas Doran [Sat, 8 May 2010 22:26:55 +0000 (22:26 +0000)]
r15494@tomas-dorans-macbook-pro (orig r13198):  rafl | 2010-05-03 01:51:43 +0100
Remove useless conditional.
r15515@tomas-dorans-macbook-pro (orig r13219):  wreis | 2010-05-06 13:34:10 +0100
make uri_for a bit cleaner
r15516@tomas-dorans-macbook-pro (orig r13220):  wreis | 2010-05-06 14:30:19 +0100
minor fix for Changes file | add me as a contributor
r15517@tomas-dorans-macbook-pro (orig r13221):  rafl | 2010-05-07 22:11:10 +0100
Pass along options to load_class for plugins.
r15518@tomas-dorans-macbook-pro (orig r13222):  rafl | 2010-05-07 22:48:51 +0100
Changelogging.
r15519@tomas-dorans-macbook-pro (orig r13223):  rafl | 2010-05-07 23:06:26 +0100
Version 5.80023.

Changes
Makefile.PL
lib/Catalyst.pm
lib/Catalyst/Runtime.pm

diff --git a/Changes b/Changes
index 6052c85..5a36bc8 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 # This file documents the revision history for Perl extension Catalyst.
 
+5.80023 2010-05-07 23:50:27
+
   Bug fixes:
    - Ensure to always cleanup temporary uploaded files in all cases, even
      when exceptions occur during request processing, using HTTP::Body's
    - Allow the myapp_test.pl script to be given a list of paths which it
      will retrieve all of. (RT#53653)
    - Allow parameterized roles to be applied as plugins.
+   - Allow requiring minimum versions of plugins when loading them.
 
   Documentation:
    - The Catalyst::Test::get method is documented as returning the raw
      response bytes without any character decoding (RT#53678)
 
+  Cleanups:
+   - Removal of $Catalyst::PRETTY_VERSION. Future releases will always have the
+     full and unmangled version number, including trailing zeroes, in
+     $Catalyst::VERSION.
+
 5.80022 2010-03-28 19:43:01
 
   New features:
@@ -53,7 +61,7 @@
 5.80021 2010-03-03 23:02:01
 
   Bug fixed:
-   - $c->uri_for will now escape unsafe characterss in captures
+   - $c->uri_for will now escape unsafe characters in captures
      ($c->request->captures) and correctly encode utf8 charracters.
 
 5.80020 2010-02-04 06:51:18
index 2590316..3b2305c 100644 (file)
@@ -19,7 +19,7 @@ requires 'namespace::clean' => '0.13';
 requires 'B::Hooks::EndOfScope' => '0.08';
 requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00903';
 requires 'Class::MOP' => '0.95';
-requires 'Moose' => '0.93';
+requires 'Moose' => '1.03';
 requires 'MooseX::MethodAttributes::Inheritable' => '0.19';
 requires 'MooseX::Role::WithOverloading' => '0.05';
 requires 'Carp';
index 9f2f836..976e241 100644 (file)
@@ -79,7 +79,7 @@ __PACKAGE__->stats_class('Catalyst::Stats');
 
 # Remember to update this in Catalyst::Runtime as well!
 
-our $VERSION = '5.80022';
+our $VERSION = '5.80023';
 
 sub import {
     my ( $class, @arguments ) = @_;
@@ -1280,13 +1280,11 @@ sub uri_for {
     carp "uri_for called with undef argument" if grep { ! defined $_ } @args;
     foreach my $arg (@args) {
         utf8::encode($arg) if utf8::is_utf8($arg);
-    }
-    s/([^$URI::uric])/$URI::Escape::escapes{$1}/go for @args;
-    if (blessed $path) { # Action object only.
-        s|/|%2F|g for @args;
+        $arg =~ s/([^$URI::uric])/$URI::Escape::escapes{$1}/go;
     }
 
     if ( blessed($path) ) { # action object
+        s|/|%2F|g for @args;
         my $captures = [ map { s|/|%2F|g; $_; }
                         ( scalar @args && ref $args[0] eq 'ARRAY'
                          ? @{ shift(@args) }
@@ -1307,8 +1305,6 @@ sub uri_for {
         $path = '/' if $path eq '';
     }
 
-    undef($path) if (defined $path && $path eq '');
-
     unshift(@args, $path);
 
     unless (defined $path && $path =~ s!^/!!) { # in-place strip
@@ -2783,7 +2779,6 @@ the plugin name does not begin with C<Catalyst::Plugin::>.
         my ( $proto, $plugin, $instant ) = @_;
         my $class = ref $proto || $proto;
 
-        # FIXME: also pass along plugin options as soon as the mop has it
         Class::MOP::load_class( $plugin );
         $class->log->warn( "$plugin inherits from 'Catalyst::Component' - this is decated and will not work in 5.81" )
             if $plugin->isa( 'Catalyst::Component' );
@@ -2811,8 +2806,7 @@ the plugin name does not begin with C<Catalyst::Plugin::>.
          } @{ $plugins };
 
         for my $plugin ( reverse @plugins ) {
-            Class::MOP::load_class($plugin->[0]);
-            # pass along $plugin->[1] as well once cmop supports it
+            Class::MOP::load_class($plugin->[0], $plugin->[1]);
             my $meta = find_meta($plugin->[0]);
             next if $meta && $meta->isa('Moose::Meta::Role');
 
@@ -2820,9 +2814,9 @@ the plugin name does not begin with C<Catalyst::Plugin::>.
         }
 
         my @roles =
-            map { $_->[0]->name, $_->[1] }
-            grep { $_->[0] && blessed($_->[0]) && $_->[0]->isa('Moose::Meta::Role') }
-            map { [find_meta($_->[0]), $_->[1]] }
+            map  { $_->[0]->name, $_->[1] }
+            grep { blessed($_->[0]) && $_->[0]->isa('Moose::Meta::Role') }
+            map  { [find_meta($_->[0]), $_->[1]] }
             @plugins;
 
         Moose::Util::apply_all_roles(
@@ -3185,6 +3179,8 @@ Will Hawes C<info@whawes.co.uk>
 
 willert: Sebastian Willert <willert@cpan.org>
 
+wreis: Wallace Reis <wallace@reis.org.br>
+
 Yuval Kogman, C<nothingmuch@woobling.org>
 
 =head1 LICENSE
index f9853ec..89ddad1 100644 (file)
@@ -7,7 +7,7 @@ BEGIN { require 5.008004; }
 
 # Remember to update this in Catalyst as well!
 
-our $VERSION='5.80022';
+our $VERSION = '5.80023';
 
 =head1 NAME