Body/XForms.pm

filter: Statementstmt 100% 22 / 22 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 96.6% 29 / 30 CC 2 SCAR 2.9
CC
2
Cov
96%
spin
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Body/XFormsMultipart.pm ↑ Summary
1 package HTTP::Body::XForms;
2 24 $HTTP::Body::XForms::VERSION = '1.24_01'; # TRIAL
3 24 $HTTP::Body::XForms::VERSION = '1.2401';
4 24 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 24 ▶use base 'HTTP::Body';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 24 ▶use bytes;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 24 ▶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
BranchTrueFalseTotal
unless $self->length == $self->content_length 0 1 1
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 24 1;
« Body/XFormsMultipart.pm ↑ Summary