blib/lib/XML/Grammar/Screenplay/ToTEI.pm

filter: Statementstmt 86.6% 13 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 90.0% 18 / 20 CC 1 SCAR 0.6
CC
1
Cov
87%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« blib/lib/XML/Grammar/Screenplay/ToHTML.pm ↑ Summary blib/lib/XML/Grammar/Fiction/App/ToDocBook.pm »
1 package XML::Grammar::Screenplay::ToTEI;
2 $XML::Grammar::Screenplay::ToTEI::VERSION = '0.22.0';
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use MooX 'late';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶use XML::GrammarBase::Role::RelaxNG ();
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use XML::GrammarBase::Role::XSLT;
Subroutine BEGIN: called CC=1 SCAR=2.6
10  
11 with('XML::GrammarBase::Role::RelaxNG');
12 with XSLT( output_format => 'tei' );
13  
14 has '+module_base' => ( default => 'XML-Grammar-Fiction' );
15 has '+rng_schema_basename' => ( default => 'screenplay-xml.rng' );
16  
17 has '+to_tei_xslt_transform_basename' =>
18 ( default => 'screenplay-xml-to-tei.xslt', );
19  
20  
21 sub translate_to_tei
22 {
23 my ( $self, $args ) = @_;
24  
25 return $self->perform_xslt_translation(
26 { output_format => 'tei', %{$args} } );
27 }
28  
29 1;
30  
31 __END__
32  
33 =pod
34  
35 =encoding UTF-8
36  
37 =head1 NAME
38  
39 XML::Grammar::Screenplay::ToTEI - module that converts the Screenplay
40 XML to TEI (Text Encoding Initiative).
41  
42 =head2 new()
43  
44 Accepts no arguments so far. May take some time as the grammar is compiled
45 at that point.
46  
47 =head2 meta()
48  
49 Internal - (to settle pod-coverage).
50  
51 =head2 xslt_transform_basename()
52  
53 Inherited - (to settle pod-coverage).
54  
55 =head2 $converter->translate_to_tei({source => {file => $filename}, output => "string" })
56  
57 Does the actual conversion. $filename is the filename to translate (currently
58 the only available source).
59  
60 The C<'output'> key specifies the return value. A value of C<'string'> returns
61 the XML as a string, and a value of C<'xml'> returns the XML as an
62 L<XML::LibXML> DOM object.
63  
64 =head1 VERSION
65  
66 version 0.22.0
67  
68 =for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
69  
70 =head1 SUPPORT
71  
72 =head2 Websites
73  
74 The following websites have more information about this module, and may be of help to you. As always,
75 in addition to those websites please use your favorite search engine to discover more resources.
76  
77 =over 4
78  
79 =item *
80  
81 MetaCPAN
82  
83 A modern, open-source CPAN search engine, useful to view POD in HTML format.
84  
85 L<https://metacpan.org/release/XML-Grammar-Fiction>
86  
87 =item *
88  
89 RT: CPAN's Bug Tracker
90  
91 The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
92  
93 L<https://rt.cpan.org/Public/Dist/Display.html?Name=XML-Grammar-Fiction>
94  
95 =item *
96  
97 CPANTS
98  
99 The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
100  
101 L<http://cpants.cpanauthors.org/dist/XML-Grammar-Fiction>
102  
103 =item *
104  
105 CPAN Testers
106  
107 The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
108  
109 L<http://www.cpantesters.org/distro/X/XML-Grammar-Fiction>
110  
111 =item *
112  
113 CPAN Testers Matrix
114  
115 The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
116  
117 L<http://matrix.cpantesters.org/?dist=XML-Grammar-Fiction>
118  
119 =item *
120  
121 CPAN Testers Dependencies
122  
123 The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
124  
125 L<http://deps.cpantesters.org/?module=XML::Grammar::Fiction>
126  
127 =back
128  
129 =head2 Bugs / Feature Requests
130  
131 Please report any bugs or feature requests by email to C<bug-xml-grammar-fiction at rt.cpan.org>, or through
132 the web interface at L<https://rt.cpan.org/Public/Bug/Report.html?Queue=XML-Grammar-Fiction>. You will be automatically notified of any
133 progress on the request by the system.
134  
135 =head2 Source Code
136  
137 The code is open to the world, and available for you to hack on. Please feel free to browse it and play
138 with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
139 from your repository :)
140  
141 L<https://github.com/shlomif/fiction-xml>
142  
143 git clone git://github.com/shlomif/fiction-xml.git
144  
145 =head1 AUTHOR
146  
147 Shlomi Fish <shlomif@cpan.org>
148  
149 =head1 BUGS
150  
151 Please report any bugs or feature requests on the bugtracker website
152 L<https://github.com/shlomif/fiction-xml/issues>
153  
154 When submitting a bug or request, please include a test-file or a
155 patch to an existing test-file that illustrates the bug or desired
156 feature.
157  
158 =head1 COPYRIGHT AND LICENSE
159  
160 This software is Copyright (c) 2007 by Shlomi Fish.
161  
162 This is free software, licensed under:
163  
164 The MIT (X11) License
165  
166 =cut
« blib/lib/XML/Grammar/Screenplay/ToHTML.pm ↑ Summary blib/lib/XML/Grammar/Fiction/App/ToDocBook.pm »