Hello,
I have the following test code. Here Moose and Moo are not useful so can be
commented, but in production code they are needed.
use forks;
use Moose;
use Moo;
$SIG{__DIE__} = sub {
print thread died: @_\n if @_;
exit;
};
my $thread = threads-create( sub { print Thread running\n;
Hi,
I want to use some attributes that get a default value when they are not sent
as constructor's parameters and also when they are sent as constructor
parameters but with an undef value.
I have gave an example below and shown that the third way of constructing the
object doesn't work
From: Hans Dieter Pearcey h...@pobox.com
On Sat, 29 Jan 2011 09:23:45 +0200, Octavian Rasnita orasn...@gmail.com
wrote:
I want to use some attributes that get a default value when they are not
sent as constructor's parameters and also when they are sent as constructor
parameters
Hi,
I have tried the following sample of using inner/augment from the Moose manual:
package Document;
use Moose;
sub as_xml {
my $self = shift;
my $xml = document\n;
$xml .= inner();
$xml .= /document\n;
return $xml;
}
package Report;
use Moose;
extends 'Document';
augment
Hi,
Just as a curiosity, why the following syntax works:
has $_ = (is = 'rw', isa = 'Str') for 'a' .. 'zz';
but the following one doesn't:
has $_ = (is = 'rw', isa = 'Str') for 'a' .. 'zzz';
Is the number of attributes that can be defined limited?
Thanks.
Octavian
Hello,
I am trying to create a module that accepts a string property as 2010-05-01 and
coerces it to DateTime by default, but that property might be also undef.
I have tried:
package Foo;
use Moose;
use Moose::Util::TypeConstraints;
use DateTime;
use DateTime::Format::Natural;
subtype