App-BatParser
view release on metacpan or search on metacpan
"module_name" => "App::BatParser",
"recursive_test_files" => 1,
"requires" => {
"Moo" => 0,
"Regexp::Grammars" => "1.000",
"namespace::autoclean" => 0,
"perl" => "5.012",
"utf8" => 0
},
"test_requires" => {
"Data::Dumper" => 0,
"English" => 0,
"Path::Tiny" => 0,
"Test::More" => 0,
"Test::Most" => 0,
"strict" => 0,
"warnings" => 0
}
);
my %fallback_build_requires = (
"Data::Dumper" => 0,
"English" => 0,
"Module::Build" => "0.28",
"Path::Tiny" => 0,
"Test::More" => 0,
"Test::Most" => 0,
"strict" => 0,
"warnings" => 0
);
"requires" : {
"Moo" : "0",
"Regexp::Grammars" : "1.000",
"namespace::autoclean" : "0",
"perl" : "5.012",
"utf8" : "0"
}
},
"test" : {
"requires" : {
"Data::Dumper" : "0",
"English" : "0",
"Path::Tiny" : "0",
"Test::More" : "0",
"Test::Most" : "0",
"strict" : "0",
"warnings" : "0"
}
}
},
"release_status" : "stable",
---
abstract: 'Parse DOS .bat and .cmd files'
author:
- 'Pablo RodrÃguez González <pablo.rodriguez.gonzalez@gmail.com>'
build_requires:
Data::Dumper: '0'
English: '0'
Module::Build: '0.28'
Path::Tiny: '0'
Test::More: '0'
Test::Most: '0'
strict: '0'
warnings: '0'
configure_requires:
Module::Build: '0.28'
dynamic_config: 0
# DESCRIPTION
Parse DOS .bat and .cmd files
# SYNOPSYS
```perl
use App::BatParser;
use Path::Tiny;
use Data::Dumper;
my $parser = App::BatParser->new;
my $bat_string = Path::Tiny::path('t/cmd/simple.cmd')->slurp;
say Dumper($parser->parse($bat_string));
```
# METHODS
## grammar
lib/App/BatParser.pm view on Meta::CPAN
version 0.011
=head1 DESCRIPTION
Parse DOS .bat and .cmd files
=head1 SYNOPSYS
use App::BatParser;
use Path::Tiny;
use Data::Dumper;
my $parser = App::BatParser->new;
my $bat_string = Path::Tiny::path('t/cmd/simple.cmd')->slurp;
say Dumper($parser->parse($bat_string));
=head1 METHODS
=head2 grammar
script/batparser.pl view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use App::BatParser;
use Path::Tiny;
use Data::Dumper;
use Getopt::Long::Descriptive;
my ($opt, $usage) = describe_options(
'%c %o <file>',
[],
['help', 'print usage message and exit'],
);
print($usage->text), exit if $opt->help;
t/08-whitespaces_setting_variables.t view on Meta::CPAN
}
},
]
},
};
my $cmd_file = $PROGRAM_NAME;
$cmd_file =~ s/\.t/\.cmd/;
my $cmd_contents = path($cmd_file)->slurp;
my $parser = App::BatParser->new;
my $ast = $parser->parse($cmd_contents);
use Data::Dumper;
print Dumper $ast;
is_deeply( $ast, $ast_expected,
'Parsing a cmd with whitespaces in the end of lines' );
}
( run in 0.537 second using v1.01-cache-2.11-cpan-4d50c553e7e )