← 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::Coercion->new
Statements
Executed 0 statements in 0s
Subroutines
Calls
P
F
Exclusive
Time
Inclusive
Time
Subroutine
0
0
0
0s
0s
__ANON__[Specio::::Coercion->new:127]
__ANON__[Specio::
Coercion->new:127]
Call graph for these subroutines as a
Graphviz
dot language file
.
Line
State
ments
Time
on line
Calls
Time
in subs
Code
1
sub {
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{coercion} && !Specio::TypeChecks::is_CodeRef( $p{coercion} ) ) {
25
Carp::confess(
26
Specio::OO::_bad_value_message(
27
"The value you provided to Specio::Coercion->new for coercion is not a valid CodeRef.",
28
$p{coercion},
29
)
30
);
31
}
32
$self->{_coercion} = $p{coercion} if exists $p{coercion};
33
34
if ( exists $p{_generated_inline_sub} && !Specio::TypeChecks::is_CodeRef( $p{_generated_inline_sub} ) ) {
35
Carp::confess(
36
Specio::OO::_bad_value_message(
37
"The value you provided to Specio::Coercion->new for _generated_inline_sub is not a valid CodeRef.",
38
$p{_generated_inline_sub},
39
)
40
);
41
}
42
$self->{_generated_inline_sub} = $p{_generated_inline_sub} if exists $p{_generated_inline_sub};
43
44
if ( exists $p{inline_generator} && !Specio::TypeChecks::is_CodeRef( $p{inline_generator} ) ) {
45
Carp::confess(
46
Specio::OO::_bad_value_message(
47
"The value you provided to Specio::Coercion->new for inline_generator is not a valid CodeRef.",
48
$p{inline_generator},
49
)
50
);
51
}
52
$self->{_inline_generator} = $p{inline_generator} if exists $p{inline_generator};
53
54
if ( exists $p{_optimized_coercion} && !Specio::TypeChecks::is_CodeRef( $p{_optimized_coercion} ) ) {
55
Carp::confess(
56
Specio::OO::_bad_value_message(
57
"The value you provided to Specio::Coercion->new for _optimized_coercion is not a valid CodeRef.",
58
$p{_optimized_coercion},
59
)
60
);
61
}
62
$self->{_optimized_coercion} = $p{_optimized_coercion} if exists $p{_optimized_coercion};
63
64
Specio::OO::_constructor_confess(
65
"Specio::Coercion->new requires a declared_at argument.")
66
unless exists $p{declared_at};
67
if ( exists $p{declared_at} && !Specio::TypeChecks::isa_class( $p{declared_at}, "Specio::DeclaredAt" ) ) {
68
Carp::confess(
69
Specio::OO::_bad_value_message(
70
"The value you provided to Specio::Coercion->new for declared_at is not a valid Specio::DeclaredAt.",
71
$p{declared_at},
72
)
73
);
74
}
75
$self->{declared_at} = $p{declared_at} if exists $p{declared_at};
76
77
if ( exists $p{description} && !Specio::TypeChecks::is_Str( $p{description} ) ) {
78
Carp::confess(
79
Specio::OO::_bad_value_message(
80
"The value you provided to Specio::Coercion->new for description is not a valid Str.",
81
$p{description},
82
)
83
);
84
}
85
$self->{description} = $p{description} if exists $p{description};
86
87
Specio::OO::_constructor_confess(
88
"Specio::Coercion->new requires a from argument.")
89
unless exists $p{from};
90
if ( exists $p{from} && !Specio::TypeChecks::does_role( $p{from}, "Specio::Constraint::Role::Interface" ) ) {
91
Carp::confess(
92
Specio::OO::_bad_value_message(
93
"The value you provided to Specio::Coercion->new for from does not do the Specio::Constraint::Role::Interface role.",
94
$p{from},
95
)
96
);
97
}
98
$self->{from} = $p{from} if exists $p{from};
99
100
if ( exists $p{inline_environment} && !Specio::TypeChecks::is_HashRef( $p{inline_environment} ) ) {
101
Carp::confess(
102
Specio::OO::_bad_value_message(
103
"The value you provided to Specio::Coercion->new for inline_environment is not a valid HashRef.",
104
$p{inline_environment},
105
)
106
);
107
}
108
$self->{inline_environment} = $p{inline_environment} if exists $p{inline_environment};
109
110
Specio::OO::_constructor_confess(
111
"Specio::Coercion->new requires a to argument.")
112
unless exists $p{to};
113
if ( exists $p{to} && !Specio::TypeChecks::does_role( $p{to}, "Specio::Constraint::Role::Interface" ) ) {
114
Carp::confess(
115
Specio::OO::_bad_value_message(
116
"The value you provided to Specio::Coercion->new for to does not do the Specio::Constraint::Role::Interface role.",
117
$p{to},
118
)
119
);
120
}
121
Scalar::Util::weaken( $p{to} );
122
$self->{to} = $p{to} if exists $p{to};
123
124
$self->Specio::Coercion::BUILD(\%p);
125
126
return $self;
127
}
128
;
129