line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Object::Kind; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
27842
|
use 5.014; |
|
1
|
|
|
|
|
3
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
18
|
|
6
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
7
|
1
|
|
|
1
|
|
6
|
use routines; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
1812
|
use Data::Object::Class; |
|
1
|
|
|
|
|
809
|
|
|
1
|
|
|
|
|
9
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '0.01'; # VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# METHODS |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
2
|
1
|
212782
|
method class() { |
|
2
|
|
|
|
|
3
|
|
16
|
2
|
|
33
|
|
|
9
|
my $class = ref $self || $self; |
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
|
|
26
|
return $class; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
1
|
1
|
21055
|
method detract() { |
|
1
|
|
|
|
|
2
|
|
22
|
1
|
|
|
|
|
530
|
require Data::Object::Cast; |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
|
|
10907
|
return Data::Object::Cast::DetractDeep($self); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
1
|
1
|
5984
|
method space() { |
|
1
|
|
|
|
|
2
|
|
28
|
1
|
|
|
|
|
6
|
require Data::Object::Space; |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
5
|
return Data::Object::Space->new($self->class); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
1
|
1
|
5643
|
method type() { |
|
1
|
|
|
|
|
2
|
|
34
|
1
|
|
|
|
|
6
|
require Data::Object::Cast; |
35
|
|
|
|
|
|
|
|
36
|
1
|
|
|
|
|
4
|
return Data::Object::Cast::TypeName($self); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=encoding utf8 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Data::Object::Kind |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 ABSTRACT |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Abstract Base Class for Data::Object Value Classes |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 SYNOPSIS |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
package Data::Object::Hash; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
use base 'Data::Object::Kind'; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub new { |
62
|
|
|
|
|
|
|
bless {}; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
package main; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
my $hash = Data::Object::Hash->new; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=cut |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 DESCRIPTION |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
This package provides methods common across all L<Data::Object> value classes. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 LIBRARIES |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
This package uses type constraints from: |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
L<Data::Object::Types> |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=cut |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 METHODS |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
This package implements the following methods: |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=cut |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head2 class |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
class() : Str |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
The class method returns the class name for the given class or object. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=over 4 |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=item class example #1 |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
# given: synopsis |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
$hash->class; # Data::Object::Hash |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=back |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=cut |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head2 detract |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
detract() : Any |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
The detract method returns the raw data value for a given object. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=over 4 |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=item detract example #1 |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
# given: synopsis |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
$hash->detract; # {} |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=back |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=cut |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head2 space |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
space() : SpaceObject |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
The space method returns a L<Data::Object::Space> object for the given object. |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=over 4 |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=item space example #1 |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
# given: synopsis |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
$hash->space; # <Data::Object::Space> |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=back |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=cut |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=head2 type |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
type() : Str |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
The type method returns object type string. |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=over 4 |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=item type example #1 |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
# given: synopsis |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
$hash->type; # HASH |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=back |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=cut |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=head1 AUTHOR |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
Al Newkirk, C<awncorp@cpan.org> |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
=head1 LICENSE |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
Copyright (C) 2011-2019, Al Newkirk, et al. |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under the terms |
172
|
|
|
|
|
|
|
of the The Apache License, Version 2.0, as elucidated in the L<"license |
173
|
|
|
|
|
|
|
file"|https://github.com/iamalnewkirk/foobar/blob/master/LICENSE>. |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
=head1 PROJECT |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
L<Wiki|https://github.com/iamalnewkirk/foobar/wiki> |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
L<Project|https://github.com/iamalnewkirk/foobar> |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
L<Initiatives|https://github.com/iamalnewkirk/foobar/projects> |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
L<Milestones|https://github.com/iamalnewkirk/foobar/milestones> |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
L<Contributing|https://github.com/iamalnewkirk/foobar/blob/master/CONTRIBUTE.md> |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
L<Issues|https://github.com/iamalnewkirk/foobar/issues> |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
=cut |