| 1 | package HTTP::Body::XForms; | ||||||||||
| 2 | 25 | $HTTP::Body::XForms::VERSION = '1.24_02'; # TRIAL | |||||||||
| 3 | 25 | $HTTP::Body::XForms::VERSION = '1.2402'; | |||||||||
| 4 | 25 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 25 | ▶ | use base 'HTTP::Body'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 25 | ▶ | use bytes; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 25 | ▶ | use File::Temp 0.14; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | =head1 NAME | ||||||||||
| 11 | |||||||||||
| 12 | HTTP::Body::XForms - HTTP Body XForms Parser | ||||||||||
| 13 | |||||||||||
| 14 | =head1 SYNOPSIS | ||||||||||
| 15 | |||||||||||
| 16 | use HTTP::Body::XForms; | ||||||||||
| 17 | |||||||||||
| 18 | =head1 DESCRIPTION | ||||||||||
| 19 | |||||||||||
| 20 | HTTP Body XForms Parser. This module parses single part XForms | ||||||||||
| 21 | submissions, which are identifiable by the content-type | ||||||||||
| 22 | application/xml. The XML is stored unparsed on the parameter | ||||||||||
| 23 | XForms:Model. | ||||||||||
| 24 | |||||||||||
| 25 | =head1 METHODS | ||||||||||
| 26 | |||||||||||
| 27 | =over 4 | ||||||||||
| 28 | |||||||||||
| 29 | =item spin | ||||||||||
| 30 | |||||||||||
| 31 | This method is overwrited to set the param XForms:Model with | ||||||||||
| 32 | the buffer content. | ||||||||||
| 33 | |||||||||||
| 34 | =cut | ||||||||||
| 35 | |||||||||||
| 36 | 1 | ▶ | sub spin { | ||||||||
|
Subroutine
spin: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 37 | 1 | my $self = shift; | |||||||||
| 38 | |||||||||||
| 39 | 1 | ▶ | return unless $self->length == $self->content_length; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 40 | |||||||||||
| 41 | 1 | $self->body($self->{buffer}); | |||||||||
| 42 | 1 | $self->param( 'XForms:Model', $self->{buffer} ); | |||||||||
| 43 | 1 | $self->{buffer} = ''; | |||||||||
| 44 | 1 | $self->{state} = 'done'; | |||||||||
| 45 | |||||||||||
| 46 | 1 | return $self->SUPER::init(); | |||||||||
| 47 | } | ||||||||||
| 48 | |||||||||||
| 49 | =back | ||||||||||
| 50 | |||||||||||
| 51 | =head1 SUPPORT | ||||||||||
| 52 | |||||||||||
| 53 | See L<HTTP::Body> | ||||||||||
| 54 | |||||||||||
| 55 | =head1 AUTHOR | ||||||||||
| 56 | |||||||||||
| 57 | Daniel Ruoso, C<daniel@ruoso.com> | ||||||||||
| 58 | |||||||||||
| 59 | =head1 LICENSE | ||||||||||
| 60 | |||||||||||
| 61 | This library is free software . You can redistribute it and/or modify | ||||||||||
| 62 | it under the same terms as perl itself. | ||||||||||
| 63 | |||||||||||
| 64 | =cut | ||||||||||
| 65 | |||||||||||
| 66 | 25 | 1; | |||||||||