some todos
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index 46fc522..7861b5f 100644 (file)
@@ -1022,8 +1022,8 @@ EOF
         $class->debug and
         my $comps = $class->container->get_all_component_services($class)
     ) {
-        my $column_width = Catalyst::Utils::term_width() - 8 - 9;
-        my $t = Text::SimpleTable->new( [ $column_width, 'Class' ], [ 8, 'Lifecycle' ] );
+        my $column_width = Catalyst::Utils::term_width() - 16 - 9;
+        my $t = Text::SimpleTable->new( [ $column_width, 'Class' ], [ 16, 'Lifecycle' ] );
 
         # FIXME
         # I don't really know what we're going to show here
@@ -1473,7 +1473,13 @@ sub components {
         $container->add_component( $_ ) for keys %$comps;
     }
 
-    return $container->get_all_components($class);
+    # FIXME:
+    # t0m says should be "ref($c) ? $c->container->get_all_singleton_lifecycle_components : $c->container->get_all_components($c)".
+    # are you sure? isn't it the other way around?
+    # i.e. ref($c) ? get_all_components($c) : get_all_singleton_lifecycle_components()
+    return
+        ref($class) ? $container->get_all_singleton_lifecycle_components
+                    : $container->get_all_components($class);
 }
 
 =head2 $c->context_class