Remove warnings for using Catalyst::Dispatcher->dispatch_types
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Dispatcher.pm
index 9d2ae4a..c790da7 100644 (file)
@@ -29,7 +29,7 @@ our @POSTLOAD = qw/Default/;
 
 # Note - see back-compat methods at end of file.
 has _tree => (is => 'rw', builder => '_build__tree');
-has _dispatch_types => (is => 'rw', default => sub { [] }, required => 1, lazy => 1);
+has dispatch_types => (is => 'rw', default => sub { [] }, required => 1, lazy => 1);
 has _registered_dispatch_types => (is => 'rw', default => sub { {} }, required => 1, lazy => 1);
 has _method_action_class => (is => 'rw', default => 'Catalyst::Action');
 has _action_hash => (is => 'rw', required => 1, lazy => 1, default => sub { {} });
@@ -131,7 +131,7 @@ sub _command2action {
     my (@args, @captures);
 
     if ( ref( $extra_params[-2] ) eq 'ARRAY' ) {
-        @captures = @{ pop @extra_params };
+        @captures = @{ splice @extra_params, -2, 1 };
     }
 
     if ( ref( $extra_params[-1] ) eq 'ARRAY' ) {
@@ -335,7 +335,7 @@ sub _invoke_as_component {
                 reverse   => "$component_class->$method",
                 class     => $component_class,
                 namespace => Catalyst::Utils::class2prefix(
-                    $component_class, $c->config->{case_sensitive}
+                    $component_class, ref($c)->config->{case_sensitive}
                 ),
             }
         );
@@ -619,9 +619,6 @@ sub _display_action_tables {
     my $col1_width = ($avail_width * .25) < 20 ? 20 : int($avail_width * .25);
     my $col2_width = ($avail_width * .50) < 36 ? 36 : int($avail_width * .50);
     my $col3_width =  $avail_width - $col1_width - $col2_width;
-    $c->log->debug("col1: $col1_width");
-    $c->log->debug("col2: $col2_width");
-    $c->log->debug("col3: $col3_width");
     my $privates = Text::SimpleTable->new(
         [ $col1_width, 'Private' ], [ $col2_width, 'Class' ], [ $col3_width, 'Method' ]
     );
@@ -725,7 +722,6 @@ use Moose;
 # Alias _method_name to method_name, add a before modifier to warn..
 foreach my $public_method_name (qw/
         tree
-        dispatch_types
         registered_dispatch_types
         method_action_class
         action_hash