MooseX-Role-UnsafeConstructable
view release on metacpan or search on metacpan
This is useful when the caller knows and trusts the source of the
initialization data and doesn't want to choose between performance in a corner
case and data integrity of the overall system.
Example usage:
package Foo;
use Moose;
with 'MooseX::Role::UnsafeConstructable';
has field => (is => 'ro', isa => 'HashRef[ArrayRef[Str]]');
__PACKAGE__->meta->make_immutable;
package main;
my $foo = Foo->unsafe_new(field => {this => [qw{that and another}]});
# => is a Foo, but instantiated faster
=cut
lib/MooseX/Role/UnsafeConstructable.pm view on Meta::CPAN
This is useful when the caller knows and trusts the source of the
initialization data and doesn't want to choose between performance in a corner
case and data integrity of the overall system.
Example usage:
package Foo;
use Moose;
with 'MooseX::Role::UnsafeConstructable';
has field => (is => 'ro', isa => 'HashRef[ArrayRef[Str]]');
__PACKAGE__->meta->make_immutable;
package main;
my $foo = Foo->unsafe_new(field => {this => [qw{that and another}]});
# => is a Foo, but instantiated faster
=cut
( run in 0.675 second using v1.01-cache-2.11-cpan-5f2e87ce722 )