line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OpenPlugin::Upload; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# $Id: Upload.pm,v 1.13 2003/04/03 01:51:24 andreychek Exp $ |
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
68
|
|
6
|
2
|
|
|
2
|
|
10
|
use base qw( OpenPlugin::Plugin ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
154
|
|
7
|
2
|
|
|
2
|
|
12
|
use Data::Dumper qw( Dumper ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
639
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
$OpenPlugin::Upload::VERSION = sprintf("%d.%02d", q$Revision: 1.13 $ =~ /(\d+)\.(\d+)/); |
10
|
|
|
|
|
|
|
|
11
|
6
|
|
|
6
|
0
|
91
|
sub OP { return $_[0]->{_m}{OP} } |
12
|
0
|
|
|
0
|
1
|
|
sub type { return 'upload' } |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
*get = \*get_incoming; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub get_incoming { |
17
|
0
|
|
|
0
|
0
|
|
my ( $self, $name ) = @_; |
18
|
0
|
0
|
|
|
|
|
unless ( $name ) { |
19
|
0
|
|
|
|
|
|
return ( ref $self->state->{upload} eq 'HASH' ) |
20
|
0
|
0
|
|
|
|
|
? keys %{ $self->state->{upload} } : (); |
21
|
|
|
|
|
|
|
} |
22
|
0
|
0
|
0
|
|
|
|
if ( ref $self->state->{upload}{ $name } eq 'ARRAY' and wantarray ) { |
23
|
0
|
|
|
|
|
|
return @{ $self->state->{upload}{ $name } }; |
|
0
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
return $self->state->{upload}{ $name }; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub set_incoming { |
30
|
0
|
|
|
0
|
0
|
|
my ( $self, $upload ) = @_; |
31
|
|
|
|
|
|
|
|
32
|
0
|
0
|
|
|
|
|
return undef unless ( $upload->{ name } ); |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
return $self->state->{ upload }{ $upload->{ name } } = $upload; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |