Make the subrequest plugins Moose classes with a constructor
Tomas Doran [Sun, 24 Jan 2010 22:46:05 +0000 (22:46 +0000)]
lib/Catalyst/View/Component/SubInclude/ESI.pm
lib/Catalyst/View/Component/SubInclude/SubRequest.pm
lib/Catalyst/View/Component/SubInclude/Visit.pm

index 6ea8d3c..8909f9f 100644 (file)
@@ -1,6 +1,6 @@
 package Catalyst::View::Component::SubInclude::ESI;
-use warnings;
-use strict;
+use Moose;
+use namespace::clean -except => 'meta';
 
 =head1 NAME
 
@@ -87,4 +87,5 @@ under the same terms as Perl itself.
 
 =cut
 
+__PACKAGE__->meta->make_immutable;
 1;
index c1c882a..b931a74 100644 (file)
@@ -1,10 +1,7 @@
 package Catalyst::View::Component::SubInclude::SubRequest;
-use warnings;
-use strict;
-
+use Moose;
 use Carp qw/croak/;
-use Scalar::Util qw/blessed/;
-use namespace::clean;
+use namespace::clean -except => 'meta';
 
 =head1 NAME
 
@@ -112,4 +109,5 @@ under the same terms as Perl itself.
 
 =cut
 
+__PACKAGE__->meta->make_immutable;
 1;
index d5c5ec0..7ffae03 100644 (file)
@@ -1,9 +1,7 @@
 package Catalyst::View::Component::SubInclude::Visit;
-use warnings;
-use strict;
-
+use Moose;
 use Carp qw/croak/;
-use namespace::clean;
+use namespace::clean -except => 'meta';
 
 =head1 NAME
 
@@ -104,4 +102,5 @@ under the same terms as Perl itself.
 
 =cut
 
+__PACKAGE__->meta->make_immutable;
 1;