From: André Walker Date: Fri, 20 Jul 2012 03:56:32 +0000 (-0300) Subject: debug screen now uses get_all_component_services X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=d87eba4d709c2db0756466df8d8a5137a67ef8f1 debug screen now uses get_all_component_services --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 9c7dec2..f9ebe51 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1020,11 +1020,20 @@ EOF if ( $class->debug and - my $comps = $class->container->get_all_components($class) + 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, 'Type' ] ); - $t->row( $_ => ref($comps->{$_}) ? 'instance' : 'class' ) for keys %$comps; + my $t = Text::SimpleTable->new( [ $column_width, 'Class' ], [ 8, 'Lifecycle' ] ); + + # FIXME + # I don't really know what we're going to show here + while (my ($class, $info) = each %$comps) { + my $lifecycle = $info->{backcompat_service} + ? $info->{backcompat_service}->lifecycle + : $info->{service}->lifecycle + ; + $t->row( $class, $lifecycle ); + } $class->log->debug( "Loaded components:\n" . $t->draw . "\n" ); }