Felix Antonius Wilhelm Ostmann wrote:
> we have build some classes with Attribute::Handlers
(was inspired from
> Attribute::Property)
>
> This works realy fine!
>
> after a few tests we gone use this classes under
catalyst ... and ...
> dont work :-/ under catalyst our classes dont use
Attribute::Handlers
> :-/ we declare UNIVERSAL::Property and then use
"sub nondigit : Property
> { defined && !m{[0-9]} }" (see the code)
>
> then you can call: $obj->nondigit(4) and it will
croak or
> $obj->nondigit("car") and it will set the
object-property nondigit to
> "car".
I'm gonna stop right here because it seems like you're
trying to
re-invent Moose in some round-about way.
Take a look at the simple "Point" example [1] plus
the docs for
TypeConstraints [2].
I'd trying to help with your existing code, but it makes my
eyes bleed.
-Brian
[1] http://search.cpan.org/~stevan/Moose-0.2
5/lib/Moose/Cookbook/Recipe1.pod
[2]
http://search.cpan.org/~stevan/Moose-
0.25/lib/Moose/Util/TypeConstraints.pm
_______________________________________________
List: Catalyst lists.rawmode.org
Listinfo: ht
tp://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-
archive.com/catalyst lists.rawmode.org/
Dev site: http://dev.catalyst.per
l.org/
|