line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geoffrey::Changelog::None; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
1330
|
use utf8; |
|
3
|
|
|
|
|
18
|
|
|
3
|
|
|
|
|
16
|
|
4
|
3
|
|
|
3
|
|
125
|
use 5.016; |
|
3
|
|
|
|
|
11
|
|
5
|
3
|
|
|
3
|
|
17
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
70
|
|
6
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
113
|
|
7
|
3
|
|
|
3
|
|
1765
|
use File::Slurp qw/write_file read_file/; |
|
3
|
|
|
|
|
90705
|
|
|
3
|
|
|
|
|
223
|
|
8
|
3
|
|
|
3
|
|
1277
|
use Data::Dumper; |
|
3
|
|
|
|
|
13638
|
|
|
3
|
|
|
|
|
208
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
$Geoffrey::Changelog::None::VERSION = '0.000205'; |
11
|
|
|
|
|
|
|
|
12
|
3
|
|
|
3
|
|
23
|
use parent 'Geoffrey::Role::Changelog'; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
24
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
4
|
|
|
4
|
1
|
1124
|
my $class = shift; |
16
|
4
|
|
|
|
|
26
|
my $self = $class->SUPER::new(@_); |
17
|
4
|
|
50
|
|
|
39
|
$self->{ending} //= '.pl'; |
18
|
4
|
|
50
|
|
|
22
|
$self->{from_hash} //= 0; |
19
|
4
|
|
|
|
|
22
|
return bless $self, $class; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub from_hash { |
23
|
6
|
|
|
6
|
1
|
732
|
my ( $self, $b_load_from_hash ) = @_; |
24
|
6
|
100
|
|
|
|
39
|
return $self->{from_hash} if !defined $b_load_from_hash; |
25
|
1
|
|
|
|
|
2
|
$self->{from_hash} = $b_load_from_hash; |
26
|
1
|
|
|
|
|
4
|
return $self; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub tpl_main { |
30
|
|
|
|
|
|
|
return { |
31
|
1
|
|
|
1
|
1
|
19
|
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
|
903
|
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
|
16
|
my ( $self, $ur_file_structure ) = @_; |
55
|
5
|
100
|
|
|
|
16
|
return $self->from_hash ? $ur_file_structure : do( $ur_file_structure . $self->ending() ); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub write { |
59
|
4
|
|
|
4
|
1
|
11
|
my ( $self, $dir, $hr_data, $b_dump ) = @_; |
60
|
4
|
|
|
|
|
17
|
my $s_file = $dir . $self->ending; |
61
|
4
|
|
|
|
|
28
|
$hr_data = Data::Dumper->new( [$hr_data] )->Terse(1)->Deparse(1)->Sortkeys(1)->Dump; |
62
|
4
|
50
|
|
|
|
504
|
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__ |