I have two questions:

* Should the Array trait using List::Util permit regexes? i.e.

    perl -MList::Util -wE'use List::Util qw/first/; say first {/foo/}
qw/bar foo bazko bazfoo/'

    package Class;
    use Moose;
    has "foo" => ( isa => "ArrayRef", is => "rw", traits => ['Array'],
handles => { first_foo => foo } )

    Class->new(foo=>[qw/foo bar baz quz/])->first_foo(qr/foo/);

* Regarding the new 1.15 in git, why does the new
Moose::Meta::Method::Accessor::Native::*, stuff use string eval? What
was wrong with the old approach.

    Native Trait delegations are now all generated as inline code. This should
    be much faster than the previous method of delegation. In the best case,
    native trait methods will be very highly optimized.

How is string eval generation better? I mean is the end goal just to
shave a function-call at the expense of turning Moose into
perl-pre-processor written in perl? Wouldn't this code be better in
List::Util? Why should Moose have the sanitation features here? I'd be
more interested in reading more about this optimization. I've never
seen any code on CPAN do it.

-- 
Evan Carroll - [email protected]
System Lord of the Internets
web: http://www.evancarroll.com
ph: 281.901.0011

Reply via email to