File Coverage

blib/lib/App/Spec/Option.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition 2 2 100.0
subroutine 5 5 100.0
pod 1 1 100.0
total 24 24 100.0


line stmt bran cond sub pod time code
1             # ABSTRACT: App::Spec objects representing command line option specs
2 5     5   33 use strict;
  5         10  
  5         138  
3 5     5   24 use warnings;
  5         11  
  5         246  
4             package App::Spec::Option;
5              
6             our $VERSION = '0.013'; # VERSION
7              
8 5     5   29 use base 'App::Spec::Argument';
  5         8  
  5         2163  
9 5     5   43 use Moo;
  5         10  
  5         26  
10              
11             has aliases => ( is => 'ro' );
12              
13             sub build {
14 435     435 1 1894 my ($class, %args) = @_;
15 435         1765 my %hash = $class->common(%args);
16             my $self = $class->new({
17 435   100     11870 aliases => $args{aliases} || [],
18             %hash,
19             });
20 435         25131 return $self;
21             }
22              
23             1;
24              
25             =pod
26              
27             =head1 NAME
28              
29             App::Spec::Option - App::Spec objects representing command line option specs
30              
31             =head1 SYNOPSIS
32              
33             This class inherits from L
34              
35             =head1 METHODS
36              
37             =over 4
38              
39             =item build
40              
41             my $option = App::Spec::Option->build(
42             name => 'verbose',
43             summary => 'lala',
44             aliases => ['v'],
45             );
46              
47             =item aliases
48              
49             Attribute which represents the one from the spec.
50              
51             =back
52              
53             =cut