line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DWH_File::Value::Plain; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
49
|
use warnings; |
|
9
|
|
|
|
|
17
|
|
|
9
|
|
|
|
|
328
|
|
4
|
9
|
|
|
9
|
|
45
|
use strict; |
|
9
|
|
|
|
|
15
|
|
|
9
|
|
|
|
|
277
|
|
5
|
9
|
|
|
9
|
|
46
|
use vars qw( @ISA $VERSION ); |
|
9
|
|
|
|
|
13
|
|
|
9
|
|
|
|
|
1082
|
|
6
|
|
|
|
|
|
|
use overload |
7
|
9
|
|
|
|
|
96
|
'""' => \&store_string, |
8
|
9
|
|
|
9
|
|
24882
|
fallback => 1; |
|
9
|
|
|
|
|
17228
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
@ISA = qw( DWH_File::Value ); |
11
|
|
|
|
|
|
|
$VERSION = 0.01; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
1857
|
|
|
1857
|
0
|
3418
|
my ( $this, $data ) = @_; |
15
|
1857
|
|
33
|
|
|
6037
|
my $class = ref $this || $this; |
16
|
1857
|
|
|
|
|
2216
|
my $self = \$data; |
17
|
1857
|
|
|
|
|
9140
|
bless $self, $class; |
18
|
1857
|
|
|
|
|
9630
|
return $self; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub from_input { |
22
|
676
|
|
|
676
|
0
|
943
|
my ( $this, $data ) = @_; |
23
|
676
|
|
|
|
|
986
|
my $first = substr $data, 0, 1; |
24
|
676
|
50
|
33
|
|
|
3320
|
if ( $first eq '^' or $first eq '%' ) { substr( $data, 0, 0 ) = '%' } |
|
0
|
|
|
|
|
0
|
|
25
|
676
|
|
|
|
|
1515
|
return $this->new( $data ); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub from_stored { |
29
|
1181
|
|
|
1181
|
0
|
1612
|
my ( $this, $data ) = @_; |
30
|
1181
|
|
|
|
|
2563
|
return $this->new( $data ); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
5130
|
|
|
5130
|
0
|
5977
|
sub store_string { ${ $_[ 0 ] } } |
|
5130
|
|
|
|
|
24772
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub actual_value { |
36
|
422
|
|
|
422
|
0
|
487
|
my $data = ${ $_[ 0 ] }; |
|
422
|
|
|
|
|
1144
|
|
37
|
422
|
50
|
|
|
|
1175
|
'%' eq substr $data, 0, 1 and substr( $data, 0, 1 ) = ''; |
38
|
422
|
|
|
|
|
2568
|
$data; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |