Moose + Mason
Hans Dieter Pearcey <[email protected]> Mon, 31 Aug 2009 19:49:35 -0400
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <1251762164-sup-9412@glaive> |
rjbs mentioned this combination tonight, and I thought I would brainstorm:
1) parameter validation (the really obvious one)
<%args>
$foo => Str
@baz => ArrayRef[DateTime]
$quux # implicit Any
</%args>
I'd assume coerce => 1 here -- I can't think of any way of turning it off
gracefully, but I've also never wanted to. Dunno.
2) roles, somehow?
Magic pixie dust! I don't know, I just know I frequently want reuse that
autohandler doesn't work for.
The most common use of autohandler is like having a method that does this:
sub CONTENT {
$m->comp('/header');
inner;
$m->comp('footer');
}
The problem is that this inner/augment pattern is completely orthogonal to
almost every other kind of code reuse I find myself wanting to do with
components, which has more to do with e.g. /foo/bar in one comp root overriding
/foo/bar in another, while still getting the same autohandler-wrapping that it
would normally get.
I'm not sure yet how Moose would help with this at all.
hdp.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july