Bump version & update Changes.
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,
-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
use strict;
use warnings;
-our $VERSION = '0.05';
+our $VERSION = '0.06';
our $AUTHORITY = 'cpan:DROLSKY';
use Moose ();
->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 ],
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;
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',
'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' );