X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=04a8ad443e1c2ad863384790340a6ae1167f4eb6;hp=bb2bad525f1b803fe3f4f79a19aa747847850936;hb=e5ce5f041fbf07a6287a09a91089c30bee60b6f4;hpb=75b658164c8db8bec31f4d29f198402d6f6bc110 diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index bb2bad5..04a8ad4 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -78,10 +78,7 @@ __PACKAGE__->stats_class('Catalyst::Stats'); # Remember to update this in Catalyst::Runtime as well! -our $VERSION = '5.80021'; -our $PRETTY_VERSION = $VERSION; - -$VERSION = eval $VERSION; +our $VERSION = '5.80022'; sub import { my ( $class, @arguments ) = @_; @@ -1162,7 +1159,7 @@ EOF if ( $class->debug ) { my $name = $class->config->{name} || 'Application'; - $class->log->info("$name powered by Catalyst $Catalyst::PRETTY_VERSION"); + $class->log->info("$name powered by Catalyst $Catalyst::VERSION"); } # Make sure that the application class becomes immutable at this point, @@ -1893,7 +1890,7 @@ namespaces. sub get_actions { my $c = shift; $c->dispatcher->get_actions( $c, @_ ) } -=head2 $c->handle_request( $class, @arguments ) +=head2 $app->handle_request( @arguments ) Called to handle each HTTP request. @@ -1953,7 +1950,7 @@ sub prepare { #surely this is not the most efficient way to do things... $c->stats($class->stats_class->new)->enable($c->use_stats); - if ( $c->debug ) { + if ( $c->debug || $c->config->{enable_catalyst_header} ) { $c->res->headers->header( 'X-Catalyst' => $Catalyst::VERSION ); } @@ -2278,7 +2275,8 @@ sub log_headers { return unless $c->debug; - my $t = Text::SimpleTable->new( [ 35, 'Header Name' ], [ 40, 'Value' ] ); + my $column_width = Catalyst::Utils::term_width() - 28; + my $t = Text::SimpleTable->new( [ 15, 'Header Name' ], [ $column_width, 'Value' ] ); $headers->scan( sub { my ( $name, $value ) = @_; @@ -2789,13 +2787,8 @@ the plugin name does not begin with C. if $plugin->isa( 'Catalyst::Component' ); $proto->_plugins->{$plugin} = 1; unless ($instant) { - no strict 'refs'; - if ( my $meta = Class::MOP::get_metaclass_by_name($class) ) { - my @superclasses = ($plugin, $meta->superclasses ); - $meta->superclasses(@superclasses); - } else { - unshift @{"$class\::ISA"}, $plugin; - } + my $meta = Class::MOP::get_metaclass_by_name($class); + $meta->superclasses($plugin, $meta->superclasses); } return $class; }