blib/lib/Froody/Request.pm

filter: Statementstmt 73.3% 11 / 15 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 60.0% 15 / 25 CC 3 SCAR 18.7
CC
3
Cov
58%
type
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 6.5
« blib/lib/Froody/Invoker/Remote.pm ↑ Summary blib/lib/Froody/Invoker/Implementation.pm »
1 =head1 NAME
2  
3 Froody::Request - a Froody server request
4  
5 =head1 DESCRIPTION
6  
7 A request into a Froody server. Has a method attribute, and params for
8 the method. Normally you would use a subclass of this that gets the
9 method and params from some external source, for instance L<Froody::Request::CGI>.
10  
11 =cut
12  
13 package Froody::Request;
14 12 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 12 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 12 ▶use base qw( Froody::Base );
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 =head1 ATTRIBUTES
19  
20 =over 4
21  
22 =item method
23  
24 The method of the request, probably taken from the URL of the CGI request
25 or something.
26  
27 =item params
28  
29 A hash of named parameters to pass to the request handler, taken from the
30 CGI params on the request or something.
31  
32 =item type
33  
34 The type of response wanted. By default this returns xml.
35  
36 =back
37  
38 =cut
39  
40 12 __PACKAGE__->mk_accessors(qw( method params));
41  
42 0 ▶sub type {
Subroutine type: not called CC=3 SCAR=24.8
Pod documented
43 0 my $self = shift;
44 0 ▶ return $self->{type} || "xml"
Branch: 1 branch
BranchTrueFalseTotal
unless @_ 0 0 0
Condition0%0/2
$self->{'type'} || 'xml'
l!l
00
MC/DC0%0/1
$self->{'type'} || 'xml'
$self->{'type'}
Truth table0%0/2
A
A= $self->{'type'}
Aresult
11
00
45 unless @_;
46 0 $self->{type} = shift;
47 0 return $self;
48 }
49  
50 =head1 BUGS
51  
52 None known.
53  
54 Please report any bugs you find via the CPAN RT system.
55 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Froody>
56  
57 =head1 AUTHOR
58  
59 Copyright Fotango 2005. All rights reserved.
60  
61 Please see the main L<Froody> documentation for details of who has worked
62 on this project.
63  
64 This module is free software; you can redistribute it and/or modify it under
65 the same terms as Perl itself.
66  
67 =head1 SEE ALSO
68  
69 L<Froody>, L<Froody::Dispatch>
70  
71 =cut
72 12 1;
« blib/lib/Froody/Invoker/Remote.pm ↑ Summary blib/lib/Froody/Invoker/Implementation.pm »