line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geoffrey::Changelog::None; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
1241
|
use utf8; |
|
3
|
|
|
|
|
19
|
|
|
3
|
|
|
|
|
17
|
|
4
|
3
|
|
|
3
|
|
120
|
use 5.016; |
|
3
|
|
|
|
|
11
|
|
5
|
3
|
|
|
3
|
|
16
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
65
|
|
6
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
88
|
|
7
|
3
|
|
|
3
|
|
1709
|
use File::Slurp qw/write_file read_file/; |
|
3
|
|
|
|
|
91939
|
|
|
3
|
|
|
|
|
249
|
|
8
|
3
|
|
|
3
|
|
1447
|
use Data::Dumper; |
|
3
|
|
|
|
|
14279
|
|
|
3
|
|
|
|
|
248
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
$Geoffrey::Changelog::None::VERSION = '0.000204'; |
11
|
|
|
|
|
|
|
|
12
|
3
|
|
|
3
|
|
24
|
use parent 'Geoffrey::Role::Changelog'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
26
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
4
|
|
|
4
|
1
|
1126
|
my $class = shift; |
16
|
4
|
|
|
|
|
25
|
my $self = $class->SUPER::new(@_); |
17
|
4
|
|
50
|
|
|
42
|
$self->{ending} //= '.pl'; |
18
|
4
|
|
50
|
|
|
20
|
$self->{from_hash} //= 0; |
19
|
4
|
|
|
|
|
27
|
return bless $self, $class; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub from_hash { |
23
|
6
|
|
|
6
|
1
|
729
|
my ( $self, $b_load_from_hash ) = @_; |
24
|
6
|
100
|
|
|
|
91
|
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
|
18
|
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
|
895
|
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
|
15
|
my ( $self, $ur_file_structure ) = @_; |
55
|
5
|
100
|
|
|
|
22
|
return $self->from_hash ? $ur_file_structure : do( $ur_file_structure . $self->ending() ); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub write { |
59
|
4
|
|
|
4
|
1
|
10
|
my ( $self, $dir, $hr_data, $b_dump ) = @_; |
60
|
4
|
|
|
|
|
17
|
my $s_file = $dir . $self->ending; |
61
|
4
|
|
|
|
|
23
|
$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__ |