[Catalyst-commits] r11894 - in
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent:
lib lib/Catalyst t/lib
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Wed Nov 18 22:24:44 GMT 2009
Author: t0m
Date: 2009-11-18 22:24:42 +0000 (Wed, 18 Nov 2009)
New Revision: 11894
Modified:
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/lib/Catalyst.pm
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/lib/Catalyst/Component.pm
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/lib/Catalyst/Dispatcher.pm
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/t/lib/TestApp.pm
Log:
The Go and visit tests don't like this as you get told to go away in a different manor, bit this appears to largely work
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/lib/Catalyst/Component.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/lib/Catalyst/Component.pm 2009-11-18 22:11:25 UTC (rev 11893)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/lib/Catalyst/Component.pm 2009-11-18 22:24:42 UTC (rev 11894)
@@ -10,10 +10,12 @@
use Scalar::Util 'blessed';
use namespace::clean -except => 'meta';
-with 'MooseX::Emulate::Class::Accessor::Fast';
-with 'Catalyst::ClassData';
+with qw/
+ MooseX::Emulate::Class::Accessor::Fast
+ Catalyst::Config
+ Catalyst::ClassData
+/;
-
=head1 NAME
Catalyst::Component - Catalyst Component Base Class
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/lib/Catalyst/Dispatcher.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/lib/Catalyst/Dispatcher.pm 2009-11-18 22:11:25 UTC (rev 11893)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/lib/Catalyst/Dispatcher.pm 2009-11-18 22:24:42 UTC (rev 11894)
@@ -319,20 +319,6 @@
sub _invoke_as_component {
my ( $self, $c, $component_or_class, $method ) = @_;
- if( $component_or_class eq blessed($c->application) ){
- my $possible_action = $c->application->action_for($method);
- return $possible_action if $possible_action;
- if( my $code = $c->application->can($method) ){
- return $self->_method_action_class->new( {
- name => $method,
- code => $code,
- reverse => "$component_or_class->$method",
- class => $component_or_class,
- namespace => Catalyst::Utils::class2prefix( $component_or_class ),
- }
- );
- }
- }
my $component = $self->_find_component($c, $component_or_class);
my $component_class = blessed $component || return 0;
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/lib/Catalyst.pm 2009-11-18 22:11:25 UTC (rev 11893)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/lib/Catalyst.pm 2009-11-18 22:24:42 UTC (rev 11894)
@@ -3,6 +3,11 @@
use Moose;
use Moose::Meta::Class ();
extends 'Catalyst::Component';
+with qw/
+ MooseX::Emulate::Class::Accessor::Fast
+ Catalyst::Config
+ Catalyst::ClassData
+/;
use Moose::Util qw/find_meta/;
use B::Hooks::EndOfScope ();
use Catalyst::Exception;
@@ -523,6 +528,7 @@
return $c->_filter_component( $comp, @args ) if $comp;
}
+ return if $c->config->{disable_component_resolution_regex_fallback};
# This is here so $c->comp( '::M::' ) works
my $query = ref $name ? $name : qr{$name}i;
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/t/lib/TestApp.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/t/lib/TestApp.pm 2009-11-18 22:11:25 UTC (rev 11893)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/t/lib/TestApp.pm 2009-11-18 22:24:42 UTC (rev 11894)
@@ -19,7 +19,10 @@
our $VERSION = '0.01';
-TestApp->config( name => 'TestApp', root => '/some/dir' );
+TestApp->config(
+ name => 'TestApp', root => '/some/dir',
+ disable_component_resolution_regex_fallback => 1,
+);
TestApp->context_class( 'TestApp::Context' );
TestApp->setup;
More information about the Catalyst-commits
mailing list