line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Smoke::Syncer::Copy; |
2
|
11
|
|
|
11
|
|
89
|
use warnings; |
|
11
|
|
|
|
|
62
|
|
|
11
|
|
|
|
|
420
|
|
3
|
11
|
|
|
11
|
|
69
|
use strict; |
|
11
|
|
|
|
|
21
|
|
|
11
|
|
|
|
|
487
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.029'; |
6
|
|
|
|
|
|
|
|
7
|
11
|
|
|
11
|
|
66
|
use base 'Test::Smoke::Syncer::Base'; |
|
11
|
|
|
|
|
40
|
|
|
11
|
|
|
|
|
3084
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 Test::Smoke::Syncer::Copy |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
This handles syncing with the B module from a local |
12
|
|
|
|
|
|
|
directory. It uses the B file is the source directory |
13
|
|
|
|
|
|
|
to determine which fiels to copy. The current source-tree removed |
14
|
|
|
|
|
|
|
before the actual copying. |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head2 Test::Smoke::Syncer::Copy->new( %args ) |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
This crates the new object. Keys for C<%args>: |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
* ddir: destination directory ( ./perl-current ) |
23
|
|
|
|
|
|
|
* cdir: directory to copy from ( undef ) |
24
|
|
|
|
|
|
|
* v: verbose |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 $syncer->sync( ) |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
This uses B to do the actual copying. After |
31
|
|
|
|
|
|
|
that it will clean up the source-tree (from F, but ignoring |
32
|
|
|
|
|
|
|
F!). |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub sync { |
37
|
4
|
|
|
4
|
1
|
1338
|
my $self = shift; |
38
|
|
|
|
|
|
|
|
39
|
4
|
50
|
|
|
|
49
|
$self->{cdir} eq $self->{ddir} and do { |
40
|
0
|
|
|
|
|
0
|
require Carp; |
41
|
0
|
|
|
|
|
0
|
Carp::croak( "Sourcetree cannot be copied onto it self!" ); |
42
|
|
|
|
|
|
|
}; |
43
|
|
|
|
|
|
|
|
44
|
4
|
|
|
|
|
65
|
$self->pre_sync; |
45
|
4
|
|
|
|
|
1946
|
require Test::Smoke::SourceTree; |
46
|
|
|
|
|
|
|
|
47
|
4
|
|
|
|
|
42
|
my $tree = Test::Smoke::SourceTree->new($self->{cdir}, $self->verbose); |
48
|
4
|
|
|
|
|
43
|
$tree->copy_from_MANIFEST($self->{ddir}); |
49
|
|
|
|
|
|
|
|
50
|
4
|
|
|
|
|
37
|
$tree = Test::Smoke::SourceTree->new( $self->{ddir} ); |
51
|
4
|
|
|
|
|
29
|
$tree->clean_from_MANIFEST( 'MANIFEST.SKIP' ); |
52
|
|
|
|
|
|
|
|
53
|
4
|
|
|
|
|
44
|
my $plevel = $self->check_dot_patch; |
54
|
4
|
|
|
|
|
61
|
$self->post_sync; |
55
|
4
|
|
|
|
|
17
|
return $plevel; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 COPYRIGHT |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
(c) 2002-2013, All rights reserved. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
* Abe Timmerman |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
67
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
See: |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
* , |
72
|
|
|
|
|
|
|
* |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, |
75
|
|
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
76
|
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=cut |