blib/lib/Dancer/Serializer/JSONP.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 2 / 2 totaltotal 100% 28 / 28 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Dancer/Logger/Null.pm ↑ Summary blib/lib/Dancer/Session/Simple.pm »
1 package Dancer::Serializer::JSONP;
2 2 our $AUTHORITY = 'cpan:SUKRIA';
3 2 $Dancer::Serializer::JSONP::VERSION = '1.3520';
4 # ABSTRACT: serializer for handling JSONP data
5  
6 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use Dancer::SharedData;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use parent 'Dancer::Serializer::JSON';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 sub serialize {
12 1 ▶ my $self = shift;
Subroutine serialize: called CC=1 SCAR=0.0
Pod documented
13
14 1 my $callback = Dancer::SharedData->request->params('query')->{callback};
15
16 1 my $json = $self->SUPER::serialize(@_);
17
18 1 return $callback . '(' . $json . ');';
19 }
20  
21 1 ▶sub content_type {'application/javascript'}
Subroutine content_type: called CC=1 SCAR=0.0
Pod documented
22  
23 2 1;
24  
25 __END__
« blib/lib/Dancer/Logger/Null.pm ↑ Summary blib/lib/Dancer/Session/Simple.pm »