in reply to Problem with Class::Accessor::Faster

As others have said, Class::Accessor::Faster uses an arrayref-based object, not hashref-based.

Moo is faster than Class::Accessor::Fast and Class::Accessor::Faster, but with my patch Class::Accessor::Fast can rival Moo's speed.

However, if Moo detects that Class::XSAccessor is installed, it's able to use that to accelerate itself still further, and blows both Class::Accessor::Fast and Class::Accessor::Faster out of the water.

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
  • Comment on Re: Problem with Class::Accessor::Faster

Replies are listed 'Best First'.
Re^2: [OT] Problem with Class::Accessor::Faster
by McA (Priest) on Jul 30, 2013 at 07:44 UTC

      Like this!

      package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name