Body/XForms.pm

filter: Statementstmt 100% 21 / 21 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 96.5% 28 / 29 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 25 $HTTP::Body::XForms::VERSION = '1.25';
3 25 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 25 ▶use base 'HTTP::Body';
Subroutine BEGIN: called CC=1 SCAR=0.0
5 25 ▶use bytes;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 25 ▶use File::Temp 0.14;
Subroutine BEGIN: called CC=1 SCAR=0.0
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 1 ▶sub spin {
Subroutine spin: called CC=2 SCAR=7.0
Pod documented
36 1 my $self = shift;
37  
38 1 ▶ return unless $self->length == $self->content_length;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->length == $self->content_length 0 1 1
39  
40 1 $self->body($self->{buffer});
41 1 $self->param( 'XForms:Model', $self->{buffer} );
42 1 $self->{buffer} = '';
43 1 $self->{state} = 'done';
44  
45 1 return $self->SUPER::init();
46 }
47  
48 =back
49  
50 =head1 SUPPORT
51  
52 See L<HTTP::Body>
53  
54 =head1 AUTHOR
55  
56 Daniel Ruoso, C<daniel@ruoso.com>
57  
58 =head1 LICENSE
59  
60 This library is free software . You can redistribute it and/or modify
61 it under the same terms as perl itself.
62  
63 =cut
64  
65 25 1;
« Body/XFormsMultipart.pm ↑ Summary