X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FView.pm;h=1959a77729c323f2bb05ef35ce48592a81007109;hb=85f0a66f2b5de7a028ed0e4960435784baff4a37;hp=51ff5d41836048a9f8746f7d0b68ddda6afce221;hpb=a8dc76a1260561f17e6513a243473967582ed48a;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/View.pm b/lib/Catalyst/View.pm index 51ff5d4..1959a77 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 qw/Catalyst::Component/; =head1 NAME @@ -46,32 +46,9 @@ sub process { } -=head2 $c->merge_hash_config( $hashref, $hashref ) +=head1 AUTHORS -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 -Marcus Ramberg, C +Catalyst Contributors, see Catalyst.pm =head1 COPYRIGHT @@ -80,4 +57,7 @@ the same terms as Perl itself. =cut +no Moose; +__PACKAGE__->meta->make_immutable(); + 1;