bye bye Class::C3. for good.
[catagits/Catalyst-Runtime.git] / lib / Catalyst / View.pm
index d9e884f..1e580c3 100644 (file)
@@ -1,7 +1,7 @@
 package Catalyst::View;
 
-use strict;
-use base qw/Catalyst::Component/;
+use Moose;
+extends qw/Catalyst::Component/;
 
 =head1 NAME
 
@@ -32,6 +32,26 @@ action's private name. (See L<Catalyst::Action>.)
 Implements the same methods as other Catalyst components, see
 L<Catalyst::Component>
 
+=head2 process
+
+gives an error message about direct use.
+
+=cut
+
+sub process {
+
+    Catalyst::Exception->throw( message => ( ref $_[0] || $_[0] ).
+            " directly inherits from Catalyst::View. You need to\n".
+            " inherit from a subclass like Catalyst::View::TT instead.\n" );
+
+}
+
+=head2 $c->merge_hash_config( $hashref, $hashref )
+
+Merges two hashes together recursively, giving right-hand precedence.
+
+=cut
+
 =head1 AUTHOR
 
 Sebastian Riedel, C<sri@oook.de>
@@ -44,4 +64,7 @@ the same terms as Perl itself.
 
 =cut
 
+no Moose;
+#__PACKAGE__->meta->make_immutable();
+
 1;