← 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/usr/local/lib/perl5/site_perl/Specio/Library/Numeric.pm
StatementsExecuted 0 statements in 0s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
0000s0sSpecio::Library::Numeric::::BEGIN@10Specio::Library::Numeric::BEGIN@10
0000s0sSpecio::Library::Numeric::::BEGIN@11Specio::Library::Numeric::BEGIN@11
0000s0sSpecio::Library::Numeric::::BEGIN@3Specio::Library::Numeric::BEGIN@3
0000s0sSpecio::Library::Numeric::::BEGIN@4Specio::Library::Numeric::BEGIN@4
0000s0sSpecio::Library::Numeric::::BEGIN@8Specio::Library::Numeric::BEGIN@8
0000s0sSpecio::Library::Numeric::::__ANON__[:100]Specio::Library::Numeric::__ANON__[:100]
0000s0sSpecio::Library::Numeric::::__ANON__[:115]Specio::Library::Numeric::__ANON__[:115]
0000s0sSpecio::Library::Numeric::::__ANON__[:130]Specio::Library::Numeric::__ANON__[:130]
0000s0sSpecio::Library::Numeric::::__ANON__[:148]Specio::Library::Numeric::__ANON__[:148]
0000s0sSpecio::Library::Numeric::::__ANON__[:25]Specio::Library::Numeric::__ANON__[:25]
0000s0sSpecio::Library::Numeric::::__ANON__[:40]Specio::Library::Numeric::__ANON__[:40]
0000s0sSpecio::Library::Numeric::::__ANON__[:55]Specio::Library::Numeric::__ANON__[:55]
0000s0sSpecio::Library::Numeric::::__ANON__[:70]Specio::Library::Numeric::__ANON__[:70]
0000s0sSpecio::Library::Numeric::::__ANON__[:85]Specio::Library::Numeric::__ANON__[:85]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Specio::Library::Numeric;
2
3use strict;
4use warnings;
5
6our $VERSION = '0.47';
7
8use parent 'Specio::Exporter';
9
10use Specio::Declare;
11use Specio::Library::Builtins;
12
13declare(
14 'PositiveNum',
15 parent => t('Num'),
16 inline => sub {
17 return
18 sprintf( <<'EOF', $_[0]->parent->inline_check( $_[1] ), $_[1] );
19(
20 %s
21 &&
22 %s > 0
23)
24EOF
25 },
26);
27
28declare(
29 'PositiveOrZeroNum',
30 parent => t('Num'),
31 inline => sub {
32 return
33 sprintf( <<'EOF', $_[0]->parent->inline_check( $_[1] ), $_[1] );
34(
35 %s
36 &&
37 %s >= 0
38)
39EOF
40 },
41);
42
43declare(
44 'PositiveInt',
45 parent => t('Int'),
46 inline => sub {
47 return
48 sprintf( <<'EOF', $_[0]->parent->inline_check( $_[1] ), $_[1] );
49(
50 %s
51 &&
52 %s > 0
53)
54EOF
55 },
56);
57
58declare(
59 'PositiveOrZeroInt',
60 parent => t('Int'),
61 inline => sub {
62 return
63 sprintf( <<'EOF', $_[0]->parent->inline_check( $_[1] ), $_[1] );
64(
65 %s
66 &&
67 %s >= 0
68)
69EOF
70 },
71);
72
73declare(
74 'NegativeNum',
75 parent => t('Num'),
76 inline => sub {
77 return
78 sprintf( <<'EOF', $_[0]->parent->inline_check( $_[1] ), $_[1] );
79(
80 %s
81 &&
82 %s < 0
83)
84EOF
85 },
86);
87
88declare(
89 'NegativeOrZeroNum',
90 parent => t('Num'),
91 inline => sub {
92 return
93 sprintf( <<'EOF', $_[0]->parent->inline_check( $_[1] ), $_[1] );
94(
95 %s
96 &&
97 %s <= 0
98)
99EOF
100 },
101);
102
103declare(
104 'NegativeInt',
105 parent => t('Int'),
106 inline => sub {
107 return
108 sprintf( <<'EOF', $_[0]->parent->inline_check( $_[1] ), $_[1] );
109(
110 %s
111 &&
112 %s < 0
113)
114EOF
115 },
116);
117
118declare(
119 'NegativeOrZeroInt',
120 parent => t('Int'),
121 inline => sub {
122 return
123 sprintf( <<'EOF', $_[0]->parent->inline_check( $_[1] ), $_[1] );
124(
125 %s
126 &&
127 %s <= 0
128)
129EOF
130 },
131);
132
133declare(
134 'SingleDigit',
135 parent => t('Int'),
136 inline => sub {
137 return
138 sprintf(
139 <<'EOF', $_[0]->parent->inline_check( $_[1] ), ( $_[1] ) x 2 );
140(
141 %s
142 &&
143 %s >= -9
144 &&
145 %s <= 9
146)
147EOF
148 },
149);
150
1511;
152
153# ABSTRACT: Implements type constraint objects for some common numeric types
154
155__END__