line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Language::P::Toy::Value::Scalar; |
2
|
|
|
|
|
|
|
|
3
|
100
|
|
|
100
|
|
553
|
use strict; |
|
100
|
|
|
|
|
211
|
|
|
100
|
|
|
|
|
3614
|
|
4
|
100
|
|
|
100
|
|
514
|
use warnings; |
|
100
|
|
|
|
|
198
|
|
|
100
|
|
|
|
|
2773
|
|
5
|
100
|
|
|
100
|
|
523
|
use base qw(Language::P::Toy::Value::Any); |
|
100
|
|
|
|
|
200
|
|
|
100
|
|
|
|
|
33998
|
|
6
|
|
|
|
|
|
|
|
7
|
0
|
|
|
0
|
0
|
0
|
sub type { 5 } |
8
|
|
|
|
|
|
|
|
9
|
2827
|
|
|
2827
|
0
|
6543
|
sub as_scalar { return $_[0] } |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub assign { |
12
|
28
|
|
|
28
|
0
|
50
|
my( $self, $other ) = @_; |
13
|
|
|
|
|
|
|
|
14
|
28
|
50
|
|
|
|
102
|
Carp::confess if ref( $other ) eq __PACKAGE__; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# FIXME proper morphing |
17
|
28
|
|
|
|
|
59
|
%$self = (); |
18
|
28
|
|
|
|
|
108
|
bless $self, ref( $other ); |
19
|
|
|
|
|
|
|
|
20
|
28
|
|
|
|
|
238
|
$self->assign( $other ); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub assign_iterator { |
24
|
2650
|
|
|
2650
|
0
|
3393
|
my( $self, $iter ) = @_; |
25
|
|
|
|
|
|
|
|
26
|
2650
|
50
|
|
|
|
5959
|
die unless $iter->next; # FIXME, must assign undef |
27
|
2650
|
|
|
|
|
6740
|
$self->assign( $iter->item ); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub localize { |
31
|
10
|
|
|
10
|
0
|
16
|
my( $self ) = @_; |
32
|
|
|
|
|
|
|
|
33
|
10
|
|
|
|
|
35
|
return Language::P::Toy::Value::StringNumber->new; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |