Re: Default values for undef attributes

2011-02-15 Thread WOLfgang Schricker
Octavian Rasnita schrieb: Hi, [...] package TestMod; use Moose; has foo = (is = 'ro', isa = 'Int', default = 123); __PACKAGE__-meta-make_immutable; package main; use strict; [...] #This doesn't work because foo is undefined: my $t = TestMod-new(foo = undef); print $t-foo;

JSON serialization

2011-02-15 Thread Jiří Pavlovský
Hello, I'm pondering what way to use to serialize my Moose classes to JSON. I've have been looking to MooseX::Storage but it seems it cannot handle more than basic attribute types. Just the very first class I tried: Cannot handle type constraint (MooseX::Types::URI::Uri) There seems to be a

Re: JSON serialization

2011-02-15 Thread Pedro Melo
Hi, 2011/2/15 Jiří Pavlovský j...@getnet.cz: I'm pondering what way to use to serialize my Moose classes to JSON. I've have been looking to MooseX::Storage but it seems it cannot handle more than basic attribute types. Just the very first class I tried: Cannot handle type constraint

Re: JSON serialization

2011-02-15 Thread Stevan Little
On Feb 15, 2011, at 5:08 AM, Jiří Pavlovský wrote: Hello, I'm pondering what way to use to serialize my Moose classes to JSON. I've have been looking to MooseX::Storage but it seems it cannot handle more than basic attribute types. Just the very first class I tried: Cannot handle type