Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: mutant.nz [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.29
Fixed in: (no value)



Subject: Union of multiple enums not supported
An attribute with a type consisting of two enums in a union cannot be serialised. See attached file for minimal example. Running this produces: Cannot handle type constraint (myType) at /usr/local/share/perl/5.10.0/MooseX/Storage/Engine.pm line 355 Changing the example to just use 'foo' in the subtype works. I can probably have a go at patching this if necessary...
Subject: test_storage.pl
package TestStorage; use Moose; use Moose::Util::TypeConstraints; use MooseX::Storage; with Storage; enum "foo" => qw(bar baz); enum "quxx" => qw(yada foobar); subtype "myType" => as("foo|quxx"); has 'blah' => is => "ro", isa => "myType", required => 1, ; package main; use Data::Dumper; my $test = TestStorage->new(blah => 'bar'); print Dumper $test->pack;