← Index
NYTProf Performance Profile   « line view »
For /usr/local/libexec/sympa/task_manager-debug.pl
  Run on Tue Jun 1 22:32:51 2021
Reported on Tue Jun 1 22:35:05 2021

Filename/root/Specio::Constraint::Enum->new
StatementsExecuted 0 statements in 0s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
0000s0s__ANON__[Specio::Constraint::::Enum->new:170]__ANON__[Specio::Constraint::Enum->new:170]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1sub {
2 my $class = shift;
3
4 my %p = do {
5 if ( @_ == 1 ) {
6 if ( ref $_[0] eq 'HASH' ) {
7 %{ shift() };
8 }
9 else {
10 Specio::OO::_constructor_confess(
11 Specio::OO::_bad_args_message( $class, @_ ) );
12 }
13 }
14 else {
15 Specio::OO::_constructor_confess(
16 Specio::OO::_bad_args_message( $class, @_ ) )
17 if @_ % 2;
18 @_;
19 }
20 };
21
22 my $self = bless {}, $class;
23
24 if ( exists $p{_ancestors} && !Specio::TypeChecks::is_ArrayRef( $p{_ancestors} ) ) {
25 Carp::confess(
26 Specio::OO::_bad_value_message(
27 "The value you provided to Specio::Constraint::Enum->new for _ancestors is not a valid ArrayRef.",
28 $p{_ancestors},
29 )
30 );
31 }
32 $self->{_ancestors} = $p{_ancestors} if exists $p{_ancestors};
33
34 $p{_coercions} = Specio::Constraint::Enum->_build_coercions unless exists $p{_coercions};
35 $self->{_coercions} = $p{_coercions} if exists $p{_coercions};
36
37 if ( exists $p{constraint} && !Specio::TypeChecks::is_CodeRef( $p{constraint} ) ) {
38 Carp::confess(
39 Specio::OO::_bad_value_message(
40 "The value you provided to Specio::Constraint::Enum->new for constraint is not a valid CodeRef.",
41 $p{constraint},
42 )
43 );
44 }
45 $self->{_constraint} = $p{constraint} if exists $p{constraint};
46
47 if ( exists $p{_generated_inline_sub} && !Specio::TypeChecks::is_CodeRef( $p{_generated_inline_sub} ) ) {
48 Carp::confess(
49 Specio::OO::_bad_value_message(
50 "The value you provided to Specio::Constraint::Enum->new for _generated_inline_sub is not a valid CodeRef.",
51 $p{_generated_inline_sub},
52 )
53 );
54 }
55 $self->{_generated_inline_sub} = $p{_generated_inline_sub} if exists $p{_generated_inline_sub};
56
57 $p{_inline_generator} = Specio::Constraint::Enum->_build_inline_generator unless exists $p{_inline_generator};
58 if ( exists $p{_inline_generator} && !Specio::TypeChecks::is_CodeRef( $p{_inline_generator} ) ) {
59 Carp::confess(
60 Specio::OO::_bad_value_message(
61 "The value you provided to Specio::Constraint::Enum->new for _inline_generator is not a valid CodeRef.",
62 $p{_inline_generator},
63 )
64 );
65 }
66 $self->{_inline_generator} = $p{_inline_generator} if exists $p{_inline_generator};
67
68 if ( exists $p{_message_generator} && !Specio::TypeChecks::is_CodeRef( $p{_message_generator} ) ) {
69 Carp::confess(
70 Specio::OO::_bad_value_message(
71 "The value you provided to Specio::Constraint::Enum->new for _message_generator is not a valid CodeRef.",
72 $p{_message_generator},
73 )
74 );
75 }
76 $self->{_message_generator} = $p{_message_generator} if exists $p{_message_generator};
77
78 if ( exists $p{_optimized_constraint} && !Specio::TypeChecks::is_CodeRef( $p{_optimized_constraint} ) ) {
79 Carp::confess(
80 Specio::OO::_bad_value_message(
81 "The value you provided to Specio::Constraint::Enum->new for _optimized_constraint is not a valid CodeRef.",
82 $p{_optimized_constraint},
83 )
84 );
85 }
86 $self->{_optimized_constraint} = $p{_optimized_constraint} if exists $p{_optimized_constraint};
87
88 if ( exists $p{_signature} && !Specio::TypeChecks::is_Str( $p{_signature} ) ) {
89 Carp::confess(
90 Specio::OO::_bad_value_message(
91 "The value you provided to Specio::Constraint::Enum->new for _signature is not a valid Str.",
92 $p{_signature},
93 )
94 );
95 }
96 $self->{_signature} = $p{_signature} if exists $p{_signature};
97
98 $self->{_subification} = $p{_subification} if exists $p{_subification};
99
100 Specio::OO::_constructor_confess(
101 "Specio::Constraint::Enum->new requires a declared_at argument.")
102 unless exists $p{declared_at};
103 if ( exists $p{declared_at} && !Specio::TypeChecks::isa_class( $p{declared_at}, "Specio::DeclaredAt" ) ) {
104 Carp::confess(
105 Specio::OO::_bad_value_message(
106 "The value you provided to Specio::Constraint::Enum->new for declared_at is not a valid Specio::DeclaredAt.",
107 $p{declared_at},
108 )
109 );
110 }
111 $self->{declared_at} = $p{declared_at} if exists $p{declared_at};
112
113 if ( exists $p{description} && !Specio::TypeChecks::is_Str( $p{description} ) ) {
114 Carp::confess(
115 Specio::OO::_bad_value_message(
116 "The value you provided to Specio::Constraint::Enum->new for description is not a valid Str.",
117 $p{description},
118 )
119 );
120 }
121 $self->{description} = $p{description} if exists $p{description};
122
123 if ( exists $p{inline_environment} && !Specio::TypeChecks::is_HashRef( $p{inline_environment} ) ) {
124 Carp::confess(
125 Specio::OO::_bad_value_message(
126 "The value you provided to Specio::Constraint::Enum->new for inline_environment is not a valid HashRef.",
127 $p{inline_environment},
128 )
129 );
130 }
131 $self->{inline_environment} = $p{inline_environment} if exists $p{inline_environment};
132
133 if ( exists $p{name} && !Specio::TypeChecks::is_Str( $p{name} ) ) {
134 Carp::confess(
135 Specio::OO::_bad_value_message(
136 "The value you provided to Specio::Constraint::Enum->new for name is not a valid Str.",
137 $p{name},
138 )
139 );
140 }
141 $self->{name} = $p{name} if exists $p{name};
142
143 $p{parent} = Specio::Constraint::Enum->_build_parent unless exists $p{parent};
144 if ( exists $p{parent} && !Specio::TypeChecks::does_role( $p{parent}, "Specio::Constraint::Role::Interface" ) ) {
145 Carp::confess(
146 Specio::OO::_bad_value_message(
147 "The value you provided to Specio::Constraint::Enum->new for parent does not do the Specio::Constraint::Role::Interface role.",
148 $p{parent},
149 )
150 );
151 }
152 $self->{parent} = $p{parent} if exists $p{parent};
153
154 Specio::OO::_constructor_confess(
155 "Specio::Constraint::Enum->new requires a values argument.")
156 unless exists $p{values};
157 if ( exists $p{values} && !Specio::TypeChecks::is_ArrayRef( $p{values} ) ) {
158 Carp::confess(
159 Specio::OO::_bad_value_message(
160 "The value you provided to Specio::Constraint::Enum->new for values is not a valid ArrayRef.",
161 $p{values},
162 )
163 );
164 }
165 $self->{values} = $p{values} if exists $p{values};
166
167 $self->Specio::Constraint::Role::Interface::_Specio_Constraint_Role_Interface_BUILD(\%p);
168
169 return $self;
170}
171;
172