line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Followme::UploadNone; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
642
|
use 5.008005; |
|
1
|
|
|
|
|
4
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
467
|
use lib '../..'; |
|
1
|
|
|
|
|
643
|
|
|
1
|
|
|
|
|
5
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
135
|
use base qw(App::Followme::ConfiguredObject); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
464
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = "2.02"; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
#---------------------------------------------------------------------- |
15
|
|
|
|
|
|
|
# Add a directory to the remote site |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub add_directory { |
18
|
1
|
|
|
1
|
1
|
4
|
my ($self, $dir) = @_; |
19
|
1
|
|
|
|
|
3
|
return 1; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
#---------------------------------------------------------------------- |
23
|
|
|
|
|
|
|
# Add a file to the remote site |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub add_file { |
26
|
1
|
|
|
1
|
1
|
949
|
my ($self, $local_filename, $remote_filename) = @_; |
27
|
1
|
|
|
|
|
3
|
return 1; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
#---------------------------------------------------------------------- |
31
|
|
|
|
|
|
|
# Close the ftp connection |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub close { |
34
|
1
|
|
|
1
|
1
|
626
|
my ($self) = @_; |
35
|
1
|
|
|
|
|
146
|
return; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
#---------------------------------------------------------------------- |
39
|
|
|
|
|
|
|
# Delete a directory from the remote site |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub delete_directory { |
42
|
1
|
|
|
1
|
1
|
699
|
my ($self, $dir) = @_; |
43
|
1
|
|
|
|
|
4
|
return 1; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
#---------------------------------------------------------------------- |
47
|
|
|
|
|
|
|
# Delete a file from the remote site |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub delete_file { |
50
|
1
|
|
|
1
|
1
|
630
|
my ($self, $filename) = @_; |
51
|
1
|
|
|
|
|
3
|
return 1; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
#---------------------------------------------------------------------- |
55
|
|
|
|
|
|
|
# Open the connection to the remote site |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub open { |
58
|
1
|
|
|
1
|
1
|
16
|
my ($self, $user, $password) = @_; |
59
|
1
|
|
|
|
|
2
|
return; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
1; |
63
|
|
|
|
|
|
|
__END__ |
64
|
|
|
|
|
|
|
=encoding utf-8 |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 NAME |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
App::Followme::UploadNone - Go through the motions of uploading files |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 SYNOPSIS |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
my $uploader = App::Followme::UploadNone->new(\%configuration); |
73
|
|
|
|
|
|
|
$uploader->open($user, $password); |
74
|
|
|
|
|
|
|
$uploader->add_directory($dir); |
75
|
|
|
|
|
|
|
$uploader->add_file($local_filename, $remote_filename); |
76
|
|
|
|
|
|
|
$uploader->delete_directory($dir); |
77
|
|
|
|
|
|
|
$uploader->delete_file($filename); |
78
|
|
|
|
|
|
|
$uploader->close(); |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 DESCRIPTION |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
L<App::Followme::UploadSite> splits off methods that do the actual uploading |
83
|
|
|
|
|
|
|
into a separate package, so it can support more than one method. This is the |
84
|
|
|
|
|
|
|
null method, that does no upload, which is invoked when the user only wants to |
85
|
|
|
|
|
|
|
update the checksums without doing any uploads. In addition, this package |
86
|
|
|
|
|
|
|
serves as a template for other packages, because it has all the necessary |
87
|
|
|
|
|
|
|
methods with the correct interfaces. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 METHODS |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
The following are the public methods of the interface. The return value |
92
|
|
|
|
|
|
|
indicates if the operation was successful. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=over 4 |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item $flag = $self->add_directory($dir); |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Create a new directory |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item $flag = $self->add_file($locl_filename, $remote_filename); |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Upload a new file. If it already exists, delete it. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item $self->close(); |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Close the connection to the remote site. |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item $flag = $self->delete_directory($dir); |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
Delete a directory, including any files it might hold. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=item $flag = $self->delete_file($filename); |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Delete a file on the remote site. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=item $self->open($user, $password); |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Open the connection to the remote site |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=item $self->setup(); |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
Set up computed fields in the new object |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=back |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head1 LICENSE |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
Copyright (C) Bernie Simon. |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
131
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head1 AUTHOR |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
Bernie Simon E<lt>bernie.simon@gmail.comE<gt> |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=cut |