blib/lib/XML/Grammar/Screenplay/App/ToHTML.pm

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