Skip to content

Commit

Permalink
Merge branch 'master' into gsoc_breadboard
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewalker committed Oct 20, 2012
2 parents 4055796 + d6ae510 commit add5e41
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 7 deletions.
17 changes: 17 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# This file documents the revision history for Perl extension Catalyst.

5.90017 - 2012-10-19 22:33:00
- Change Catalsyt _parse_attrs so that when sub attr handlers:

1) Can return multiple pairs of new attributes.
2) Get their returned attributes passed through the correct attribute handler.

e.g sub _parse_Whatever_attr { return Chained => 'foo', PathPart => 'bar' }

Will now work because both new attributes are respected, and the Chained
attribute is passed to _parse_Chained_attr and fixed up correctly by that.

- In Catalyst::Test, don't mangle headers of non-HTML responses. RT#79043

- Refactor request and response class construction to add methods
that roles can hook to feed extra parameters into the constructor
of request or response classes.

5.90016 - 2012-08-16 15:35:00
- prepare_parameters is no longer an attribute builder. It is now a method
that calls the correct underlying functionality (Bill Moseley++)
Expand Down
20 changes: 15 additions & 5 deletions lib/Catalyst.pm
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,30 @@ has request => (
is => 'rw',
default => sub {
my $self = shift;
my %p = ( _log => $self->log );
$p{_uploadtmp} = $self->_uploadtmp if $self->_has_uploadtmp;
$self->request_class->new(\%p);
$self->request_class->new($self->_build_request_constructor_args);
},
lazy => 1,
);
sub _build_request_constructor_args {
my $self = shift;
my %p = ( _log => $self->log );
$p{_uploadtmp} = $self->_uploadtmp if $self->_has_uploadtmp;
\%p;
}

has response => (
is => 'rw',
default => sub {
my $self = shift;
$self->response_class->new({ _log => $self->log });
$self->response_class->new($self->_build_response_constructor_args);
},
lazy => 1,
);
sub _build_response_constructor_args {
my $self = shift;
{ _log => $self->log };
}

has namespace => (is => 'rw');

sub depth { scalar @{ shift->stack || [] }; }
Expand Down Expand Up @@ -101,7 +111,7 @@ __PACKAGE__->stats_class('Catalyst::Stats');

# Remember to update this in Catalyst::Runtime as well!

our $VERSION = '5.90016';
our $VERSION = '5.90017';

sub import {
my ( $class, @arguments ) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Catalyst/Controller.pm
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ sub register_action_methods {
my $attributes = $method->can('attributes') ? $method->attributes : [];
my $attrs = $self->_parse_attrs( $c, $name, @{ $attributes } );
if ( $attrs->{Private} && ( keys %$attrs > 1 ) ) {
$c->log->debug( 'Bad action definition "'
$c->log->warn( 'Bad action definition "'
. join( ' ', @{ $attributes } )
. qq/" for "$class->$name"/ )
if $c->debug;
Expand Down
2 changes: 1 addition & 1 deletion lib/Catalyst/Runtime.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BEGIN { require 5.008003; }

# Remember to update this in Catalyst as well!

our $VERSION = '5.90016';
our $VERSION = '5.90017';

=head1 NAME
Expand Down

0 comments on commit add5e41

Please sign in to comment.