EPL2/Command/B.pm

filter: Statementstmt 100% 31 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 100% 38 / 38 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« EPL2.pm ↑ Summary EPL2/Command/N.pm »
1 package EPL2::Command::B;
2 # ABSTRACT: B Command (Bar code)
3 3 $EPL2::Command::B::VERSION = '0.001';
4 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use MooseX::Method::Signatures;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶use EPL2::Types ( 'Natural', 'Rotation', 'Human', 'Barcode', 'Text' );
Subroutine BEGIN: called CC=1 SCAR=0.0
8 3 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 3 extends 'EPL2::Command';
11  
12 #Public Attributes
13 3 has h_pos => ( is => 'rw', isa => Natural, default => 0 );
14 3 has v_pos => ( is => 'rw', isa => Natural, default => 0 );
15 3 has rotation => ( is => 'rw', isa => Rotation, default => 0 );
16 3 has barcode => ( is => 'rw', isa => Barcode, default => 3 );
17 3 has narrow_bar => ( is => 'rw', isa => Natural, default => 3 );
18 3 has wide_bar => ( is => 'rw', isa => Natural, default => 7 );
19 3 has height => ( is => 'rw', isa => Natural, default => 20 );
20 3 has human => ( is => 'rw', isa => Human, default => 'N' );
21 3 has text => ( is => 'ro', isa => Text, required => 1 );
22  
23 #Methods
24 3 ▶method string ( Str :$delimiter = "\n" ) {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
25 1 sprintf 'B%d,%d,%d,%s,%d,%d,%d,%s,%s%s',
26 $self->h_pos, $self->v_pos, $self->rotation, $self->barcode, $self->narrow_bar,
27 $self->wide_bar, $self->height, $self->human, $self->text, $delimiter;
28 3 }
29  
30 3 __PACKAGE__->meta->make_immutable;
31  
32 3 1;
33  
34 __END__
« EPL2.pm ↑ Summary EPL2/Command/N.pm »