View/Atom/XML.pm

filter: Statementstmt 43.7% 7 / 16 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 100% 1 / 1 totaltotal 38.4% 10 / 26 CC 4 SCAR 26.1
CC
4
Cov
32%
process
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 13.7
« Plugin/Authentication/Credential/Atom.pm ↑ Summary
1 # $Id: XML.pm 1072 2006-01-04 05:01:11Z btrott $
2  
3 package Catalyst::View::Atom::XML;
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use base qw( Catalyst::Base );
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 0 ▶sub process {
Subroutine process: not called CC=4 SCAR=30.0
Pod documented
8 0 my($self, $c) = @_;
9  
10 0 my $obj = $c->stash->{xml_atom_object};
11 0 ▶ unless ($obj) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($obj) 0 0 0
12 0 ▶ $c->log->debug("No Atom object specified for rendering")
Branch: 1 branch
BranchTrueFalseTotal
if $c->debug 0 0 0
13 if $c->debug;
14 0 return 0;
15 }
16  
17 0 ▶ unless ($c->response->content_type) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($c->response->content_type) 0 0 0
18 0 $c->response->content_type('application/atom+xml');
19 }
20  
21 0 $c->response->body($obj->as_xml);
22  
23 0 1;
24 }
25  
26 1 1;
27 __END__
« Plugin/Authentication/Credential/Atom.pm ↑ Summary