line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Sys::Bprsync::Job; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$Sys::Bprsync::Job::VERSION = '0.25'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
BEGIN { |
6
|
1
|
|
|
1
|
|
2901
|
$Sys::Bprsync::Job::AUTHORITY = 'cpan:TEX'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
# ABSTRACT: an bprsync job, spawns a worker |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
24
|
use 5.010_000; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
30
|
|
11
|
1
|
|
|
1
|
|
5
|
use mro 'c3'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
12
|
1
|
|
|
1
|
|
30
|
use feature ':5.10'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
87
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
574
|
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::Bprsync::Worker; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
extends 'Job::Manager::Job'; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has 'parent' => ( |
26
|
|
|
|
|
|
|
'is' => 'ro', |
27
|
|
|
|
|
|
|
'isa' => 'Sys::Bprsync', |
28
|
|
|
|
|
|
|
'required' => 1, |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
has 'name' => ( |
32
|
|
|
|
|
|
|
'is' => 'ro', |
33
|
|
|
|
|
|
|
'isa' => 'Str', |
34
|
|
|
|
|
|
|
'required' => 1, |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
has 'verbose' => ( |
38
|
|
|
|
|
|
|
'is' => 'rw', |
39
|
|
|
|
|
|
|
'isa' => 'Bool', |
40
|
|
|
|
|
|
|
'default' => 0, |
41
|
|
|
|
|
|
|
); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
has 'dry' => ( |
44
|
|
|
|
|
|
|
'is' => 'ro', |
45
|
|
|
|
|
|
|
'isa' => 'Bool', |
46
|
|
|
|
|
|
|
'default' => 0, |
47
|
|
|
|
|
|
|
); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub _init_worker { |
50
|
|
|
|
|
|
|
my $self = shift; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
my $Worker = Sys::Bprsync::Worker::->new( |
53
|
|
|
|
|
|
|
{ |
54
|
|
|
|
|
|
|
'config' => $self->config(), |
55
|
|
|
|
|
|
|
'logger' => $self->logger(), |
56
|
|
|
|
|
|
|
'parent' => $self->parent(), |
57
|
|
|
|
|
|
|
'name' => $self->name(), |
58
|
|
|
|
|
|
|
'verbose' => $self->verbose(), |
59
|
|
|
|
|
|
|
'dry' => $self->dry(), |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
); |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
return $Worker; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
no Moose; |
67
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
__END__ |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=pod |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=encoding UTF-8 |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 NAME |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Sys::Bprsync::Job - an bprsync job, spawns a worker |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 NAME |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Sys::Bprsync::Job - a BPrsync job |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 AUTHOR |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Dominik Schulz <dominik.schulz@gauner.org> |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
This software is copyright (c) 2012 by Dominik Schulz. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
94
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |