SVG::Barcode::QRCode - Generator for SVG based QR Codes
use SVG::Barcode::QRCode; my %params = ( background => 'white', foreground => 'black', level => 'M', margin => 10, size => 5, version => 0, ); my $qrcode = SVG::Barcode::QRCode->new(\%params); my $svg = $qrcode->plot('https://perldoc.pl'); my $svg2 = $qrcode->param(foreground => 'red')->plot('https://perldoc.pl'); # use as function use SVG::Barcode::QRCode 'plot_qrcode'; my $svg = plot_qrcode('https://perldoc.pl', \%params);
SVG::Barcode::QRCode is a generator for SVG based QR Codes.
use SVG::Barcode::QRCode 'plot_qrcode'; my $svg = plot_qrcode($text, \%params);
Returns a QR Code using the provided text and parameters.
$qrcode = SVG::Barcode::QRCode->new(\%params); $qrcode = SVG::Barcode::QRCode->new; # create with defaults
Creates a new QR Code plotter. Inherited from "new" in SVG::Barcode.
Accepted parameters are:
Color of the background. Default 'white'.
'white'
Color of the dots. Default 'black'.
'black'
Error correction level, one of 'L' (low), 'M' (medium), 'Q' (quartile), 'H' (high). Default 'M'.
'L'
'M'
'Q'
'H'
Margin around the code. Default 10.
10
Size of the dots. Default 5.
5
Symbol version from 1 to 40. 0 will adapt the version to the required capacity. Default 0.
1
40
0
Getter and setter for the parameters. Inherited from "param" in SVG::Barcode.
Creates a SVG code. Inherited from "plot" in SVG::Barcode.
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.