From: Sebastian Riedel Date: Thu, 8 Dec 2005 05:08:16 +0000 (+0000) Subject: Updated makefile template X-Git-Tag: 5.7099_04~785 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=775878acfe0ae20a31872d7288f6e817144c37ac Updated makefile template --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index dc56b88..fa7ca6a 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -44,7 +44,7 @@ our $DETACH = "catalyst_detach\n"; require Module::Pluggable::Fast; # Helper script generation -our $CATALYST_SCRIPT_GEN = 24; +our $CATALYST_SCRIPT_GEN = 25; __PACKAGE__->mk_classdata($_) for qw/components arguments dispatcher engine log dispatcher_class @@ -1016,19 +1016,18 @@ sub finalize_headers { # Content-Length if ( $c->response->body && !$c->response->content_length ) { + # get the length from a filehandle if ( ref $c->response->body && $c->response->body->can('read') ) { if ( my $stat = stat $c->response->body ) { $c->response->content_length( $stat->size ); } else { - $c->log->warn( - 'Serving filehandle without a content-length' ); + $c->log->warn('Serving filehandle without a content-length'); } } else { - $c->response->content_length( - bytes::length( $c->response->body ) ); + $c->response->content_length( bytes::length( $c->response->body ) ); } } diff --git a/lib/Catalyst/Helper.pm b/lib/Catalyst/Helper.pm index b148293..49122a4 100644 --- a/lib/Catalyst/Helper.pm +++ b/lib/Catalyst/Helper.pm @@ -605,7 +605,7 @@ all_from '[% path %]'; requires Catalyst => '5.62'; -catalyst_files; +catalyst; install_script glob('script/*.pl'); auto_install; diff --git a/lib/Module/Install/Catalyst.pm b/lib/Module/Install/Catalyst.pm index 70c03c8..883d278 100644 --- a/lib/Module/Install/Catalyst.pm +++ b/lib/Module/Install/Catalyst.pm @@ -35,6 +35,16 @@ L extension for Catalyst. =head1 METHODS +=head2 catalyst + +=cut + +sub catalyst { + my $self = shift; + $self->catalyst_files; + $self->catalyst_par; +} + =head2 catalyst_files =cut