File Coverage

blib/lib/EPL2/Command/qq.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 21 21 100.0


line stmt bran cond sub pod time code
1             package EPL2::Command::qq;
2             # ABSTRACT: q Command (Set Label Width)
3             $EPL2::Command::qq::VERSION = '0.001';
4 3     3   465 use 5.010;
  3         7  
5 3     3   463 use Moose;
  3         279188  
  3         15  
6 3     3   12685 use MooseX::Method::Signatures;
  3         852445  
  3         17  
7 3     3   387 use namespace::autoclean;
  3         5  
  3         21  
8 3     3   532 use EPL2::Types 'Padwidth';
  3         5  
  3         16  
9              
10             extends 'EPL2::Command';
11              
12             has width => ( is => 'rw', isa => Padwidth, default => 0, );
13              
14             #Methods
15 3     3   278877 method string ( Str :$delimiter = "\n" ) { sprintf 'q%d%s', $self->width, $delimiter; }
16              
17             __PACKAGE__->meta->make_immutable;
18              
19             1;
20              
21             __END__
22              
23             =pod
24              
25             =encoding UTF-8
26              
27             =head1 NAME
28              
29             EPL2::Command::qq - q Command (Set Label Width)
30              
31             =head1 VERSION
32              
33             version 0.001
34              
35             =head1 SYNOPSIS
36              
37             my $qq = EPL2::Command::qq->new( width => 800 );
38             say $qq->string;
39              
40             =head1 ATTRIBUTES
41              
42             =head2 width ( default = 0 )
43              
44             Describe width of a Label.
45              
46             =head1 METHODS
47              
48             =head2 string
49              
50             param: ( delimiter => "\n" )
51              
52             Return an EPL2 formatted string used for setting label width.
53              
54             =head1 SEE ALSO
55              
56             L<EPL2>
57              
58             L<EPL2::Types>
59              
60             =head1 AUTHOR
61              
62             Ted Katseres <tedkat@cpan.org>
63              
64             =head1 COPYRIGHT AND LICENSE
65              
66             This software is copyright (c) 2016 by Ted Katseres.
67              
68             This is free software; you can redistribute it and/or modify it under
69             the same terms as the Perl 5 programming language system itself.
70              
71             =cut