| 1 | package Search::OpenSearch::Response::JSON; | ||||||||||
| 2 | 2 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 2 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | extends 'Search::OpenSearch::Response'; | |||||||||
| 5 | 2 | ▶ | use JSON; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 2 | our $VERSION = '0.409'; | |||||||||
| 8 | |||||||||||
| 9 | 1 | ▶ | sub stringify { | ||||||||
|
Subroutine
stringify: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||
| 10 | 1 | my $self = shift; | |||||||||
| 11 | |||||||||||
| 12 | 1 | my $resp = $self->as_hash; | |||||||||
| 13 | |||||||||||
| 14 | # in devel mode use pretty() | ||||||||||
| 15 | 1 | ▶ | return $self->debug | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | ? JSON->new->utf8->pretty(1)->encode($resp) | ||||||||||
| 17 | : encode_json($resp); | ||||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | 0 | ▶ | sub content_type { return 'application/json; charset=utf-8' } | ||||||||
|
Subroutine
content_type: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 21 | |||||||||||
| 22 | 2 | 1; | |||||||||
| 23 | |||||||||||
| 24 | __END__ | ||||||||||