From: Karen Etheridge Date: Sun, 11 Mar 2012 18:21:40 +0000 (-0700) Subject: strict/warnings, and explanatory comments X-Git-Tag: 0.13~14 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=02e25b000b1a4ed8779f538eb35861336ff6b53f;p=gitmo%2FMooseX-UndefTolerant.git strict/warnings, and explanatory comments --- diff --git a/lib/MooseX/UndefTolerant.pm b/lib/MooseX/UndefTolerant.pm index e44a3e4..59d50f1 100644 --- a/lib/MooseX/UndefTolerant.pm +++ b/lib/MooseX/UndefTolerant.pm @@ -1,5 +1,8 @@ package MooseX::UndefTolerant; +use strict; +use warnings; + use Moose qw(); use Moose::Exporter; diff --git a/lib/MooseX/UndefTolerant/Class.pm b/lib/MooseX/UndefTolerant/Class.pm index d8484b9..3aa9ac0 100644 --- a/lib/MooseX/UndefTolerant/Class.pm +++ b/lib/MooseX/UndefTolerant/Class.pm @@ -1,4 +1,10 @@ package MooseX::UndefTolerant::Class; + +# applied to metaclass, for Moose >= 1.9900 + +use strict; +use warnings; + use Moose::Role; around _inline_init_attr_from_constructor => sub { @@ -19,5 +25,4 @@ around _inline_init_attr_from_constructor => sub { }; no Moose::Role; - 1; diff --git a/lib/MooseX/UndefTolerant/Constructor.pm b/lib/MooseX/UndefTolerant/Constructor.pm index 9f4046c..2bd102a 100644 --- a/lib/MooseX/UndefTolerant/Constructor.pm +++ b/lib/MooseX/UndefTolerant/Constructor.pm @@ -1,6 +1,12 @@ package MooseX::UndefTolerant::Constructor; + +# applied to constructor method metaclass, for Moose < 1.9900 + use Moose::Role; +use strict; +use warnings; + around _generate_slot_initializer => sub { my $orig = shift; my $self = shift;