File Coverage

blib/lib/Verilog/VCD/Writer/Symbol.pm
Criterion Covered Total %
statement 1 3 33.3
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 2 4 50.0


line stmt bran cond sub pod time code
1             package Verilog::VCD::Writer::Symbol;
2             $Verilog::VCD::Writer::Symbol::VERSION = '0.001';
3             # ABSTRACT: Signal name to symbol mapper. Private class nothing to see here.
4 1     1   14594 use Math::BaseCalc;
  0            
  0            
5              
6             use MooseX::Singleton;
7            
8              
9              
10              
11              
12             has count => (
13             is => 'rw',
14             isa => 'Int',
15             default => 0,
16             );
17             sub symbol{
18             my $self=shift;
19             my $conv=new Math::BaseCalc(digits=> [
20             '!','"','#','$','%','&',"'",'(',')',
21             '*','+',',','-','.','/',
22             '0','1','2','3','4','5','6','7','8','9',
23             ':',';','<','=','>','?','@',
24             'A','B','C','D','E','F','G','H','I','J','K','L','M',
25             'N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
26             '[','\\',']','^','_','`',
27             'a','b','c','d','e','f','g','h','i','j','k','l','m',
28             'n','o','p','q','r','s','t','u','v','w','x','y','z',
29             '{','|','}','~']);
30             my $rval= $conv->to_base($self->count);
31             $self->count($self->count+1);
32             return $rval;
33             }
34             1
35              
36             __END__