AppSpec/Spec.pm untested

filter: Statementstmt 0.0% 0 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 30 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 use strict;
2 use warnings;
3 package App::AppSpec::Spec;
4  
5 our $VERSION = 'v0.6.1'; # TRIAL VERSION
6  
7 use base 'Exporter';
8 our @EXPORT_OK = qw/ $SPEC /;
9  
10 our $SPEC;
11  
12 # START INLINE
13 $SPEC = {
14 'appspec' => {
15 'version' => '0.001'
16 },
17 'class' => 'App::AppSpec',
18 'description' => 'This script is a collection of tools for authors of L<App::Spec> command line
19 scripts.
20  
21 # generate completion
22 % appspec completion --bash path/to/spec.yaml
23 # generate pod
24 % appspec pod path/to/spec.yaml
25 # validate your spec file
26 % appspec validate path/to/spec.yaml
27 # generate a new App::Spec app skeleton
28 % appspec new --class App::foo --name foo --with-subcommands
29 ',
30 'markup' => 'pod',
31 'name' => 'appspec',
32 'options' => [],
33 'subcommands' => {
34 'completion' => {
35 'description' => 'This command takes a spec file and outputs the corresponding
36 shell script for tab completion.
37 ',
38 'op' => 'cmd_completion',
39 'options' => [
40 'name=s --name of the program (optional, override the value from the spec)',
41 'zsh --for zsh',
42 'bash --for bash',
43 'fish --for fish (>= 4.0)'
44 ],
45 'parameters' => [
46 '+spec_file= +file --Path to the spec file (use \'-\' for standard input)'
47 ],
48 'summary' => 'Generate completion for a specified spec file'
49 },
50 'new' => {
51 'description' => 'This command creates a skeleton for a new app.
52 It will create a directory for your app and write a skeleton
53 spec file.
54  
55 Example:
56  
57 appspec new --name myprogram --class App::MyProgram App-MyProgram
58 ',
59 'op' => 'cmd_new',
60 'options' => [
61 '+name|n=s --The (file) name of the app',
62 '+class|c=s --The main class name for your app implementation',
63 'overwrite|o --Overwrite existing dist directory',
64 'with-subcommands|s --Create an app with subcommands'
65 ],
66 'parameters' => [
67 'path= +dirname --Path to the distribution directory (default is \'Dist-Name\' in current directory)'
68 ],
69 'summary' => 'Create new app'
70 },
71 'pod' => {
72 'description' => 'This command takes a spec file and outputs the generated pod
73 documentation.
74 ',
75 'op' => 'generate_pod',
76 'parameters' => [
77 '+spec_file= +file --Path to the spec file (use \'-\' for standard input)'
78 ],
79 'summary' => 'Generate pod'
80 },
81 'validate' => {
82 'description' => 'This command takes a spec file and validates it against the current
83 L<App::Spec> schema.
84 ',
85 'op' => 'cmd_validate',
86 'options' => [
87 'color|C --output colorized'
88 ],
89 'parameters' => [
90 '+spec_file= +file --Path to the spec file (use \'-\' for standard input)'
91 ],
92 'summary' => 'Validate spec file'
93 }
94 },
95 'title' => 'Utilities for spec files for App::Spec cli apps'
96 };
97 # END INLINE
98  
99 1;