PodTests became PodCoverageTests + PodSyntaxTests.
[gitmo/MooseX-StrictConstructor.git] / lib / MooseX / StrictConstructor / Trait / Class.pm
index 75dc3e0..1bfb0f5 100644 (file)
@@ -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;
@@ -23,7 +22,7 @@ around '_inline_BUILDALL' => sub {
 
     return (
         @source,
-        'my %attrs = (' . join(' ', @attrs) . ');',
+        'my %attrs = (' . ( join ' ', @attrs ) . ');',
         'my @bad = sort grep { !$attrs{$_} } keys %{ $params };',
         'if (@bad) {',
             'Carp::confess "Found unknown attribute(s) passed to the constructor: @bad";',
@@ -31,8 +30,6 @@ around '_inline_BUILDALL' => sub {
     );
 };
 
-no Moose::Role;
-
 1;
 
 # ABSTRACT: A role to make immutable constructors strict
@@ -41,16 +38,6 @@ __END__
 
 =pod
 
-=head1 SYNOPSIS
-
-  Moose::Util::MetaRole::apply_metaroles(
-      for_class => $caller,
-      class     => {
-          constructor =>
-              ['MooseX::StrictConstructor::Trait::Method::Constructor'],
-      },
-  );
-
 =head1 DESCRIPTION
 
 This role simply wraps C<_inline_BUILDALL()> (from