HTTP::Body::XForms - HTTP Body XForms Parser


HTTP-Body documentation Contained in the HTTP-Body distribution.

Index


Code Index:

NAME

Top

HTTP::Body::XForms - HTTP Body XForms Parser

SYNOPSIS

Top

    use HTTP::Body::XForms;

DESCRIPTION

Top

HTTP Body XForms Parser. This module parses single part XForms submissions, which are identifiable by the content-type application/xml. The XML is stored unparsed on the parameter XForms:Model.

METHODS

Top

spin

This method is overwrited to set the param XForms:Model with the buffer content.

AUTHOR

Top

Daniel Ruoso, daniel@ruoso.com

LICENSE

Top

This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.


HTTP-Body documentation Contained in the HTTP-Body distribution.
package HTTP::Body::XForms;
BEGIN {
  $HTTP::Body::XForms::VERSION = '1.12';
}

use strict;
use base 'HTTP::Body';
use bytes;

use File::Temp 0.14;

sub spin {
    my $self = shift;

    return unless $self->length == $self->content_length;

    $self->body($self->{buffer});
    $self->param( 'XForms:Model', $self->{buffer} );
    $self->{buffer} = '';
    $self->{state}  = 'done';

    return $self->SUPER::init();
}

1;