File Coverage

blib/lib/Sys/RevoBackup/Job.pm
Criterion Covered Total %
statement 11 13 84.6
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 16 18 88.8


line stmt bran cond sub pod time code
1             package Sys::RevoBackup::Job;
2             {
3             $Sys::RevoBackup::Job::VERSION = '0.27';
4             }
5             BEGIN {
6 1     1   2119 $Sys::RevoBackup::Job::AUTHORITY = 'cpan:TEX';
7             }
8             # ABSTRACT: an Revobackup job, spawns a worker
9              
10 1     1   20 use 5.010_000;
  1         4  
  1         40  
11 1     1   6 use mro 'c3';
  1         2  
  1         7  
12 1     1   26 use feature ':5.10';
  1         2  
  1         97  
13              
14 1     1   463 use Moose;
  0            
  0            
15             use namespace::autoclean;
16              
17             # use IO::Handle;
18             # use autodie;
19             # use MooseX::Params::Validate;
20              
21             use Sys::RevoBackup::Worker;
22              
23             extends 'Sys::Bprsync::Job';
24              
25             foreach my $key (qw(bank vault)) {
26             has $key => (
27             'is' => 'ro',
28             'isa' => 'Str',
29             'required' => 1,
30             );
31             }
32              
33             sub _startup {
34             my $self = shift;
35              
36             # DGR: I really want the global effect this assignment has!
37             ## no critic (RequireLocalizedPunctuationVars)
38             $0 = 'revobackup - ' . $self->name();
39             ## use critic
40              
41             return 1;
42             }
43              
44             sub _init_worker {
45             my $self = shift;
46              
47             my $Worker = Sys::RevoBackup::Worker::->new(
48             {
49             'config' => $self->config(),
50             'logger' => $self->logger(),
51             'parent' => $self->parent(),
52             'name' => $self->name(),
53             'verbose' => $self->verbose(),
54             'bank' => $self->bank(),
55             'vault' => $self->vault(),
56             'dry' => $self->dry(),
57             }
58             );
59             return $Worker;
60             }
61              
62             no Moose;
63             __PACKAGE__->meta->make_immutable;
64              
65             1;
66              
67             __END__
68              
69             =pod
70              
71             =encoding UTF-8
72              
73             =head1 NAME
74              
75             Sys::RevoBackup::Job - an Revobackup job, spawns a worker
76              
77             =head1 NAME
78              
79             Sys::RevoBackup::Job - a RevoBackup job
80              
81             =head1 AUTHOR
82              
83             Dominik Schulz <dominik.schulz@gauner.org>
84              
85             =head1 COPYRIGHT AND LICENSE
86              
87             This software is copyright (c) 2012 by Dominik Schulz.
88              
89             This is free software; you can redistribute it and/or modify it under
90             the same terms as the Perl 5 programming language system itself.
91              
92             =cut