GD::Ba...ATA2of5(3pm)
π GD::Barcode::IATA2of5 π
okay bestie, so this is the GD::Barcode::IATA2of5 page from the User Contributed Perl Documentation section (man page name GD::Ba...ATA2of5(3pm), yes the ellipsis is doing the most but that's just how it's titled π
). Sit down, grab a strawberry drink π, and let's get into it.
β¨ NAME β¨
GD::Barcode::IATA2of5 β it makes IATA2of5 barcode images with GD. That's the whole vibe. π
π SYNOPSIS π
ex. CGI
like, streaming a barcode straight out to the browser, main character energy:
use GD::Barcode::IATA2of5;
binmode(STDOUT);
print "Content-Type: image/png\n\n";
print GD::Barcode::IATA2of5->new('1234567890')->plot->png;
with Error Check
aka doing it responsibly, we love a careful queen π«Ά:
my $oGdBar = GD::Barcode::IATA2of5->new('A12345678');
die $GD::Barcode::IATA2of5::errStr unless($oGdBar); #Invalid Characters
$oGdBar->plot->png;
π¦ DESCRIPTION π¦
GD::Barcode::IATA2of5 is a subclass of GD::Barcode, and what it does is literally let you create IATA2of5 barcode images using GD. iconic. π
πΈ new πΈ
$oGdBar = GD::Barcode::IATA2of5->new($sTxt);
This is the constructor, bb. It creates a GD::Barcode::IATA2of5 object for $sTxt. And heads up β $sTxt takes numeric characters ([0-9]). That's it. That's the deal.
π« 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 the height of the image, periodt. And if NoText is 1, the image comes with no text image of $sTxt. no notes, just vibes.
ex.
my $oGdB = GD::Barcode::IATA2of5->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 in string with '1' and '0'. '1' means black, '0' means white. simple as that, iykyk.
ex.
my $oGdB = GD::Barcode::IATA2of5->new('12345678');
my $sPtn = $oGdB->barcode();
π $errStr π
$GD::Barcode::IATA2of5::errStr
has error message. that's your little alarm bell bestie, it's giving "something went wrong" π
π $text π
$oGdBar->{$text}
has barcode text based on $sTxt specified in the new method. β¨
π AUTHOR π
Kawai Takanori GCD00051@nifty.ne.jp
π COPYRIGHT π
The GD::Barocde::IATA2of5 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
okay that's the whole page, tysm for reading π«Ά
and finally, the sign-off: this lil doc is from perl v5.40.1, dated 2025-10-27, and lives in the GD::Ba...ATA2of5(3pm) corner of the manual. slay, go make some barcodes π
β¨π
π¦ where this page comes from
- ubuntu resolute: libgd-barcode-perl 2.02-1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu stonking: libgd-barcode-perl 2.02-1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms