SVG::Barcode::QRCode - Generator for SVG based QR Codes
use SVG::Barcode::QRCode; my $qrcode = SVG::Barcode::QRCode->new; my $svg = $qrcode->plot('https://perldoc.pl'); $qrcode->level; # M $qrcode->dotsize; # 1 $qrcode->version; # 0 # from SVG::Barcode: $qrcode->foreground; # black $qrcode->background; # white $qrcode->margin; # 2 $qrcode->id; $qrcode->class; $qrcode->width; $qrcode->height; my %params = ( level => 'H', margin => 4, ); $qrcode = SVG::Barcode::QRCode->new(%params); # use as function use SVG::Barcode::QRCode 'plot_qrcode'; $svg = plot_qrcode('https://perldoc.pl', %params);
SVG::Barcode::QRCode is a generator for SVG based QR Codes.
use SVG::Barcode::QRCode 'plot_qrcode'; $svg = plot_qrcode($text, %params);
Returns a QR Code using the provided text and parameters.
$qrcode = SVG::Barcode::QRCode->new; # create with defaults $qrcode = SVG::Barcode::QRCode->new(%params);
Creates a new QR Code plotter. Inherited from SVG::Barcode.
$svg = $qrcode->plot($text);
Creates a SVG code. Inherited from SVG::Barcode.
Inherited from SVG::Barcode: background, class, foreground, height, id, margin, width.
$value = $qrcode->dotsize; $qrcode = $qrcode->dotsize($newvalue); $qrcode = $qrcode->dotsize(''); # 1
Getter and setter for the size of the dots. Default 1.
1
$value = $qrcode->level; $qrcode = $qrcode->level($newvalue); $qrcode = $qrcode->level(''); # M
Getter and setter for the error correction level. One of one of L (low), M (medium), Q (quartile), H (high). Default M.
L
M
Q
H
$value = $qrcode->version; $qrcode = $qrcode->version($newvalue); $qrcode = $qrcode->version(''); # 0
Getter and setter for the symbol version. From 1 to 40. 0 will adapt the version to the required capacity. Default 0.
40
0
SVG::Barcode, Text::QRCode.
© 2019 by Tekki (Rolf Stöckli).
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
To install SVG::Barcode::QRCode, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SVG::Barcode::QRCode
CPAN shell
perl -MCPAN -e shell install SVG::Barcode::QRCode
For more information on module installation, please visit the detailed CPAN module installation guide.