blib/lib/XML/Grammar/Screenplay/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/Fiction/App/FromProto.pm ↑ Summary blib/lib/XML/Grammar/FictionBase/FromProto/Parser/LineIterator.pm »
1 package XML::Grammar::Screenplay::App::FromProto;
2 1 $XML::Grammar::Screenplay::App::FromProto::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 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::Screenplay::FromProto ();
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use XML::Grammar::Screenplay::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::Screenplay::FromProto->new(
29 {
30 parser_class => "XML::Grammar::Screenplay::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::Screenplay::App::FromProto - module implementing
57 a command line application to convert a well-formed text to
58 Screenplay XML.
59  
60 =head1 VERSION
61  
62 version 0.22.0
63  
64 =head1 SYNOPSIS
65  
66 perl -MXML::Grammar::Screenplay::App::FromProto -e 'run()' -- \
67 -o $@ $<
68  
69 =head1 FUNCTIONS
70  
71 =head2 run()
72  
73 Call with no arguments to run the application from the commandline.
74  
75 =for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
76  
77 =head1 SUPPORT
78  
79 =head2 Websites
80  
81 The following websites have more information about this module, and may be of help to you. As always,
82 in addition to those websites please use your favorite search engine to discover more resources.
83  
84 =over 4
85  
86 =item *
87  
88 MetaCPAN
89  
90 A modern, open-source CPAN search engine, useful to view POD in HTML format.
91  
92 L<https://metacpan.org/release/XML-Grammar-Fiction>
93  
94 =item *
95  
96 RT: CPAN's Bug Tracker
97  
98 The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
99  
100 L<https://rt.cpan.org/Public/Dist/Display.html?Name=XML-Grammar-Fiction>
101  
102 =item *
103  
104 CPANTS
105  
106 The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
107  
108 L<http://cpants.cpanauthors.org/dist/XML-Grammar-Fiction>
109  
110 =item *
111  
112 CPAN Testers
113  
114 The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
115  
116 L<http://www.cpantesters.org/distro/X/XML-Grammar-Fiction>
117  
118 =item *
119  
120 CPAN Testers Matrix
121  
122 The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
123  
124 L<http://matrix.cpantesters.org/?dist=XML-Grammar-Fiction>
125  
126 =item *
127  
128 CPAN Testers Dependencies
129  
130 The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
131  
132 L<http://deps.cpantesters.org/?module=XML::Grammar::Fiction>
133  
134 =back
135  
136 =head2 Bugs / Feature Requests
137  
138 Please report any bugs or feature requests by email to C<bug-xml-grammar-fiction at rt.cpan.org>, or through
139 the web interface at L<https://rt.cpan.org/Public/Bug/Report.html?Queue=XML-Grammar-Fiction>. You will be automatically notified of any
140 progress on the request by the system.
141  
142 =head2 Source Code
143  
144 The code is open to the world, and available for you to hack on. Please feel free to browse it and play
145 with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
146 from your repository :)
147  
148 L<https://github.com/shlomif/fiction-xml>
149  
150 git clone git://github.com/shlomif/fiction-xml.git
151  
152 =head1 AUTHOR
153  
154 Shlomi Fish <shlomif@cpan.org>
155  
156 =head1 BUGS
157  
158 Please report any bugs or feature requests on the bugtracker website
159 L<https://github.com/shlomif/fiction-xml/issues>
160  
161 When submitting a bug or request, please include a test-file or a
162 patch to an existing test-file that illustrates the bug or desired
163 feature.
164  
165 =head1 COPYRIGHT AND LICENSE
166  
167 This software is Copyright (c) 2007 by Shlomi Fish.
168  
169 This is free software, licensed under:
170  
171 The MIT (X11) License
172  
173 =cut
« blib/lib/XML/Grammar/Fiction/App/FromProto.pm ↑ Summary blib/lib/XML/Grammar/FictionBase/FromProto/Parser/LineIterator.pm »