| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
|
3
|
30
|
|
|
30
|
|
193
|
use warnings; |
|
|
30
|
|
|
|
|
52
|
|
|
|
30
|
|
|
|
|
839
|
|
|
4
|
30
|
|
|
30
|
|
130
|
|
|
|
30
|
|
|
|
|
44
|
|
|
|
30
|
|
|
|
|
1140
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.48'; |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Exporter qw( import ); |
|
8
|
30
|
|
|
30
|
|
141
|
use Specio::Helpers qw( is_class_loaded ); |
|
|
30
|
|
|
|
|
60
|
|
|
|
30
|
|
|
|
|
695
|
|
|
9
|
30
|
|
|
30
|
|
130
|
use Scalar::Util qw( blessed ); |
|
|
30
|
|
|
|
|
45
|
|
|
|
30
|
|
|
|
|
1024
|
|
|
10
|
30
|
|
|
30
|
|
380
|
|
|
|
30
|
|
|
|
|
52
|
|
|
|
30
|
|
|
|
|
8014
|
|
|
11
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
|
12
|
|
|
|
|
|
|
does_role |
|
13
|
|
|
|
|
|
|
is_ArrayRef |
|
14
|
|
|
|
|
|
|
is_ClassName |
|
15
|
|
|
|
|
|
|
is_CodeRef |
|
16
|
|
|
|
|
|
|
is_HashRef |
|
17
|
|
|
|
|
|
|
is_Int |
|
18
|
|
|
|
|
|
|
is_Str |
|
19
|
|
|
|
|
|
|
isa_class |
|
20
|
|
|
|
|
|
|
); |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
return ref $_[0] eq 'ARRAY'; |
|
23
|
|
|
|
|
|
|
} |
|
24
|
23
|
|
|
23
|
0
|
358
|
|
|
25
|
|
|
|
|
|
|
return ref $_[0] eq 'CODE'; |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
1064
|
|
|
1064
|
0
|
12051
|
return ref $_[0] eq 'HASH'; |
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
defined( $_[0] ) && !ref( $_[0] ) && ref( \$_[0] ) eq 'SCALAR' |
|
32
|
15
|
|
|
15
|
0
|
133
|
|| ref( \( my $val = $_[0] ) eq 'SCALAR' ); |
|
33
|
|
|
|
|
|
|
} |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
( defined( $_[0] ) && !ref( $_[0] ) && ref( \$_[0] ) eq 'SCALAR' |
|
36
|
6514
|
50
|
33
|
6514
|
0
|
97262
|
|| ref( \( my $val = $_[0] ) eq 'SCALAR' ) ) |
|
|
|
|
33
|
|
|
|
|
|
37
|
|
|
|
|
|
|
&& $_[0] =~ /^[0-9]+$/; |
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
is_class_loaded( $_[0] ); |
|
41
|
947
|
50
|
33
|
947
|
0
|
12685
|
} |
|
|
|
|
33
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
blessed( $_[0] ) && $_[0]->isa( $_[1] ); |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
blessed( $_[0] ) && $_[0]->can('does') && $_[0]->does( $_[1] ); |
|
47
|
8
|
|
|
8
|
0
|
319
|
} |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
|
50
|
|
|
|
|
|
|
|
|
51
|
996
|
50
|
|
996
|
0
|
16375
|
# ABSTRACT: Type checks used internally for Specio classes (it's not self-bootstrapping (yet?)) |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=pod |
|
55
|
3852
|
100
|
66
|
3852
|
0
|
59305
|
|
|
56
|
|
|
|
|
|
|
=encoding UTF-8 |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 NAME |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Specio::TypeChecks - Type checks used internally for Specio classes (it's not self-bootstrapping (yet?)) |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 VERSION |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
version 0.48 |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
There's nothing public here. |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=for Pod::Coverage .* |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 SUPPORT |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Bugs may be submitted at L<https://github.com/houseabsolute/Specio/issues>. |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 SOURCE |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
The source code repository for Specio can be found at L<https://github.com/houseabsolute/Specio>. |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 AUTHOR |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
This software is Copyright (c) 2012 - 2022 by Dave Rolsky. |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
This is free software, licensed under: |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
The full text of the license can be found in the |
|
93
|
|
|
|
|
|
|
F<LICENSE> file included with this distribution. |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=cut |