line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package IO::All::SFTP; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
21019
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
require LWP::Debug; |
7
|
1
|
|
|
1
|
|
999
|
use IO::All::LWP '-base'; |
|
1
|
|
|
|
|
102205
|
|
|
1
|
|
|
|
|
13
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
const type => 'sftp'; |
12
|
|
|
|
|
|
|
|
13
|
0
|
|
|
0
|
0
|
|
sub sftp { my $self=shift; $self->lwp_init(__PACKAGE__, @_) } |
|
0
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 NAME |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
IO::All::SFTP - use sftp from IO::All |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Here's a quick example of how to use this: |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
use IO::All; |
24
|
|
|
|
|
|
|
# print the contents of the remove file |
25
|
|
|
|
|
|
|
$test < io('sftp://guest:guest@asdf/home/guest/test'); |
26
|
|
|
|
|
|
|
print $test; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
For more information on the interface, see the L POD. |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
I did not write any of the code that this module uses. All of the code |
33
|
|
|
|
|
|
|
is in LWP::Protocol::sftp and IO::All::LWP. This module just tells |
34
|
|
|
|
|
|
|
IO::All::LWP to use LWP::Protocol::sftp. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
So kudos to Salvador FandiƱo for LWP-Protocol-sftp and Ivan |
37
|
|
|
|
|
|
|
Tubert-Brohman and Brian Ingerson for IO-All-LWP. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 BUGS |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
One bug that I've found while testing is that if you don't have the |
42
|
|
|
|
|
|
|
host you are connecting to in your known_hosts, it will just hang. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Copyright 2009 Ryan Niebur, all rights reserved. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
49
|
|
|
|
|
|
|
under the same terms as Perl itself. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 SEE ALSO |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
L, L |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=cut |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |