From: Dave Rolsky Date: Sat, 6 Sep 2008 13:42:43 +0000 (+0000) Subject: Add missing prereq on MX::AH. X-Git-Tag: 0.06^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b2e0e01ec7ccd4771694b1fbd1452d551bc2829f;p=gitmo%2FMooseX-ClassAttribute.git Add missing prereq on MX::AH. Bump version & update Changes. --- diff --git a/Build.PL b/Build.PL index 550aece..8e85f90 100644 --- a/Build.PL +++ b/Build.PL @@ -6,10 +6,11 @@ use Module::Build; my $builder = Module::Build->new ( module_name => 'MooseX::ClassAttribute', license => 'perl', - requires => { 'Moose' => 0.57, + requires => { 'Moose' => '0.57', + 'MooseX::AttributeHelpers' => '0.13', }, - build_requires => { 'Scalar::Util' => 0, - 'Test::More' => 0, + build_requires => { 'Scalar::Util' => '0', + 'Test::More' => '0', }, create_makefile_pl => 'passthrough', create_readme => 1, diff --git a/Changes b/Changes index 7d5642b..9ead6e9 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,10 @@ -0.05 2008-09-07 +0.06 2008-09-06 + +- No code changes, just added a missing prereq for + MooseX::AttributeHelpers. + + +0.05 2008-09-05 * Totally rewritten as proper meta classes, so it supports introspection and all that good stuff. This breaks some old code diff --git a/lib/MooseX/ClassAttribute.pm b/lib/MooseX/ClassAttribute.pm index d05b985..57e141b 100644 --- a/lib/MooseX/ClassAttribute.pm +++ b/lib/MooseX/ClassAttribute.pm @@ -3,7 +3,7 @@ package MooseX::ClassAttribute; use strict; use warnings; -our $VERSION = '0.05'; +our $VERSION = '0.06'; our $AUTHORITY = 'cpan:DROLSKY'; use Moose (); diff --git a/t/03-introspection.t b/t/03-introspection.t index b58fdb9..bfe6727 100644 --- a/t/03-introspection.t +++ b/t/03-introspection.t @@ -16,8 +16,7 @@ ok( HasClassAttribute->meta()->get_class_attribute('ObjectCount') ->meta()->does_role('MooseX::ClassAttribute::Role::Meta::Attribute'), 'get_class_attribute_list returns an object which does the MooseX::ClassAttribute::Role::Meta::Attribute role' ); -my @ca = qw( Delegatee LazyAttribute ManyNames ObjectCount ReadOnlyAttribute WeakAttribute ); -push @ca, 'Mapping' if SharedTests->HasMXAH(); +my @ca = qw( Delegatee LazyAttribute ManyNames Mapping ObjectCount ReadOnlyAttribute WeakAttribute ); is_deeply( [ sort HasClassAttribute->meta()->get_class_attribute_list() ], [ sort @ca ], diff --git a/t/lib/SharedTests.pm b/t/lib/SharedTests.pm index d9e6cca..970bc94 100644 --- a/t/lib/SharedTests.pm +++ b/t/lib/SharedTests.pm @@ -6,22 +6,13 @@ use warnings; use Scalar::Util qw( isweak ); use Test::More; -my $HasMXAH; -BEGIN -{ - if ( eval 'use MooseX::AttributeHelpers 0.13; 1;' ) - { - $HasMXAH = 1; - } -} - -sub HasMXAH { $HasMXAH } { package HasClassAttribute; use Moose qw( has ); use MooseX::ClassAttribute; + use MooseX::AttributeHelpers; use vars qw($Lazy); $Lazy = 0; @@ -72,21 +63,18 @@ sub HasMXAH { $HasMXAH } default => sub { Delegatee->new() }, ); - if ( SharedTests->HasMXAH() ) - { - class_has 'Mapping' => - ( metaclass => 'Collection::Hash', - is => 'rw', - isa => 'HashRef[Str]', - default => sub { {} }, - provides => - { exists => 'ExistsInMapping', - keys => 'IdsInMapping', - get => 'GetMapping', - set => 'SetMapping', - }, - ); - } + class_has 'Mapping' => + ( metaclass => 'Collection::Hash', + is => 'rw', + isa => 'HashRef[Str]', + default => sub { {} }, + provides => + { exists => 'ExistsInMapping', + keys => 'IdsInMapping', + get => 'GetMapping', + set => 'SetMapping', + }, + ); has 'size' => ( is => 'rw', @@ -239,11 +227,7 @@ sub run_tests 'units() delegates to Delegatee and returns 5' ); } - SKIP: { - skip 'These tests require MooseX::AttributeHelpers', 4 - unless SharedTests->HasMXAH(); - my @ids = HasClassAttribute->IdsInMapping(); is( scalar @ids, 0, 'there are no keys in the mapping yet' );