Barcode::DataMatrix - Generate data for Data Matrix barcodes
use Barcode::DataMatrix; my $data = Barcode::DataMatrix->new->barcode('MONKEY'); for my $row (@$data) { print for map { $_ ? "#" : ' ' } @$row; print "\n"; }
This class is used to generate data for Data Matrix barcodes. It is primarily useful as a data source for barcode modules that do rendering, such as HTML::Barcode::DataMatrix. You can easily make a version that renders an image, PDF, or anything else.
Instantiate a new Barcode::DataMatrix object. The %attributes hash can take any of the other attributes listed below.
%attributes
Generate barcode data representing the $text string. This returns an array ref of rows in the data matrix, each containing array refs of cells within that row. The cells are true and false values that represent filled or empty squares.
$text
This can throw an exception if it's unable to generate the barcode data.
The encoding mode for the data matrix. Can be one of: AUTO (default), ASCII, C40, TEXT, BASE256, or NONE.
AUTO
ASCII
C40
TEXT
BASE256
NONE
The module size for the data matrix. Can be one of: AUTO (default), 10x10, 12x12, 14x14, 16x16, 18x18, 20x20, 22x22, 24x24, 26x26, 32x32, 36x36, 40x40, 44x44, 48x48, 52x52, 64x64, 72x72, 80x80, 88x88, 96x96, 104x104, 120x120, 132x132, 144x144, 8x18, 8x32, 12x26, 12x36, 16x36, 16x48.
10x10
12x12
14x14
16x16
18x18
20x20
22x22
24x24
26x26
32x32
36x36
40x40
44x44
48x48
52x52
64x64
72x72
80x80
88x88
96x96
104x104
120x120
132x132
144x144
8x18
8x32
12x26
12x36
16x36
16x48
Boolean. Set to true to indicate the tilde character "~" is being used to recognize special characters. See this page for more information: http://www.idautomation.com/datamatrixfaq.html
Mons Anderson <inthrax@gmail.com> (GD::Barcode::DataMatrix at https://github.com/Mons/perl-ex/, from which this distribution originates)
<inthrax@gmail.com>
Mark A. Stratman, <stratman@gmail.com>
<stratman@gmail.com>
Paul Cochrane, https://github.com/paultcochrane
http://github.com/mstratman/Barcode-DataMatrix
Copyright 2015 the AUTHORs listed above.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Barcode::DataMatrix, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Barcode::DataMatrix
CPAN shell
perl -MCPAN -e shell install Barcode::DataMatrix
For more information on module installation, please visit the detailed CPAN module installation guide.