GD::Ba...:QRcode(3pm)
β¨ GD::Barcode::QRcode β¨
okay bestie, gather round, because this is the GD::Barcode::QRcode manual page β it's a lil Perl module (a 3pm one, if you're keeping track) and it literally makes QR code barcode images with GD. yes. actual QR codes. you're gonna eat this up π
πΈ NAME πΈ
GD::Barcode::QRcode β Create QRcode barcode images with GD
no cap, that's the whole job description. it makes QR code barcode images, and it does it with GD. π
π SYNOPSIS π
here's the vibe, ex. CGI:
use GD::Barcode::QRcode;
binmode(STDOUT);
print "Content-Type: image/png\n\n";
print GD::Barcode::QRcode->new('1234567')->plot->png;
and with UnitSize, ECC settings, because we do love options:
my $oGdBar = GD::Barcode::QRcode->new('123456789',
{ Ecc => 'L', Version=>2, ModuleSize => 20}
);
look at that. one-liner to a PNG in the first one, and full control in the second. iconic behavior fr fr β¨
π DESCRIPTION π
GD::Barcode::QRcode is a subclass of GD::Barcode and allows you to create QRcode barcode images with GD. it's giving inheritance, it's giving reusability, it's giving slay. π¦
also important, and I'm quoting this exactly because it's the origin story: this module based on "QRcode image CGI version 0.50 (C)2000-2002,Y.Swetake".
so yeah, shoutout to Y.Swetake, the blueprint π
π«Ά new
$oGdBar = GD::Barcode::QRcode->new($sTxt,
{ Ecc => Ecc Mode,
Version => Version,
ModuleSize => Size of 1 module,
});
Constructor. Creates a GD::Barcode::QRcode object for $sTxt. this is the moment where your text becomes a whole object. main character energy tbh.
Parameters:
Eccβ Ecc mode. select'M','L','H'or'Q'(Default ='M'). pick your error-correction energy, bestie.Versionβ Version ie. size of barcode image (Default = auto select). so you can pick the size, or you can just let it choose for you. no thoughts, head empty, auto select πModuleSizeβ Size of modules (barcode unit) (Default = 1).
β¨ plot()
$oGd = $oGdBar->plot([Height => $iHeight, NoText => 0 | 1]);
creates GD object with barcode image for the $sTxt specified at new method. $iHeight is height of the image. If NoText is 1, the image has no text image of $sTxt.
ex.:
my $oGdB = GD::Barcode::QRcode->new('1234567');
my $oGD = $oGdB->plot();
# $sGD is a GD image with Height=>20 pixels, with no text.
boom. GD object. ready to .png your way into greatness π₯
π barcode()
$sPtn = $oGdBar->barcode();
returns a barcode pattern in string with '1' and '0'. '1' means black, '0' means white. so it's literally the whole barcode as a string of ones and zeroes. the way that this is just binary and also art?? π
ex.:
my $oGdB = GD::Barcode::QRcode->new('1234567');
my $sPtn = $oGdB->barcode();
π $errStr
$GD::Barcode::QRcode::errStr
has error message. if something goes sideways, check here β she will tell you what's wrong π«Ά
π $text
$oGdBar->{$text}
has barcode text based on $sTxt specified in new method.
heads up bestie: that's ->{$text} with the variable inside the braces β it's an attribute access, not a typo, and it is not a method call. don't @ me, that's just how it's written. π
π AUTHOR π
Kawai Takanori GCD00051@nifty.ne.jp
thank you for your service π«‘π
π COPYRIGHT π
The GD::Barocde::QRcode module is Copyright (c) 2003 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.
(yes, the module name is spelled GD::Barocde::QRcode right there in the copyright line β I said what I said, I copied it exactly, it's part of the lore ππ)
π SEE ALSO π
GD::Barcode
go check out the parent class, she raised this one right β¨
and that's the whole page, bestie! this one's from perl v5.40.1, dated 2025-10-27, under the title GD::Barcode::QRcode(3pm). now go make some QR codes, you absolute icon ππ
πΈ
π¦ 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