blib/lib/XML/Grammar/Fiction/App/FromProto.pm

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