[Catalyst-commits] r8666 - in Catalyst-Runtime/5.80/trunk: lib t
marcus at dev.catalyst.perl.org
marcus at dev.catalyst.perl.org
Sun Nov 30 00:29:57 GMT 2008
Author: marcus
Date: 2008-11-30 00:29:57 +0000 (Sun, 30 Nov 2008)
New Revision: 8666
Modified:
Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
Catalyst-Runtime/5.80/trunk/t/unit_core_mvc.t
Log:
Fix ACCEPT_CONTEXT on MyApp
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2008-11-28 13:27:39 UTC (rev 8665)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2008-11-30 00:29:57 UTC (rev 8666)
@@ -526,7 +526,7 @@
sub _filter_component {
my ( $c, $comp, @args ) = @_;
- if ( Scalar::Util::blessed($c) && eval { $comp->can('ACCEPT_CONTEXT'); } ) {
+ if ( eval { $comp->can('ACCEPT_CONTEXT'); } ) {
return $comp->ACCEPT_CONTEXT( $c, @args );
}
Modified: Catalyst-Runtime/5.80/trunk/t/unit_core_mvc.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/unit_core_mvc.t 2008-11-28 13:27:39 UTC (rev 8665)
+++ Catalyst-Runtime/5.80/trunk/t/unit_core_mvc.t 2008-11-30 00:29:57 UTC (rev 8666)
@@ -1,4 +1,4 @@
-use Test::More tests => 46;
+use Test::More tests => 45;
use strict;
use warnings;
@@ -160,7 +160,7 @@
# test accept-context with class rather than instance
MyApp->model('M', qw/foo bar/);
- is_deeply($args, [qw/foo bar/], '$c->model args passed to ACCEPT_CONTEXT ok');
+ is_deeply($args, [qw/foo bar/], 'MyApp->model args passed to ACCEPT_CONTEXT ok');
$c->model('M', qw/foo bar/);
@@ -173,7 +173,5 @@
$c->view('::View::V', qw/foo3 bar3/);
is_deeply($args, [qw/foo3 bar3/], 'args passed to ACCEPT_CONTEXT ok');
- undef $args;
- MyApp->model('M', qw/foo bar/);
- is($args, undef, 'MyApp->model does not invoke ACCEPT_CONTEXT');
+
}
More information about the Catalyst-commits
mailing list