« blib/lib/XML/Grammar/FictionBase/FromProto/Parser/XmlIterator.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.32.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 | |||||||||||
| 15 | |||||||||||
| 16 | sub run | ||||||||||
| 17 | 0 | ▶ | { | ||||||||
|
Subroutine
run: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 18 | 0 | my $output_filename; | |||||||||
| 19 | |||||||||||
| 20 | 0 | GetOptions( "output|o=s" => \$output_filename, ); | |||||||||
| 21 | |||||||||||
| 22 | 0 | ▶ | if ( !defined($output_filename) ) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | { | ||||||||||
| 24 | 0 | die "Output filename not specified! Use the -o|--output flag!"; | |||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 0 | require XML::Grammar::Screenplay::FromProto::Parser::QnD; | |||||||||
| 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 | return; | |||||||||
| 44 | } | ||||||||||
| 45 | |||||||||||
| 46 | 1 | 1; | |||||||||
| 47 | |||||||||||
| 48 | __END__ | ||||||||||