line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Dancer::Serializer::JSONP; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:SUKRIA'; |
3
|
|
|
|
|
|
|
$Dancer::Serializer::JSONP::VERSION = '1.3514_04'; # TRIAL |
4
|
|
|
|
|
|
|
$Dancer::Serializer::JSONP::VERSION = '1.351404'; |
5
|
|
|
|
|
|
|
# ABSTRACT: serializer for handling JSONP data |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
438
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
26
|
|
8
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
9
|
1
|
|
|
1
|
|
5
|
use Dancer::SharedData; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
10
|
1
|
|
|
1
|
|
5
|
use parent 'Dancer::Serializer::JSON'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub serialize { |
13
|
1
|
|
|
1
|
1
|
2
|
my $self = shift; |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
|
|
3
|
my $callback = Dancer::SharedData->request->params('query')->{callback}; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
|
|
17
|
my $json = $self->SUPER::serialize(@_); |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
50
|
return $callback . '(' . $json . ');'; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
1
|
1
|
5
|
sub content_type {'application/javascript'} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |