From: Stevan Little Date: Thu, 5 Apr 2007 20:01:13 +0000 (+0000) Subject: adding metaclass alias X-Git-Tag: 0_02~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eebcb6dc421f51c455af1dc6b8aa3bb0ffc6f148;p=gitmo%2FMooseX-Storage.git adding metaclass alias --- diff --git a/lib/MooseX/Storage.pm b/lib/MooseX/Storage.pm index 549b15a..07bc85f 100644 --- a/lib/MooseX/Storage.pm +++ b/lib/MooseX/Storage.pm @@ -2,6 +2,8 @@ package MooseX::Storage; use Moose qw(confess); +use MooseX::Storage::Meta::Attribute::DoNotSerialize; + sub import { my $pkg = caller(); diff --git a/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm b/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm index e7b3ad3..7856ad5 100644 --- a/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm +++ b/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm @@ -4,6 +4,10 @@ use Moose; extends 'Moose::Meta::Attribute'; +# register this alias ... +package Moose::Meta::Attribute::Custom::DoNotSerialize; +sub register_implementation { 'MooseX::Storage::Meta::Attribute::DoNotSerialize' } + 1; __END__ diff --git a/t/004_w_cycles.t b/t/004_w_cycles.t index 3cb3a0b..cca0e22 100644 --- a/t/004_w_cycles.t +++ b/t/004_w_cycles.t @@ -70,7 +70,7 @@ This test demonstrates two things: ); has 'parent' => ( - metaclass => 'MooseX::Storage::Meta::Attribute::DoNotSerialize', + metaclass => 'DoNotSerialize', is => 'rw', isa => 'Tree', );