From: Dave Rolsky Date: Thu, 28 Mar 2013 16:05:58 +0000 (-0500) Subject: Make prereq requirements explicit in code X-Git-Tag: v0.27~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cd8784bb787360b59a0df1d8513633ce2bd593f4;p=gitmo%2FMooseX-ClassAttribute.git Make prereq requirements explicit in code --- diff --git a/lib/MooseX/ClassAttribute.pm b/lib/MooseX/ClassAttribute.pm index d3a3e63..4666903 100644 --- a/lib/MooseX/ClassAttribute.pm +++ b/lib/MooseX/ClassAttribute.pm @@ -3,6 +3,11 @@ package MooseX::ClassAttribute; use strict; use warnings; +# This module doesn't really need these pragmas - this is just for the benefit +# of prereq scanning. +require namespace::clean 0.20; +require namespace::autoclean 0.11; + use Moose 2.00 (); use Moose::Exporter; use Moose::Util; @@ -26,8 +31,8 @@ Moose::Exporter->setup_import_methods( ); sub class_has { - my $meta = shift; - my $name = shift; + my $meta = shift; + my $name = shift; my $attrs = ref $name eq 'ARRAY' ? $name : [$name]; @@ -38,7 +43,7 @@ sub class_has { # Copied from Moose::Util in 2.06 sub _caller_info { - my $level = @_ ? ($_[0] + 1) : 2; + my $level = @_ ? ( $_[0] + 1 ) : 2; my %info; @info{qw(package file line)} = caller($level); return \%info;