X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FView.pm;h=1959a77729c323f2bb05ef35ce48592a81007109;hb=c019b3a311563045e12d4c4f17ed54f56551f28b;hp=d9e884fa21290b3ac058405e004a9ed9e1635b12;hpb=76ddf86be66ed259d24226618a1d357e6f606fa1;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/View.pm b/lib/Catalyst/View.pm index d9e884f..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 @@ -32,10 +32,23 @@ action's private name. (See L.) Implements the same methods as other Catalyst components, see L -=head1 AUTHOR +=head2 process -Sebastian Riedel, C -Marcus Ramberg, C +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" ); + +} + +=head1 AUTHORS + +Catalyst Contributors, see Catalyst.pm =head1 COPYRIGHT @@ -44,4 +57,7 @@ the same terms as Perl itself. =cut +no Moose; +__PACKAGE__->meta->make_immutable(); + 1;