The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Term::DataMatrix - Generate terminal-based Data Matrix 2D barcodes

SYNOPSIS

    require Term::DataMatrix;

    print Term::DataMatrix->new->plot('Some text here.') . "\n";

DESCRIPTION

Term::DataMatrix generates Data Matrix 2D barcodes on the terminal.

METHODS

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)
black, white

What color to make the foreground (black) and the background (white) of the generated barcode. See Term::ANSIColor for recognized colors.

black_text, white_text

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.

text_dmcode

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.

AUTHOR

Dan Church <h3xx [a] gmx <d> com>

SEE ALSO

Term::QRCode https://en.wikipedia.org/wiki/Data_Matrix

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AVAILABILITY

The latest version of this library is likely to be available from CPAN as well as:

https://codeberg.org/h3xx/perl-Term-DataMatrix