| 1 | package MooseX::TypeMap::Entry; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use Scalar::Util qw(blessed); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use namespace::clean -except => [qw( meta )]; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | our $VERSION = '0.002000'; | |||||||||
| 8 | |||||||||||
| 9 | 1 | has data => ( is => 'ro' ); | |||||||||
| 10 | 1 | has type_constraint => ( | |||||||||
| 11 | is => 'ro', | ||||||||||
| 12 | isa => 'Moose::Meta::TypeConstraint', | ||||||||||
| 13 | required => 1, | ||||||||||
| 14 | ); | ||||||||||
| 15 | |||||||||||
| 16 | 9 | ▶ | around BUILDARGS => sub { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.0
| |||||||||||
| 17 | 9 | my $orig = shift; | |||||||||
| 18 | 9 | my $class = shift; | |||||||||
| 19 | 9 | my $args = $class->$orig(@_); | |||||||||
| 20 | 9 | my $type = delete $args->{type_constraint}; | |||||||||
| 21 | 9 | ▶ | $args->{type_constraint} = blessed($type) eq 'MooseX::Types::TypeDecorator' | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | ? $type->__type_constraint : $type; | ||||||||||
| 23 | 9 | return $args; | |||||||||
| 24 | 1 | }; | |||||||||
| 25 | |||||||||||
| 26 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||
| 27 | |||||||||||
| 28 | 1 | 1; | |||||||||
| 29 | |||||||||||
| 30 | __END__; | ||||||||||