line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Sys::RevoBackup::Plugin; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$Sys::RevoBackup::Plugin::VERSION = '0.27'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
BEGIN { |
6
|
1
|
|
|
1
|
|
1830
|
$Sys::RevoBackup::Plugin::AUTHORITY = 'cpan:TEX'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
# ABSTRACT: baseclass for any revobackup plugin |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
19
|
use 5.010_000; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
42
|
|
11
|
1
|
|
|
1
|
|
6
|
use mro 'c3'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
14
|
|
12
|
1
|
|
|
1
|
|
26
|
use feature ':5.10'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
90
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
435
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use namespace::autoclean; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# use IO::Handle; |
18
|
|
|
|
|
|
|
# use autodie; |
19
|
|
|
|
|
|
|
# use MooseX::Params::Validate; |
20
|
|
|
|
|
|
|
# use Carp; |
21
|
|
|
|
|
|
|
# use English qw( -no_match_vars ); |
22
|
|
|
|
|
|
|
# use Try::Tiny; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# extends ... |
25
|
|
|
|
|
|
|
# has ... |
26
|
|
|
|
|
|
|
has 'parent' => ( |
27
|
|
|
|
|
|
|
'is' => 'rw', |
28
|
|
|
|
|
|
|
'isa' => 'Sys::RevoBackup', |
29
|
|
|
|
|
|
|
'required' => 1, |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
has 'priority' => ( |
33
|
|
|
|
|
|
|
'is' => 'ro', |
34
|
|
|
|
|
|
|
'isa' => 'Int', |
35
|
|
|
|
|
|
|
'lazy' => 1, |
36
|
|
|
|
|
|
|
'builder' => '_init_priority', |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
# with ... |
39
|
|
|
|
|
|
|
with qw(Log::Tree::RequiredLogger Config::Yak::RequiredConfig); |
40
|
|
|
|
|
|
|
# initializers ... |
41
|
|
|
|
|
|
|
sub _init_priority { return 0; } |
42
|
|
|
|
|
|
|
# your code here ... |
43
|
|
|
|
|
|
|
sub run_config_hook { return; } |
44
|
|
|
|
|
|
|
sub run_prepare_hook { return; } |
45
|
|
|
|
|
|
|
sub run_cleanup_hook { return; } |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
no Moose; |
48
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__END__ |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=pod |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=encoding UTF-8 |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 NAME |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Sys::RevoBackup::Plugin - baseclass for any revobackup plugin |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 METHODS |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 run_cleanup_hook |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Run after the backup is finished. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 run_config_hook |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Run to configure all backups jobs. May supply additional backup jobs. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 run_prepare_hook |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Run before the backups are made but after the config hook was run. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 NAME |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Sys::RevoBackup::Plugin - Baseclass for any RevoBackup plugin. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 AUTHOR |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Dominik Schulz <dominik.schulz@gauner.org> |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
This software is copyright (c) 2012 by Dominik Schulz. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
89
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=cut |