GD::Ba...ial2of5(3pm)

πŸ’– NAME πŸ’–

okay so bestie, welcome to GD::Barcode::Industrial2of5 β€” it's the iconic little module that creates Industrial2of5 barcode images using GD. yes. that's the whole gig. she's niche, she's specific, she slays πŸŽ€


✨ SYNOPSIS ✨

like, ex. CGI first, because we're fancy:

use GD::Barcode::Industrial2of5;
binmode(STDOUT);
print "Content-Type: image/png\n\n";
print GD::Barcode::Industrial2of5->new('1234567890')->plot->png;

and now with Error Check, because we do not do unhandled failure in this house πŸ’…:

my $oGdBar = GD::Barcode::Industrial2of5->new('A12345678');
die $GD::Barcode::Industrial2of5::errStr unless($oGdBar);     #Invalid Characters
$oGdBar->plot->png;

🌈 DESCRIPTION 🌈

GD::Barcode::Industrial2of5 is a subclass of GD::Barcode, and what that means for you, bestie, is that it lets you create Industrial2of5 barcode images with GD. no cap. that's the vibe. ✨

πŸ’« new

$oGdBar = GD::Barcode::Industrial2of5->new($sTxt);

the constructor, obviously 🫢 she makes a GD::Barcode::Industrial2of5 object for $sTxt. and heads up β€” $sTxt takes numeric characters only ([0-9]). that's it. that's the whole range. periodt.

πŸ¦‹ plot()

$oGd = $oGdBar->plot([Height => $iHeight, NoText => 0 | 1]);

this one creates a GD object with the barcode image for the $sTxt you specified back at the new method. $iHeight is, you guessed it, the height of the image. and if NoText is 1? the image has no text image of $sTxt. literally no words. silent. mysterious. πŸ’€

ex. for the girlies who like numbers:

my $oGdB = GD::Barcode::Industrial2of5->new('12345678');
my $oGD = $oGdB->plot(NoText=>1, Height => 20);
# $sGD is a GD image with Height=>20 pixels, with no text.

🌸 barcode()

$sPtn = $oGdBar->barcode();

returns a barcode pattern as a string made of '1' and '0'. '1' means black, '0' means white. iconic encoding behavior, iykyk 🌈

ex.:

my $oGdB = GD::Barcode::Industrial2of5->new('12345678');
my $sPtn = $oGdB->barcode();

πŸŽ€ $errStr

$GD::Barcode::Industrial2of5::errStr

she has the error message. that's it, that's her whole job πŸ’–

πŸ‘‘ $text

$oGdBar->{$text}

has the barcode text, based on the $sTxt you specified in the new method. main character data, fr fr.


🌟 AUTHOR 🌟

Kawai Takanori GCD00051@nifty.ne.jp


The GD::Barocde::Industrial2of5 module is Copyright (c) 2000 Kawai Takanori. Japan. All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.


πŸ“ SEE ALSO πŸ“

  • GD::Barcode

and that's a wrap bestie 🧚 this whole thing came to you via perl v5.40.1 and it's dated 2025-10-27 β€” go forth and generate barcodes, you absolute legend πŸ’…βœ¨

πŸ“¦ where this page comes from