r33687 - in /branches/upstream/libcatalyst-perl/current: ./ inc/Module/ inc/Module/Install/ lib/ lib/Catalyst/ lib/Catalyst/DispatchType/ lib/Catalyst/Engine/HTTP/Restarter/ t/ t/lib/TestApp/Controller/ t/lib/TestApp/View/Dump/

eloy at users.alioth.debian.org eloy at users.alioth.debian.org
Wed Apr 22 08:09:37 UTC 2009


Author: eloy
Date: Wed Apr 22 08:09:30 2009
New Revision: 33687

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=33687
Log:
[svn-upgrade] Integrating new upstream version, libcatalyst-perl (5.80002)

Added:
    branches/upstream/libcatalyst-perl/current/t/unit_core_setup_log.t
    branches/upstream/libcatalyst-perl/current/t/unit_metaclass_compat_non_moose_controller.t
Removed:
    branches/upstream/libcatalyst-perl/current/t/lib/TestApp/View/Dump/Parameters.pm
Modified:
    branches/upstream/libcatalyst-perl/current/Changes
    branches/upstream/libcatalyst-perl/current/MANIFEST
    branches/upstream/libcatalyst-perl/current/META.yml
    branches/upstream/libcatalyst-perl/current/Makefile.PL
    branches/upstream/libcatalyst-perl/current/inc/Module/Install.pm
    branches/upstream/libcatalyst-perl/current/inc/Module/Install/AutoInstall.pm
    branches/upstream/libcatalyst-perl/current/inc/Module/Install/Base.pm
    branches/upstream/libcatalyst-perl/current/inc/Module/Install/Can.pm
    branches/upstream/libcatalyst-perl/current/inc/Module/Install/Fetch.pm
    branches/upstream/libcatalyst-perl/current/inc/Module/Install/Include.pm
    branches/upstream/libcatalyst-perl/current/inc/Module/Install/Makefile.pm
    branches/upstream/libcatalyst-perl/current/inc/Module/Install/Metadata.pm
    branches/upstream/libcatalyst-perl/current/inc/Module/Install/Scripts.pm
    branches/upstream/libcatalyst-perl/current/inc/Module/Install/Win32.pm
    branches/upstream/libcatalyst-perl/current/inc/Module/Install/WriteAll.pm
    branches/upstream/libcatalyst-perl/current/lib/Catalyst.pm
    branches/upstream/libcatalyst-perl/current/lib/Catalyst/Component.pm
    branches/upstream/libcatalyst-perl/current/lib/Catalyst/Delta.pod
    branches/upstream/libcatalyst-perl/current/lib/Catalyst/DispatchType/Chained.pm
    branches/upstream/libcatalyst-perl/current/lib/Catalyst/Engine/HTTP/Restarter/Watcher.pm
    branches/upstream/libcatalyst-perl/current/lib/Catalyst/Log.pm
    branches/upstream/libcatalyst-perl/current/lib/Catalyst/Request.pm
    branches/upstream/libcatalyst-perl/current/lib/Catalyst/Runtime.pm
    branches/upstream/libcatalyst-perl/current/lib/Catalyst/Upgrading.pod
    branches/upstream/libcatalyst-perl/current/t/lib/TestApp/Controller/Dump.pm
    branches/upstream/libcatalyst-perl/current/t/unit_core_setup.t

Modified: branches/upstream/libcatalyst-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/Changes?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/Changes (original)
+++ branches/upstream/libcatalyst-perl/current/Changes Wed Apr 22 08:09:30 2009
@@ -1,4 +1,30 @@
 # This file documents the revision history for Perl extension Catalyst.
+
+5.80002 2009-04-22 01:28:36
+        - Fix CATALYST_DEBUG and MYAPP_DEBUG environment variables
+          turning debuging on if defined, rather than if set.
+          They now force debugging on or off, taking precedence over
+          configuration in your application. (t0m)
+          - Tests for this (t0m)
+        - pass replace_constructor to the immutable call to ensure
+          applications get a Moose constructor rather than a C::A one
+        - Fix issues with restarting the application class due to C3 failures
+          on perl 5.10 (t0m)
+        - Work around issues in Moose with initialization order of multiple
+          levels of non-Moose classes inheriting from a Moose class (t0m)
+          - Test for this
+        - Add backwards compatibility method for Catalyst::Log->body, which
+          has been made private (t0m)
+        - Fix so that calling $c->req->parameters(undef) does not flatten
+          the request parameters with undef + test (t0m)
+        - Fix so that width of table of unattached actions for debugging
+          ::DispatchType::Chained varies according to your terminal width
+          (Oleg Kostyuk)
+        - Fix warning message about linearized @ISA in Catalyst::Component
+          (Emanuele Zeppieri)
+        - Require MX::MethodAttributes 0.06 to avoid issues with saying
+          use base 'Catalyst::Controller'; use Moose; losing actions (t0m)
+        - Fix all of t0m's typos in ::Upgrading and ::Delta (hobbs)
 
 5.80001 2009-04-18 22:18
         - Don't inline the constructor for Catalyst::Log to avoid a

Modified: branches/upstream/libcatalyst-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/MANIFEST?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/MANIFEST (original)
+++ branches/upstream/libcatalyst-perl/current/MANIFEST Wed Apr 22 08:09:30 2009
@@ -196,7 +196,6 @@
 t/lib/TestApp/RequestBaseBug.pm
 t/lib/TestApp/View/Dump.pm
 t/lib/TestApp/View/Dump/Body.pm
-t/lib/TestApp/View/Dump/Parameters.pm
 t/lib/TestApp/View/Dump/Request.pm
 t/lib/TestApp/View/Dump/Response.pm
 t/lib/TestAppChainedAbsolutePathPart.pm
@@ -244,11 +243,13 @@
 t/unit_core_path_to.t
 t/unit_core_plugin.t
 t/unit_core_setup.t
+t/unit_core_setup_log.t
 t/unit_core_uri_for.t
 t/unit_core_uri_with.t
 t/unit_dispatcher_requestargs_restore.t
 t/unit_load_catalyst_test.t
 t/unit_metaclass_compat_non_moose.t
+t/unit_metaclass_compat_non_moose_controller.t
 t/unit_response.t
 t/unit_stats.t
 t/unit_utils_env_value.t

Modified: branches/upstream/libcatalyst-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/META.yml?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/META.yml (original)
+++ branches/upstream/libcatalyst-perl/current/META.yml Wed Apr 22 08:09:30 2009
@@ -10,7 +10,7 @@
 configure_requires:
   ExtUtils::MakeMaker: 6.42
 distribution_type: module
-generated_by: 'Module::Install version 0.84'
+generated_by: 'Module::Install version 0.85'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -40,7 +40,7 @@
   Module::Pluggable: 3.01
   Moose: 0.73
   MooseX::Emulate::Class::Accessor::Fast: 0.00801
-  MooseX::MethodAttributes::Inheritable: 0.05
+  MooseX::MethodAttributes::Inheritable: 0.06
   Path::Class: 0.09
   Scalar::Util: 0
   Scope::Upper: 0.06
@@ -59,4 +59,4 @@
   homepage: http://dev.catalyst.perl.org/
   license: http://dev.perl.org/licenses/
   repository: http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/
-version: 5.80001
+version: 5.80002

Modified: branches/upstream/libcatalyst-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/Makefile.PL?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/Makefile.PL (original)
+++ branches/upstream/libcatalyst-perl/current/Makefile.PL Wed Apr 22 08:09:30 2009
@@ -9,7 +9,7 @@
 requires 'Scope::Upper' => '0.06';
 requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00801';
 requires 'Moose' => '0.73';
-requires 'MooseX::MethodAttributes::Inheritable' => '0.05';
+requires 'MooseX::MethodAttributes::Inheritable' => '0.06';
 requires 'Carp';
 requires 'Class::C3::Adopt::NEXT' => '0.07';
 requires 'Class::MOP' => '0.79';
@@ -107,6 +107,8 @@
 # NOTE - This is the version number of the _incompatible_ code,
 #        not the version number of the fixed version.
 my %conflicts = (
+    'Catalyst::Plugin::ConfigLoader'   => '0.22', # Older versions work but
+                                                  # throw Data::Visitor warns
     'Catalyst::Devel'                  => '0.09',
     'Catalyst::Plugin::SmartURI'       => '0.029',
     'CatalystX::CRUD'                  => '0.37',
@@ -115,6 +117,7 @@
     'Catalyst::Plugin::Authentication' => '0.100091',
     'CatalystX::Imports'               => '0.03',
     'Catalyst::Plugin::HashedCookies'  => '1.03',
+    'Catalyst::Action::REST'           => '0.67',
 );
 check_conflicts(%conflicts);
 

Modified: branches/upstream/libcatalyst-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/inc/Module/Install.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/libcatalyst-perl/current/inc/Module/Install.pm Wed Apr 22 08:09:30 2009
@@ -28,7 +28,7 @@
 	# This is not enforced yet, but will be some time in the next few
 	# releases once we can make sure it won't clash with custom
 	# Module::Install extensions.
-	$VERSION = '0.84';
+	$VERSION = '0.85';
 
 	# Storage for the pseudo-singleton
 	$MAIN    = undef;

Modified: branches/upstream/libcatalyst-perl/current/inc/Module/Install/AutoInstall.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/inc/Module/Install/AutoInstall.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/inc/Module/Install/AutoInstall.pm (original)
+++ branches/upstream/libcatalyst-perl/current/inc/Module/Install/AutoInstall.pm Wed Apr 22 08:09:30 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.84';
+	$VERSION = '0.85';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libcatalyst-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/inc/Module/Install/Base.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/libcatalyst-perl/current/inc/Module/Install/Base.pm Wed Apr 22 08:09:30 2009
@@ -1,7 +1,11 @@
 #line 1
 package Module::Install::Base;
 
-$VERSION = '0.84';
+use strict 'vars';
+use vars qw{$VERSION};
+BEGIN {
+	$VERSION = '0.85';
+}
 
 # Suspend handler for "redefined" warnings
 BEGIN {
@@ -12,7 +16,7 @@
 ### This is the ONLY module that shouldn't have strict on
 # use strict;
 
-#line 41
+#line 45
 
 sub new {
 	my ($class, %args) = @_;
@@ -27,7 +31,7 @@
 	bless( \%args, $class );
 }
 
-#line 62
+#line 66
 
 sub AUTOLOAD {
 	my $self = shift;
@@ -38,13 +42,13 @@
 	goto &$autoload;
 }
 
-#line 79
+#line 83
 
 sub _top {
 	$_[0]->{_top};
 }
 
-#line 94
+#line 98
 
 sub admin {
 	$_[0]->_top->{admin}
@@ -52,7 +56,7 @@
 	Module::Install::Base::FakeAdmin->new;
 }
 
-#line 110
+#line 114
 
 sub is_admin {
 	$_[0]->admin->VERSION;
@@ -63,6 +67,7 @@
 package Module::Install::Base::FakeAdmin;
 
 my $fake;
+
 sub new {
 	$fake ||= bless(\@_, $_[0]);
 }
@@ -78,4 +83,4 @@
 
 1;
 
-#line 157
+#line 162

Modified: branches/upstream/libcatalyst-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/inc/Module/Install/Can.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/inc/Module/Install/Can.pm (original)
+++ branches/upstream/libcatalyst-perl/current/inc/Module/Install/Can.pm Wed Apr 22 08:09:30 2009
@@ -9,7 +9,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.84';
+	$VERSION = '0.85';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libcatalyst-perl/current/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/inc/Module/Install/Fetch.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/inc/Module/Install/Fetch.pm (original)
+++ branches/upstream/libcatalyst-perl/current/inc/Module/Install/Fetch.pm Wed Apr 22 08:09:30 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.84';
+	$VERSION = '0.85';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libcatalyst-perl/current/inc/Module/Install/Include.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/inc/Module/Install/Include.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/inc/Module/Install/Include.pm (original)
+++ branches/upstream/libcatalyst-perl/current/inc/Module/Install/Include.pm Wed Apr 22 08:09:30 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.84';
+	$VERSION = '0.85';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libcatalyst-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/inc/Module/Install/Makefile.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/libcatalyst-perl/current/inc/Module/Install/Makefile.pm Wed Apr 22 08:09:30 2009
@@ -7,7 +7,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.84';
+	$VERSION = '0.85';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libcatalyst-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/inc/Module/Install/Metadata.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/libcatalyst-perl/current/inc/Module/Install/Metadata.pm Wed Apr 22 08:09:30 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.84';
+	$VERSION = '0.85';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

Modified: branches/upstream/libcatalyst-perl/current/inc/Module/Install/Scripts.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/inc/Module/Install/Scripts.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/inc/Module/Install/Scripts.pm (original)
+++ branches/upstream/libcatalyst-perl/current/inc/Module/Install/Scripts.pm Wed Apr 22 08:09:30 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.84';
+	$VERSION = '0.85';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libcatalyst-perl/current/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/inc/Module/Install/Win32.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/inc/Module/Install/Win32.pm (original)
+++ branches/upstream/libcatalyst-perl/current/inc/Module/Install/Win32.pm Wed Apr 22 08:09:30 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.84';
+	$VERSION = '0.85';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

Modified: branches/upstream/libcatalyst-perl/current/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/inc/Module/Install/WriteAll.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/inc/Module/Install/WriteAll.pm (original)
+++ branches/upstream/libcatalyst-perl/current/inc/Module/Install/WriteAll.pm Wed Apr 22 08:09:30 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.84';
+	$VERSION = '0.85';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

Modified: branches/upstream/libcatalyst-perl/current/lib/Catalyst.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/lib/Catalyst.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/lib/Catalyst.pm (original)
+++ branches/upstream/libcatalyst-perl/current/lib/Catalyst.pm Wed Apr 22 08:09:30 2009
@@ -2,6 +2,7 @@
 
 use Moose;
 extends 'Catalyst::Component';
+use Moose::Util qw/find_meta/;
 use bytes;
 use Scope::Upper ();
 use Catalyst::Exception;
@@ -74,7 +75,7 @@
 
 # Remember to update this in Catalyst::Runtime as well!
 
-our $VERSION = '5.80001';
+our $VERSION = '5.80002';
 
 {
     my $dev_version = $VERSION =~ /_\d{2}$/;
@@ -1054,10 +1055,11 @@
     }
 
     # Call plugins setup, this is stupid and evil.
+    # Also screws C3 badly on 5.10, hack to avoid.
     {
         no warnings qw/redefine/;
         local *setup = sub { };
-        $class->setup;
+        $class->setup unless $Catalyst::__AM_RESTARTING;
     }
 
     # Initialize our data structure
@@ -1097,7 +1099,7 @@
     # applying modifiers).
     Scope::Upper::reap(sub {
         my $meta = Class::MOP::get_metaclass_by_name($class);
-        $meta->make_immutable unless $meta->is_immutable;
+        $meta->make_immutable(replace_constructor => 1) unless $meta->is_immutable;
     }, Scope::Upper::SCOPE(1));
 
     $class->setup_finalize;
@@ -2161,6 +2163,14 @@
 
 =cut
 
+sub _controller_init_base_classes {
+    my ($class, $component) = @_;
+    foreach my $class ( reverse @{ mro::get_linear_isa($component) } ) {
+        Moose->init_meta( for_class => $class )
+            unless find_meta($class);
+    }
+}
+
 sub setup_component {
     my( $class, $component ) = @_;
 
@@ -2168,6 +2178,14 @@
         return $component;
     }
 
+    # FIXME - Ugly, ugly hack to ensure the we force initialize non-moose base classes
+    #         nearest to Catalyst::Controller first, no matter what order stuff happens
+    #         to be loaded. There are TODO tests in Moose for this, see
+    #         f2391d17574eff81d911b97be15ea51080500003
+    if ($component->isa('Catalyst::Controller')) {
+        $class->_controller_init_base_classes($component);
+    }
+    
     my $suffix = Catalyst::Utils::class2classsuffix( $component );
     my $config = $class->config->{ $suffix } || {};
 
@@ -2380,14 +2398,19 @@
     $levels ||= '';
     $levels =~ s/^\s+//;
     $levels =~ s/\s+$//;
-    my %levels = map { $_ => 1 } split /\s*,\s*/, $levels || '';
-    
+    my %levels = map { $_ => 1 } split /\s*,\s*/, $levels;
+
+    my $env_debug = Catalyst::Utils::env_value( $class, 'DEBUG' );
+    if ( defined $env_debug ) {
+        $levels{debug} = 1 if $env_debug; # Ugly!
+        delete($levels{debug}) unless $env_debug;
+    }
+
     unless ( $class->log ) {
         $class->log( Catalyst::Log->new(keys %levels) );
     }
 
-    my $env_debug = Catalyst::Utils::env_value( $class, 'DEBUG' );
-    if ( defined($env_debug) or $levels{debug} ) {
+    if ( $levels{debug} ) {
         Class::MOP::get_metaclass_by_name($class)->add_method('debug' => sub { 1 });
         $class->log->debug('Debug messages enabled');
     }

Modified: branches/upstream/libcatalyst-perl/current/lib/Catalyst/Component.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/lib/Catalyst/Component.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/lib/Catalyst/Component.pm (original)
+++ branches/upstream/libcatalyst-perl/current/lib/Catalyst/Component.pm Wed Apr 22 08:09:30 2009
@@ -79,7 +79,7 @@
       my ($next_package) = Class::MOP::get_code_info($next);
       warn "There is a COMPONENT method resolving after Catalyst::Component in ${next_package}.\n";
       warn "This behavior can no longer be supported, and so your application is probably broken.\n";
-      warn "Your linearised isa hierarchy is: " . join(', ', mro::get_linear_isa($class)) . "\n";
+      warn "Your linearized isa hierarchy is: " . join(', ', @{ mro::get_linear_isa($class) }) . "\n";
       warn "Please see perldoc Catalyst::Upgrading for more information about this issue.\n";
     }
     return $self->new($c, $arguments);

Modified: branches/upstream/libcatalyst-perl/current/lib/Catalyst/Delta.pod
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/lib/Catalyst/Delta.pod?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/lib/Catalyst/Delta.pod (original)
+++ branches/upstream/libcatalyst-perl/current/lib/Catalyst/Delta.pod Wed Apr 22 08:09:30 2009
@@ -1,6 +1,10 @@
-=head1 Delta changes from 5.7 to 5.8
+=head1 NAME
 
-This is an overview of the user visible changes in 5.8.
+Catalyst::Delta - Overview of changes between versions of Catalyst
+
+=head1 DESCRIPTION
+
+This is an overview of the user-visible changes to Catalyst in version 5.8.
 
 =head2 Deprecations
 

Modified: branches/upstream/libcatalyst-perl/current/lib/Catalyst/DispatchType/Chained.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/lib/Catalyst/DispatchType/Chained.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/lib/Catalyst/DispatchType/Chained.pm (original)
+++ branches/upstream/libcatalyst-perl/current/lib/Catalyst/DispatchType/Chained.pm Wed Apr 22 08:09:30 2009
@@ -86,7 +86,7 @@
 
     my $has_unattached_actions;
     my $unattached_actions = Text::SimpleTable->new(
-        [ 35, 'Private' ], [ 36, 'Missing parent' ],
+        [ 35, 'Private' ], [ $column_width, 'Missing parent' ],
     );
 
     ENDPOINT: foreach my $endpoint (

Modified: branches/upstream/libcatalyst-perl/current/lib/Catalyst/Engine/HTTP/Restarter/Watcher.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/lib/Catalyst/Engine/HTTP/Restarter/Watcher.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/lib/Catalyst/Engine/HTTP/Restarter/Watcher.pm (original)
+++ branches/upstream/libcatalyst-perl/current/lib/Catalyst/Engine/HTTP/Restarter/Watcher.pm Wed Apr 22 08:09:30 2009
@@ -145,10 +145,15 @@
                 my $is_immutable = $meta->can('is_immutable');
                 my $make_mutable = $meta->can('make_mutable');
                 $meta->$make_mutable() if $is_immutable && $make_mutable && $meta->$is_immutable();
+                eval { # Do not explode the watcher process if this fails.
+                    my $superclasses = $meta->can('superclasses');
+                    $meta->$superclasses('Moose::Object') if $superclasses;
+                };
             }
         });
     }
 
+    local $Catalyst::__AM_RESTARTING = 1; # Hack to avoid C3 fail
     delete $INC{$file}; # Remove from %INC so it will reload
     local $SIG{__WARN__} = sub { };
 

Modified: branches/upstream/libcatalyst-perl/current/lib/Catalyst/Log.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/lib/Catalyst/Log.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/lib/Catalyst/Log.pm (original)
+++ branches/upstream/libcatalyst-perl/current/lib/Catalyst/Log.pm Wed Apr 22 08:09:30 2009
@@ -101,6 +101,21 @@
     print STDERR @_;
 }
 
+# 5.7 compat code.
+# Alias _body to body, add a before modifier to warn..
+my $meta = __PACKAGE__->meta; # Calling meta method here fine as we happen at compile time.
+$meta->add_method('body', $meta->get_method('_body'));
+my %package_hash; # Only warn once per method, per package. 
+                  # I haven't provided a way to disable them, patches welcome.
+$meta->add_before_method_modifier('body', sub {
+    my $class = blessed(shift);
+    $package_hash{$class}++ || do {
+        warn("Class $class is calling the deprecated method Catalyst::Log->body method,\n"
+            . "this will be removed in Catalyst 5.81");
+    };
+});
+# End 5.70 backwards compatibility hacks.
+
 no Moose;
 __PACKAGE__->meta->make_immutable(inline_constructor => 0);
 

Modified: branches/upstream/libcatalyst-perl/current/lib/Catalyst/Request.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/lib/Catalyst/Request.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/lib/Catalyst/Request.pm (original)
+++ branches/upstream/libcatalyst-perl/current/lib/Catalyst/Request.pm Wed Apr 22 08:09:30 2009
@@ -76,15 +76,19 @@
   default => sub { {} },
 );
 
-before parameters => sub {
-  my ($self, $params) = @_;
-  if ( $params && !ref $params ) {
-    $self->_context->log->warn(
-        "Attempt to retrieve '$params' with req->params(), " .
-        "you probably meant to call req->param('$params')" );
-    $params = undef;
-  }
-
+around parameters => sub {
+    my ($orig, $self, $params) = @_;
+    if ($params) {
+        if ( !ref $params ) {
+            $self->_context->log->warn(
+                "Attempt to retrieve '$params' with req->params(), " .
+                "you probably meant to call req->param('$params')"
+            );
+            $params = undef;
+        }
+        return $self->$orig($params);
+    }
+    $self->$orig();
 };
 
 has base => (

Modified: branches/upstream/libcatalyst-perl/current/lib/Catalyst/Runtime.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/lib/Catalyst/Runtime.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/lib/Catalyst/Runtime.pm (original)
+++ branches/upstream/libcatalyst-perl/current/lib/Catalyst/Runtime.pm Wed Apr 22 08:09:30 2009
@@ -7,7 +7,7 @@
 
 # Remember to update this in Catalyst as well!
 
-our $VERSION='5.80001';
+our $VERSION='5.80002';
 
 $VERSION = eval $VERSION;
 

Modified: branches/upstream/libcatalyst-perl/current/lib/Catalyst/Upgrading.pod
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/lib/Catalyst/Upgrading.pod?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/lib/Catalyst/Upgrading.pod (original)
+++ branches/upstream/libcatalyst-perl/current/lib/Catalyst/Upgrading.pod Wed Apr 22 08:09:30 2009
@@ -1,3 +1,7 @@
+=head1 NAME
+
+Catalyst::Upgrading - Instructions for upgrading to the latest Catalyst
+
 =head1 Upgrading to Catalyst 5.80
 
 Most applications and plugins should run unaltered on Catalyst 5.80.
@@ -39,7 +43,7 @@
     use base qw/Component1 Component2/;
 
 And the Catalyst plugin most often causing this, is
-L<Catalyst::Plugin::Sesssion::Store::FastMMap> - if you are using this plugin
+L<Catalyst::Plugin::Session::Store::FastMmap> - if you are using this plugin
 and see issues, then please upgrade!
 
 This can, however, be found in your own application - the only solution is to
@@ -283,7 +287,7 @@
 adequately supports your use-case, please email the development list to
 discuss what API features you need so that you can be appropriately supported.
 
-=head2 Class naming to packages defined does not correspond.
+=head2 Class files with names that don't correspond to the packages they define
 
 In this version of Catalyst, if a component is loaded from disk, but no
 symbols are defined in that component's name space after it is loaded, this

Modified: branches/upstream/libcatalyst-perl/current/t/lib/TestApp/Controller/Dump.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/t/lib/TestApp/Controller/Dump.pm?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/t/lib/TestApp/Controller/Dump.pm (original)
+++ branches/upstream/libcatalyst-perl/current/t/lib/TestApp/Controller/Dump.pm Wed Apr 22 08:09:30 2009
@@ -13,13 +13,10 @@
     $c->forward('TestApp::View::Dump', [\%ENV]);
 }
 
-sub parameters : Action Relative {
-    my ( $self, $c ) = @_;
-    $c->forward('TestApp::View::Dump::Parameters');
-}
-
 sub request : Action Relative {
     my ( $self, $c ) = @_;
+    $c->req->params(undef); # Should be a no-op, and be ignored.
+                            # Back compat test for 5.7
     $c->forward('TestApp::View::Dump::Request');
 }
 

Modified: branches/upstream/libcatalyst-perl/current/t/unit_core_setup.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/t/unit_core_setup.t?rev=33687&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/t/unit_core_setup.t (original)
+++ branches/upstream/libcatalyst-perl/current/t/unit_core_setup.t Wed Apr 22 08:09:30 2009
@@ -2,52 +2,70 @@
 use warnings;
 use Catalyst::Runtime;
 
-use Test::More tests => 20;
+use Test::More tests => 29;
 
 {
     # Silence the log.
-    no warnings 'redefine';
-    *Catalyst::Log::_send_to_log = sub {};
+    my $meta = Catalyst::Log->meta;
+    $meta->make_mutable;
+    $meta->remove_method('_send_to_log');
+    $meta->add_method('_send_to_log', sub {});
 }
 
-TESTDEBUG: {
-    package MyTestDebug;
-    use base qw/Catalyst/;
-    __PACKAGE__->setup(
-        '-Debug',
-    );
+sub build_test_app_with_setup {
+    my ($name, @flags) = @_;
+    my $flags = '(' . join(', ', map { "'".$_."'" } @flags) . ')';
+    $flags = '' if $flags eq '()';
+    eval qq{
+        package $name;
+        use Catalyst $flags;
+        $name->setup;
+    };
+    die $@ if $@;
+    return $name;
 }
 
-ok my $c = MyTestDebug->new, 'Get debug app object';
-ok my $log = $c->log, 'Get log object';
-isa_ok $log,        'Catalyst::Log', 'It should be a Catalyst::Log object';
-ok !$log->is_warn,  'Warnings should be disabled';
-ok !$log->is_error, 'Errors should be disabled';
-ok !$log->is_fatal, 'Fatal errors should be disabled';
-ok !$log->is_info,  'Info should be disabled';
-ok $log->is_debug,  'Debugging should be enabled';
-can_ok 'MyTestDebug', 'debug';
-ok +MyTestDebug->debug, 'And it should return true';
+{
+    my $app = build_test_app_with_setup('MyTestDebug', '-Debug');
 
-
-TESTAPP: {
-    package MyTestLog;
-    use base qw/Catalyst/;
-    __PACKAGE__->setup(
-        '-Log=warn,error,fatal'
-    );
+    ok my $c = MyTestDebug->new, 'Get debug app object';
+    ok my $log = $c->log, 'Get log object';
+    isa_ok $log, 'Catalyst::Log', 'It should be a Catalyst::Log object';
+    ok !$log->is_warn, 'Warnings should be disabled';
+    ok !$log->is_error, 'Errors should be disabled';
+    ok !$log->is_fatal, 'Fatal errors should be disabled';
+    ok !$log->is_info, 'Info should be disabled';
+    ok $log->is_debug, 'Debugging should be enabled';
+    ok $app->debug, 'debug method should return true';
 }
 
-ok $c = MyTestLog->new, 'Get log app object';
-ok $log = $c->log, 'Get log object';
-isa_ok $log,        'Catalyst::Log', 'It should be a Catalyst::Log object';
-ok $log->is_warn,   'Warnings should be enabled';
-ok $log->is_error,  'Errors should be enabled';
-ok $log->is_fatal,  'Fatal errors should be enabled';
-ok !$log->is_info,  'Info should be disabled';
-ok !$log->is_debug, 'Debugging should be disabled';
+{
+    my $app = build_test_app_with_setup('MyTestLogParam', '-Log=warn,error,fatal');
 
-TESTOWNLOGGER: {
+    ok my $c = $app->new, 'Get log app object';
+    ok my $log = $c->log, 'Get log object';
+    isa_ok $log, 'Catalyst::Log', 'It should be a Catalyst::Log object';
+    ok $log->is_warn, 'Warnings should be enabled';
+    ok $log->is_error, 'Errors should be enabled';
+    ok $log->is_fatal, 'Fatal errors should be enabled';
+    ok !$log->is_info, 'Info should be disabled';
+    ok !$log->is_debug, 'Debugging should be disabled';
+    ok !$c->debug, 'Catalyst debugging is off';
+}
+{
+    my $app = build_test_app_with_setup('MyTestNoParams');
+
+    ok my $c = $app->new, 'Get log app object';
+    ok my $log = $c->log, 'Get log object';
+    isa_ok $log, 'Catalyst::Log', 'It should be a Catalyst::Log object';
+    ok $log->is_warn, 'Warnings should be enabled';
+    ok $log->is_error, 'Errors should be enabled';
+    ok $log->is_fatal, 'Fatal errors should be enabled';
+    ok $log->is_info, 'Info should be enabled';
+    ok $log->is_debug, 'Debugging should be enabled';
+    ok !$c->debug, 'Catalyst debugging turned off';
+}
+{
     package MyTestAppWithOwnLogger;
     use base qw/Catalyst/;
     use Test::MockObject;
@@ -57,5 +75,6 @@
     __PACKAGE__->setup('-Debug');
 }
 
-ok $c = MyTestAppWithOwnLogger->new, 'Get with own logger app object';
+ok my $c = MyTestAppWithOwnLogger->new, 'Get with own logger app object';
 ok $c->debug, '$c->debug is true';
+

Added: branches/upstream/libcatalyst-perl/current/t/unit_core_setup_log.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/t/unit_core_setup_log.t?rev=33687&op=file
==============================================================================
--- branches/upstream/libcatalyst-perl/current/t/unit_core_setup_log.t (added)
+++ branches/upstream/libcatalyst-perl/current/t/unit_core_setup_log.t Wed Apr 22 08:09:30 2009
@@ -1,0 +1,98 @@
+use strict;
+use warnings;
+
+use Test::More tests => 30;
+use Test::Exception;
+
+use Catalyst ();
+
+sub mock_app {
+    my $name = shift;
+    print "Setting up mock application: $name\n";
+    my $meta = Moose->init_meta( for_class => $name );
+    $meta->superclasses('Catalyst');
+    return $meta->name;
+}
+
+sub test_log_object {
+    my ($log, %expected) = @_;
+    foreach my $level (keys %expected) {
+        my $method_name = "is_$level";
+        if ($expected{$level}) {
+            ok( $log->$method_name(), "Level $level on" );
+        }
+        else {
+            ok( !$log->$method_name(), "Level $level off" );
+        }
+    }
+}
+
+local %ENV; # Ensure blank or someone, somewhere will fail..
+
+{
+    my $app = mock_app('TestLogAppParseLevels');
+    $app->setup_log('error,warn');
+    ok !$app->debug, 'Not in debug mode';
+    test_log_object($app->log,
+        fatal => 0, # WTF - I thought log levels were additive these days,
+                    # or do I not understand the patch which pupported to make
+                    # them so?
+        error => 1,
+        warn => 1,
+        info => 0,
+        debug => 0,
+    );
+}
+{
+    local %ENV = ( CATALYST_DEBUG => 1 );
+    my $app = mock_app('TestLogAppDebugEnvSet');
+    $app->setup_log('');
+    ok $app->debug, 'In debug mode';
+    test_log_object($app->log,
+        fatal => 0,
+        error => 0,
+        warn => 0,
+        info => 0,
+        debug => 1,
+    );
+}
+{
+    local %ENV = ( CATALYST_DEBUG => 0 );
+    my $app = mock_app('TestLogAppDebugEnvUnset');
+    $app->setup_log('warn');
+    ok !$app->debug, 'Not In debug mode';
+    test_log_object($app->log,
+        fatal => 0,
+        error => 0,
+        warn => 1,
+        info => 0,
+        debug => 0,
+    );
+}
+{
+    my $app = mock_app('TestLogAppEmptyString');
+    $app->setup_log('');
+    ok !$app->debug, 'Not In debug mode';
+    TODO: {
+        local $TODO = 'THis is insane';
+        test_log_object($app->log,
+            fatal => 0,
+            error => 0,
+            warn => 0,
+            info => 0,
+            debug => 0,
+        );
+    }
+}
+{
+    my $app = mock_app('TestLogAppDebugOnly');
+    $app->setup_log('debug');
+    ok $app->debug, 'In debug mode';
+    test_log_object($app->log,
+        fatal => 0,
+        error => 0,
+        warn => 0,
+        info => 0,
+        debug => 1,
+    );
+}

Added: branches/upstream/libcatalyst-perl/current/t/unit_metaclass_compat_non_moose_controller.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/t/unit_metaclass_compat_non_moose_controller.t?rev=33687&op=file
==============================================================================
--- branches/upstream/libcatalyst-perl/current/t/unit_metaclass_compat_non_moose_controller.t (added)
+++ branches/upstream/libcatalyst-perl/current/t/unit_metaclass_compat_non_moose_controller.t Wed Apr 22 08:09:30 2009
@@ -1,0 +1,26 @@
+use Catalyst ();
+
+{
+    package TestApp::Controller::Base;
+    use base qw/Catalyst::Controller/;
+}
+{
+    package TestApp::Controller::Other;
+    use base qw/TestApp::Controller::Base/;
+}
+
+Catalyst->setup_component('TestApp::Controller::Other');
+Catalyst->setup_component('TestApp::Controller::Base');
+
+use Test::More tests => 1;
+use Test::Exception;
+
+# Metaclass init order causes fail.
+# There are TODO tests in Moose for this, see
+# f2391d17574eff81d911b97be15ea51080500003
+# after which the evil kludge in core can die in a fire.
+
+lives_ok {
+    TestApp::Controller::Base->get_action_methods
+} 'Base class->get_action_methods ok when sub class initialized first';
+




More information about the Pkg-perl-cvs-commits mailing list