line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Variable::Strongly::Typed::Scalar; |
2
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
36
|
use version; $VERSION = qv('1.0.0'); |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
44
|
|
4
|
|
|
|
|
|
|
|
5
|
7
|
|
|
7
|
|
554
|
use warnings; |
|
7
|
|
|
|
|
14
|
|
|
7
|
|
|
|
|
228
|
|
6
|
7
|
|
|
7
|
|
37
|
use strict; |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
217
|
|
7
|
7
|
|
|
7
|
|
34
|
use Carp; |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
629
|
|
8
|
|
|
|
|
|
|
|
9
|
7
|
|
|
7
|
|
35
|
use base qw(Variable::Strongly::Typed); |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
2092
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
{ |
12
|
|
|
|
|
|
|
sub TIESCALAR { |
13
|
3
|
|
|
3
|
|
9
|
my($class, $type) = @_; |
14
|
|
|
|
|
|
|
|
15
|
3
|
|
|
|
|
9
|
my $self = bless \my($anon_scalar), $class; |
16
|
3
|
|
|
|
|
28
|
$self->_init(\my($another_anon_scalar), $type); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub FETCH { |
20
|
0
|
|
|
0
|
|
|
my $obj = shift->_get_object; |
21
|
0
|
|
|
|
|
|
return $$obj; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# If it's legit keep it |
25
|
|
|
|
|
|
|
sub STORE { |
26
|
0
|
|
|
0
|
|
|
my ($self, $value) = @_; |
27
|
0
|
|
|
|
|
|
my $obj = $self->_get_object; |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
$self->_check_values($value); |
30
|
0
|
|
|
|
|
|
$$obj = $value; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |