Barcod...aMatrix(3pm)

πŸ“¦
version 0.10 Β· 2 versions
  • 0.10 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.10 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 ✨

three icons, one barcode library. 🫢


✨ SOURCE REPOSITORY ✨

<http://github.com/mstratman/Barcode-DataMatrix>

go star it or whatever ⭐


✨ SEE ALSO ✨


Copyright 2015 the AUTHORs listed above.

This program is free software; you can redistribute it and/or modify it under the terms of either:

  1. the GNU General Public License as published by the Free Software Foundation; or
  2. 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