X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FView.pm;h=11a216f9f263d16bb8ccd83b18748428da80ebec;hb=6323fda2e7ace0fc0aa06305c674957cedc6d025;hp=51ff5d41836048a9f8746f7d0b68ddda6afce221;hpb=a8dc76a1260561f17e6513a243473967582ed48a;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/View.pm b/lib/Catalyst/View.pm index 51ff5d4..11a216f 100644 --- a/lib/Catalyst/View.pm +++ b/lib/Catalyst/View.pm @@ -1,7 +1,7 @@ package Catalyst::View; -use strict; -use base qw/Catalyst::Component/; +use Moose; +extends 'Catalyst::Component'; =head1 NAME @@ -19,15 +19,15 @@ Catalyst::View - Catalyst View base class =head1 DESCRIPTION -This is the Catalyst View base class. It's meant to be used as +This is the Catalyst View base class. It's meant to be used as a base class by Catalyst views. -As a convention, views are expected to read template names from +As a convention, views are expected to read template names from $c->stash->{template}, and put the output into $c->res->body. Some views default to render a template named after the dispatched action's private name. (See L.) -=head1 METHODS +=head1 METHODS Implements the same methods as other Catalyst components, see L @@ -52,22 +52,6 @@ Merges two hashes together recursively, giving right-hand precedence. =cut -sub merge_config_hashes { - my ( $self, $lefthash, $righthash ) = @_; - - my %merged = %$lefthash; - for my $key ( keys %$righthash ) { - my $right_ref = ( ref $righthash->{ $key } || '' ) eq 'HASH'; - my $left_ref = ( ( exists $lefthash->{ $key } && ref $lefthash->{ $key } ) || '' ) eq 'HASH'; - if( $right_ref and $left_ref ) { - $merged{ $key } = $self->merge_config_hashes( - $lefthash->{ $key }, $righthash->{ $key } - ); - } - } -} - - =head1 AUTHOR Sebastian Riedel, C