Elasticsearch/Serializer/JSON/Cpanel.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 15 / 15 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
__ANON__
1.0
CRAP 1.0
« Elasticsearch/Serializer/JSON.pm ↑ Summary Elasticsearch/Serializer/JSON/PP.pm »
1 # Licensed to Elasticsearch B.V under one or more agreements.
2 # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3 # See the LICENSE file in the project root for more information
4  
5 package Search::Elasticsearch::Serializer::JSON::Cpanel;
6 3 $Search::Elasticsearch::Serializer::JSON::Cpanel::VERSION = '7.30_1'; # TRIAL
7  
8 3 $Search::Elasticsearch::Serializer::JSON::Cpanel::VERSION = '7.301';
9 3 ▶use Cpanel::JSON::XS;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 3 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 has 'JSON' =>
13 3 ▶ ( is => 'ro', default => sub { Cpanel::JSON::XS->new->utf8(1) } );
Subroutine __ANON__: called CC=1 SCAR=0.0
14  
15 3 with 'Search::Elasticsearch::Role::Serializer::JSON';
16  
17 3 1;
18  
19 =pod
20  
21 =encoding UTF-8
22  
23 =head1 NAME
24  
25 Search::Elasticsearch::Serializer::JSON::Cpanel - A JSON Serializer using Cpanel::JSON::XS
26  
27 =head1 VERSION
28  
29 version 7.30_1
30  
31 =head1 SYNOPSIS
32  
33 $e = Search::Elasticsearch(
34 serializer => 'JSON::Cpanel'
35 );
36  
37 =head1 DESCRIPTION
38  
39 While the default serializer, L<Search::Elasticsearch::Serializer::JSON>,
40 tries to choose the appropriate JSON backend, this module allows you to
41 choose the L<Cpanel::JSON::XS> backend specifically.
42  
43 This class does L<Search::Elasticsearch::Role::Serializer::JSON>.
44  
45 =head1 SEE ALSO
46  
47 =over
48  
49 =item * L<Search::Elasticsearch::Serializer::JSON>
50  
51 =item * L<Search::Elasticsearch::Serializer::JSON::XS>
52  
53 =item * L<Search::Elasticsearch::Serializer::JSON::PP>
54  
55 =back
56  
57 =head1 AUTHOR
58  
59 Enrico Zimuel <enrico.zimuel@elastic.co>
60  
61 =head1 COPYRIGHT AND LICENSE
62  
63 This software is Copyright (c) 2020 by Elasticsearch BV.
64  
65 This is free software, licensed under:
66  
67 The Apache License, Version 2.0, January 2004
68  
69 =cut
70  
71 __END__
« Elasticsearch/Serializer/JSON.pm ↑ Summary Elasticsearch/Serializer/JSON/PP.pm »