From: Dave Rolsky Date: Wed, 23 Feb 2011 03:50:09 +0000 (-0600) Subject: modernize Moose usage X-Git-Tag: v0.13~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d99e6f32565008c417a6bf7a3335942df1f67e1b;p=gitmo%2FMooseX-StrictConstructor.git modernize Moose usage --- diff --git a/dist.ini b/dist.ini index 57e8669..39efad3 100644 --- a/dist.ini +++ b/dist.ini @@ -32,6 +32,7 @@ repository.type = git [Prereqs] Moose = 0.94 +namespace::autoclean = 0 [Prereqs / TestRequires] Test::Fatal = 0 diff --git a/lib/MooseX/StrictConstructor/Role/Object.pm b/lib/MooseX/StrictConstructor/Role/Object.pm index 434f19d..4eef0d4 100644 --- a/lib/MooseX/StrictConstructor/Role/Object.pm +++ b/lib/MooseX/StrictConstructor/Role/Object.pm @@ -1,10 +1,9 @@ package MooseX::StrictConstructor::Role::Object; -use strict; -use warnings; - use Moose::Role; +use namespace::autoclean; + after 'BUILDALL' => sub { my $self = shift; my $params = shift; @@ -26,8 +25,6 @@ after 'BUILDALL' => sub { return; }; -no Moose::Role; - 1; # ABSTRACT: A role which implements a strict constructor for Moose::Object diff --git a/lib/MooseX/StrictConstructor/Trait/Class.pm b/lib/MooseX/StrictConstructor/Trait/Class.pm index f3d2850..1bfb0f5 100644 --- a/lib/MooseX/StrictConstructor/Trait/Class.pm +++ b/lib/MooseX/StrictConstructor/Trait/Class.pm @@ -1,13 +1,12 @@ package MooseX::StrictConstructor::Trait::Class; -use strict; -use warnings; +use Moose::Role; + +use namespace::autoclean; use B (); use Carp (); -use Moose::Role; - around '_inline_BUILDALL' => sub { my $orig = shift; my $self = shift; @@ -31,8 +30,6 @@ around '_inline_BUILDALL' => sub { ); }; -no Moose::Role; - 1; # ABSTRACT: A role to make immutable constructors strict diff --git a/lib/MooseX/StrictConstructor/Trait/Method/Constructor.pm b/lib/MooseX/StrictConstructor/Trait/Method/Constructor.pm index 8c36810..3c228b0 100644 --- a/lib/MooseX/StrictConstructor/Trait/Method/Constructor.pm +++ b/lib/MooseX/StrictConstructor/Trait/Method/Constructor.pm @@ -1,13 +1,12 @@ package MooseX::StrictConstructor::Trait::Method::Constructor; -use strict; -use warnings; +use Moose::Role; + +use namespace::autoclean; use B (); use Carp (); -use Moose::Role; - around '_generate_BUILDALL' => sub { my $orig = shift; my $self = shift; @@ -35,8 +34,6 @@ EOF return $source; }; -no Moose::Role; - 1; # ABSTRACT: A role to make immutable constructors strict