Barcod...aMatrix(3pm)
π Barcode::DataMatrix β the perl manual, but make it cute π
okay so bestie, welcome to Barcode::DataMatrix(3pm) β the user-contributed perl documentation page that's about to teach you how to generate data for Data Matrix barcodes. yes, those lil square QR-adjacent grids. we're doing this. π
β¨ NAME β¨
Barcode::DataMatrix β Generate data for Data Matrix barcodes π¦
β¨ SYNOPSIS β¨
like, here's the whole vibe in one go:
use Barcode::DataMatrix;
my $data = Barcode::DataMatrix->new->barcode('MONKEY');
for my $row (@$data) {
print for map { $_ ? "#" : ' ' } @$row;
print "\n";
}
that's it. that's the whole thing. MONKEY goes in, a whole grid of truthy/falsy cells comes out, and you print # or a space per cell. slay. π
β¨ DESCRIPTION β¨
so this class? it's the data-source girlie. it generates data for Data Matrix barcodes β that's the whole job. it does not render anything itself, and honestly that's the point: it's primarily useful as a data source for barcode modules that do the rendering, like HTML::Barcode::DataMatrix. and if you want something that spits out an image, a PDF, or literally anything else? you can easily make a version of that yourself. main character energy: you decide the output. π
β¨ METHODS β¨
new (%attributes)
Instantiate a brand-new Barcode::DataMatrix object, fresh out the box. β¨
the %attributes hash can take any of the other attributes listed below β so yeah, you can set your faves right at construction time. iykyk.
barcode ($text)
Generate barcode data representing the $text string. π
what you get back is an array ref of rows in the data matrix, and each of those rows contains array refs of cells within that row. the cells are true and false values β true = filled square, false = empty square. it's giving checkerboard but make it scannable. π¦
heads up bestie: this can throw an exception if it's unable to generate the barcode data. so wrap it, or at least don't be shocked. π
β¨ ATTRIBUTES β¨
encoding_mode
The encoding mode for the data matrix. Can be one of:
"AUTO"(default) β the no-thoughts-just-vibes option"ASCII""C40""TEXT""BASE256""NONE"
size
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"
(not me listing every single one because we do NOT skip options on this page. every size stays. periodt. π)
process_tilde
Boolean. π Set it to true to indicate the tilde character "~" is being used to recognize special characters. for more info, go look at this page:
<http://www.idautomation.com/datamatrixfaq.html>
β¨ AUTHORS β¨
- Mons Anderson
"<inthrax@gmail.com>"β (GD::Barcode::DataMatrixat<https://github.com/Mons/perl-ex/>, from which this distribution originates) - Mark A. Stratman,
"<stratman@gmail.com>" - Paul Cochrane,
<https://github.com/paultcochrane>
three icons, one barcode library. π«Ά
β¨ SOURCE REPOSITORY β¨
<http://github.com/mstratman/Barcode-DataMatrix>
go star it or whatever β
β¨ SEE ALSO β¨
HTML::Barcode::DataMatrix<http://grandzebu.net/informatique/codbar-en/datamatrix.htm><http://www.idautomation.com/datamatrixfaq.html>
β¨ LICENSE AND COPYRIGHT β¨
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.
π also, real talk, the "Barcod...aMatrix" in the header and footer is not a typo i made β that's just how the page name gets truncated. we keep it cute anyway.
and that's a wrap, bestie!! πβ¨ this page came to you from perl v5.34.0, dated 2022-06-08, and you absolutely ate reading the whole thing. go generate some barcodes. no cap. ππ¦πΈ
π¦ where this page comes from
- debian bookworm: libbarcode-datamatrix-perl 0.10-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libbarcode-datamatrix-perl 0.10-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libbarcode-datamatrix-perl 0.10-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libbarcode-datamatrix-perl 0.10-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libbarcode-datamatrix-perl 0.10-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms