line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geoffrey::Changelog::None; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
1254
|
use utf8; |
|
3
|
|
|
|
|
19
|
|
|
3
|
|
|
|
|
18
|
|
4
|
3
|
|
|
3
|
|
120
|
use 5.016; |
|
3
|
|
|
|
|
12
|
|
5
|
3
|
|
|
3
|
|
16
|
use strict; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
67
|
|
6
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
97
|
|
7
|
3
|
|
|
3
|
|
1682
|
use File::Slurp qw/write_file read_file/; |
|
3
|
|
|
|
|
87476
|
|
|
3
|
|
|
|
|
231
|
|
8
|
3
|
|
|
3
|
|
1251
|
use Data::Dumper; |
|
3
|
|
|
|
|
13425
|
|
|
3
|
|
|
|
|
212
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
$Geoffrey::Changelog::None::VERSION = '0.000203'; |
11
|
|
|
|
|
|
|
|
12
|
3
|
|
|
3
|
|
22
|
use parent 'Geoffrey::Role::Changelog'; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
21
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
4
|
|
|
4
|
1
|
1040
|
my $class = shift; |
16
|
4
|
|
|
|
|
24
|
my $self = $class->SUPER::new(@_); |
17
|
4
|
|
50
|
|
|
40
|
$self->{ending} //= '.pl'; |
18
|
4
|
|
50
|
|
|
20
|
$self->{from_hash} //= 0; |
19
|
4
|
|
|
|
|
23
|
return bless $self, $class; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub from_hash { |
23
|
6
|
|
|
6
|
1
|
725
|
my ( $self, $b_load_from_hash ) = @_; |
24
|
6
|
100
|
|
|
|
36
|
return $self->{from_hash} if !defined $b_load_from_hash; |
25
|
1
|
|
|
|
|
3
|
$self->{from_hash} = $b_load_from_hash; |
26
|
1
|
|
|
|
|
3
|
return $self; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub tpl_main { |
30
|
|
|
|
|
|
|
return { |
31
|
1
|
|
|
1
|
1
|
16
|
templates => [ |
32
|
|
|
|
|
|
|
{ |
33
|
|
|
|
|
|
|
name => 'tpl_std', |
34
|
|
|
|
|
|
|
columns => [ { name => 'id', type => 'integer', notnull => 1, primarykey => 1, default => 'inc', }, ], |
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
], |
37
|
|
|
|
|
|
|
prefix => 'smpl', |
38
|
|
|
|
|
|
|
postfix => 'end', |
39
|
|
|
|
|
|
|
changelogs => [ '01', ], |
40
|
|
|
|
|
|
|
}; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub tpl_sub { |
44
|
|
|
|
|
|
|
return [ |
45
|
|
|
|
|
|
|
{ |
46
|
1
|
|
|
1
|
1
|
888
|
id => '001.01-maz', |
47
|
|
|
|
|
|
|
author => 'Mario Zieschang', |
48
|
|
|
|
|
|
|
entries => [ { action => 'table.add', name => 'client', template => 'tpl_std', columns => [], }, ], |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
]; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub load { |
54
|
5
|
|
|
5
|
1
|
13
|
my ( $self, $ur_file_structure ) = @_; |
55
|
5
|
100
|
|
|
|
17
|
return $self->from_hash ? $ur_file_structure : do( $ur_file_structure . $self->ending() ); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub write { |
59
|
4
|
|
|
4
|
1
|
12
|
my ( $self, $dir, $hr_data, $b_dump ) = @_; |
60
|
4
|
|
|
|
|
21
|
my $s_file = $dir . $self->ending; |
61
|
4
|
|
|
|
|
29
|
$hr_data = Data::Dumper->new( [$hr_data] )->Terse(1)->Deparse(1)->Sortkeys(1)->Dump; |
62
|
4
|
50
|
|
|
|
498
|
return $hr_data if $b_dump; |
63
|
0
|
|
|
|
|
|
return write_file( $s_file, $hr_data ); |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; # End of Geoffrey::Changelog |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
__END__ |