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