line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::Body::XForms; |
2
|
|
|
|
|
|
|
$HTTP::Body::XForms::VERSION = '1.20'; |
3
|
8
|
|
|
8
|
|
30
|
use strict; |
|
8
|
|
|
|
|
7
|
|
|
8
|
|
|
|
|
234
|
|
4
|
8
|
|
|
8
|
|
26
|
use base 'HTTP::Body'; |
|
8
|
|
|
|
|
83
|
|
|
8
|
|
|
|
|
493
|
|
5
|
8
|
|
|
8
|
|
36
|
use bytes; |
|
8
|
|
|
|
|
9
|
|
|
8
|
|
|
|
|
32
|
|
6
|
|
|
|
|
|
|
|
7
|
8
|
|
|
8
|
|
167
|
use File::Temp 0.14; |
|
8
|
|
|
|
|
119
|
|
|
8
|
|
|
|
|
1248
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
HTTP::Body::XForms - HTTP Body XForms Parser |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use HTTP::Body::XForms; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 DESCRIPTION |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
HTTP Body XForms Parser. This module parses single part XForms |
20
|
|
|
|
|
|
|
submissions, which are identifiable by the content-type |
21
|
|
|
|
|
|
|
application/xml. The XML is stored unparsed on the parameter |
22
|
|
|
|
|
|
|
XForms:Model. |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 METHODS |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=over 4 |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=item spin |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
This method is overwrited to set the param XForms:Model with |
31
|
|
|
|
|
|
|
the buffer content. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub spin { |
36
|
1
|
|
|
1
|
1
|
2
|
my $self = shift; |
37
|
|
|
|
|
|
|
|
38
|
1
|
50
|
|
|
|
7
|
return unless $self->length == $self->content_length; |
39
|
|
|
|
|
|
|
|
40
|
1
|
|
|
|
|
4
|
$self->body($self->{buffer}); |
41
|
1
|
|
|
|
|
4
|
$self->param( 'XForms:Model', $self->{buffer} ); |
42
|
1
|
|
|
|
|
1
|
$self->{buffer} = ''; |
43
|
1
|
|
|
|
|
2
|
$self->{state} = 'done'; |
44
|
|
|
|
|
|
|
|
45
|
1
|
|
|
|
|
7
|
return $self->SUPER::init(); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=back |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 AUTHOR |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Daniel Ruoso, C |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 LICENSE |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This library is free software . You can redistribute it and/or modify |
57
|
|
|
|
|
|
|
it under the same terms as perl itself. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |