File Coverage

blib/lib/HTML/Barcode/Code93.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 16 16 100.0


line stmt bran cond sub pod time code
1             package HTML::Barcode::Code93;
2 2     2   52578 use Any::Moose;
  2         73916  
  2         11  
3             extends 'HTML::Barcode::1D';
4 2     2   2736 use Barcode::Code93;
  2         2148  
  2         360  
5              
6             our $VERSION = '0.12';
7              
8             has '_code93' => (
9             is => 'ro',
10             default => sub { Barcode::Code93->new },
11             );
12              
13             sub barcode_data {
14 1     1 1 820 my ($self) = @_;
15 1         11 return $self->_code93->barcode(uc $self->text);
16             }
17              
18             =head1 NAME
19              
20             HTML::Barcode::Code93 - Generate HTML representations of Code 93 barcodes
21              
22             =head1 SYNOPSIS
23              
24             my $code = HTML::Barcode::Code93->new(text => 'MONKEY');
25             print $code->render;
26              
27             =head1 DESCRIPTION
28              
29             This class allows you to easily create HTML representations of Code 93 barcodes.
30              
31             =begin html
32              
33            

Here is an example of a Code 93 barcode rendered with this module:

34              
35            
MONKEY
36              
37             =end html
38              
39             You can read more about Code 93 online (e.g. L).
40              
41             =head1 METHODS
42              
43             =head2 new (%attributes)
44              
45             Instantiate a new HTML::Barcode::Code93 object. The C<%attributes> hash
46             requires the L attribute, and can take any of the other
47             L listed below.
48              
49             =head2 render
50              
51             This is a convenience routine which returns C<< >> tags
52             and the rendered barcode.
53              
54             If you are printing multiple barcodes or want to ensure your C