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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1295993442-9644-432"
Content-Length: 0
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 371
Download (untitled) / with headers
text/plain 371b
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
MIME-Version: 1.0
Content-Type: application/x-perl; name="test_storage.pl"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline; filename="test_storage.pl"
Content-Transfer-Encoding: base64
Content-Length: 374
Download test_storage.pl
text/x-perl 374b
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;


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.