AtteanX/Serializer/NQuads.pm

filter: Statementstmt 100% 31 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 10 / 10 Podpod 100% 2 / 2 totaltotal 100% 43 / 43 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Attean/Result.pm ↑ Summary AtteanX/Serializer/NTriples.pm »
1 =head1 NAME
2  
3 AtteanX::Serializer::NQuads - N-Triples Serializer
4  
5 =head1 VERSION
6  
7 This document describes AtteanX::Serializer::NQuads version 0.040
8  
9 =head1 SYNOPSIS
10  
11 use Attean;
12 my $serializer = Attean->get_serializer('NQuads')->new();
13 $serializer->serialize_iter_to_io( $iter, $fh );
14  
15 =head1 DESCRIPTION
16  
17 Serializes triples and quads into the RDF 1.1 N-Quads format.
18  
19 =head1 ATTRIBUTES
20  
21 =over 4
22  
23 =item C<< canonical_media_type >>
24  
25 =item C<< file_extensions >>
26  
27 =back
28  
29 =head1 METHODS
30  
31 =over 4
32  
33 =item C<< serialize_iter_to_io( $fh, $iterator ) >>
34  
35 =item C<< serialize_iter_to_bytes( $fh ) >>
36  
37 =cut
38  
39 4 ▶use v5.14;
Subroutine BEGIN: called CC=1 SCAR=0.0
40 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
41  
42 4 package AtteanX::Serializer::NQuads 0.040 {
43 4 ▶ use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
44 4 ▶ use Types::Standard qw(Str ArrayRef);
Subroutine BEGIN: called CC=1 SCAR=0.0
45 4 ▶ use Encode qw(encode);
Subroutine BEGIN: called CC=1 SCAR=0.0
46 4 ▶ use Attean::ListIterator;
Subroutine BEGIN: called CC=1 SCAR=0.0
47 4 ▶ use List::Util qw(any);
Subroutine BEGIN: called CC=1 SCAR=0.0
48 4 ▶ use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
49  
50 4 extends 'AtteanX::Serializer::NTuples';
51 4 has 'canonical_media_type' => (is => 'ro', isa => Str, init_arg => undef, default => 'application/n-quads');
52  
53 =item C<< media_types >>
54  
55 Returns a list of media types that identify the format produced by this serializer.
56  
57 =cut
58  
59 13 ▶ sub media_types {
Subroutine media_types: called CC=1 SCAR=0.0
Pod documented
60 13 return [qw(application/n-quads)];
61 }
62  
63  
64 =item C<< file_extensions >>
65  
66 Returns a list of file extensions associated with the serialized format.
67  
68 =cut
69  
70 14 ▶ sub file_extensions { return [qw(nq)] };
Subroutine file_extensions: called CC=1 SCAR=0.0
Pod documented
71  
72 4 with 'Attean::API::MixedStatementSerializer';
73 4 with 'Attean::API::AppendableSerializer';
74 }
75  
76 4 1;
77  
78 __END__
« Attean/Result.pm ↑ Summary AtteanX/Serializer/NTriples.pm »