Skip Menu |

This queue is for tickets about the MooseX-Storage CPAN distribution.

Report information
The Basics
Id: 61093
Status: new
Priority: 0/
Queue: MooseX-Storage

People
Owner: Nobody in particular
Requestors: EVERYBODY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.27
Fixed in: (no value)



Subject: 'Defined' type unsupported
Trying to store a moose object with an attribute with the typeconstraint 'Defined' results in an exception thrown. Ideally, it would successfully store the object, instead of failing. Attached is a test that demonstrates this behaviour.
Subject: 099_bug_defined_type.t
#!/usr/bin/perl use strict; use warnings; use Test::More tests => 2; BEGIN { use_ok('MooseX::Storage'); } { package Foo; use Moose; use MooseX::Storage; with Storage; has 'value' => ( is => 'ro', isa => 'Defined' ); } { my $foo = Foo->new( value => 10 ); isa_ok( $foo, 'Foo' ); is_deeply( $foo->pack, { __CLASS__ => 'Foo', value => 10, }, '... got the right frozen class' ); } { my $foo = Foo->unpack( { __CLASS__ => 'Foo', value => 10, } ); isa_ok( $foo, 'Foo' ); is( $foo->value, 10, '... got the right value' ); }