Grokbase
x

Hans Dieter Pearcey (h...@pobox.com)

Profile | Posts (13)

User Information

Display Name:Hans Dieter Pearcey
Partial Email Address:h...@pobox.com
Posts:
13 total
3 in Catalyst Framework
1 in catalyst@lists.scsys.co.uk
2 in DBIx::Class
7 in Mason

5 Most Recent

All Posts
1) Hans Dieter Pearcey Re: Maybe[Foo] type coercions
| +1 vote
Excerpts from Jesse Luehrs's message of Mon Feb 15 19:31:24 -0500 2010: Correct. And this is...
Moose
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Excerpts from Jesse Luehrs's message of Mon Feb 15 19:31:24 -0500 2010:
> I'm not sure what problem you're having, since you didn't post the
> error message, but you probably need the attribute definition to happen
> after the types are defined... pretty sure this would assume you have a
> class named 'MaybeDateTime'.

Correct.

> > subtype 'DateTime' => as 'Object' => where { $_->isa('DateTime') };
>
> Also, this is equivalent to "class_type 'DateTime'".
>
> > subtype 'MaybeDateTime'
> >     => as 'Maybe[Object]'
> > => where { $_->isa('DateTime') or not defined $_ };

And this is "subtype 'MaybeDateTime', as 'Maybe[DateTime]'".

hdp.
2) Hans Dieter Pearcey Re: $anon_class->new_object: BUILDALL is not called
| +1 vote
Excerpts from Komarov Oleg's message of Sun Feb 14 18:17:07 -0500 2010: $class->new calls...
Moose
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Excerpts from Komarov Oleg's message of Sun Feb 14 18:17:07 -0500 2010:
> It turns out that such an object isa 'Moose::Object', but
> Moose::Object::new isn't involved in its creation.

$class->new calls $class->meta->new_object, not the other way around. You have
confused the lower level interface for the higher level one.

hdp.
3) Hans Dieter Pearcey Re: Attribute initializers - incorrect documentation
| +1 vote
Excerpts from Ricardo Signes's message of Thu Feb 04 19:20:51 -0500 2010: LA LA LA LET'S GET RID OF...
Moose
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Excerpts from Ricardo Signes's message of Thu Feb 04 19:20:51 -0500 2010:
> > They were rjbs's baby originally, but I don't think he's actually using them.
>
> FWIW, I am.

LA LA LA LET'S GET RID OF INITIALIZERS

What is it that they do that can't be done any other way?

hdp.
4) Hans Dieter Pearcey Re: Attribute initializers - incorrect documentation
| +1 vote
Excerpts from Jesse Luehrs's message of Thu Feb 04 19:00:37 -0500 2010: Yeah. I mean, I've done it;...
Moose
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Excerpts from Jesse Luehrs's message of Thu Feb 04 19:00:37 -0500 2010:
> Figuring out how to do it isn't particularly obvious at the moment though.

Yeah.  I mean, I've done it; it's not that much of a pain.  The pain is
remembering all the places that need to be touched, let alone figuring it out
if you haven't done it before.

hdp.
5) Hans Dieter Pearcey Re: Attribute initializers - incorrect documentation
| +1 vote
Excerpts from Karen Etheridge's message of Thu Feb 04 15:43:05 -0500 2010: This may mean that we...
Moose
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Excerpts from Karen Etheridge's message of Thu Feb 04 15:43:05 -0500 2010:
> I'm satisfied now: there is no usecase for an initializer that couldn't
> be achieved using either a trigger or by modifying the behaviour of the
> attribute's setter.

This may mean that we need to make it easy to inline such a set_value behavior
modification.  I don't know how convenient it is now.

(Inlining in general is not currently very accessible.)

hdp.

spacer
Profile | Posts (13)
Home > People > Hans Dieter Pearcey