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