Term::DataMatrix - Generate terminal-based Data Matrix 2D barcodes
require Term::DataMatrix; print Term::DataMatrix->new->plot('Some text here.') . "\n";
Term::DataMatrix generates Data Matrix 2D barcodes on the terminal.
new()
my $dmcode = Term::DataMatrix->new( %options );
Instantiate a new Term::DataMatrix object. Key/value pair arguments may be provided to set up the initial state. The following options are recognized:
KEY DEFAULT ----------- -------------------- black 'on_black' black_text Term::ANSIColor::colored(' ', $black) text_dmcode Barcode::DataMatrix->new white 'on_white' white_text Term::ANSIColor::colored(' ', $white)
What color to make the foreground (black) and the background (white) of the generated barcode. See Term::ANSIColor for recognized colors.
What colored text to use for each of the foreground (black) and background (white) pixels of the generated barcode. Can be used to stretch the barcode width-wise.
What object to use as the barcode's data generator. See Barcode::DataMatrix.
plot($text)
$barcode = $dmcode->plot('blah blah');
Create a Data Matrix barcode text for terminal.
Dan Church <h3xx [a] gmx <d> com>
Term::QRCode https://en.wikipedia.org/wiki/Data_Matrix
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The latest version of this library is likely to be available from CPAN as well as:
https://codeberg.org/h3xx/perl-Term-DataMatrix
To install Term::DataMatrix, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Term::DataMatrix
CPAN shell
perl -MCPAN -e shell install Term::DataMatrix
For more information on module installation, please visit the detailed CPAN module installation guide.