NAME

SVG::QRCode - Generate SVG based QR Code.

SYNOPSIS

use SVG::QRCode;

my $qrcode = SVG::QRCode->new(
  casesensitive => 0,
  darkcolor     => 'black',
  level         => 'M',
  lightcolor    => 'white',
  margin        => 10,
  size          => 5,
  version       => 0,
);
my $svg  = $qrcode->plot('https://perldoc.pl');
my $svg2 = $qrcode->param(darkcolor => 'red')->plot('https://perldoc.pl');

# export function
use SVG::QRCode 'plot_qrcode';

my $svg = plot_qrcode('https://perldoc.pl', \%params);

DESCRIPTION

SVG::QRCode generates QR Codes as SVG images.

FUNCTIONS

plot_qrcode

use SVG::QRCode 'plot_qrcode';

my $svg = plot_qrcode($text, \%params);

Creates a QR Code using the provided text and parameters.

CONSTRUCTOR

new

$qrcode = SVG::QRCode->new(%params);

Creates a new QR Code plotter. Accepted parameters are:

METHODS

param

my $value = $svg->param($name);
$svg = $svg->param($name, $newvalue);
$svg = $svg->param($name, '');          # set to default

Getter and setter for the parameters.

plot

my $svg = $qrcode->plot($text);

Creates a QR Code.

SEE ALSO

Text::QRCode.

AUTHOR & COPYRIGHT

Copyright (C) 2019, Rolf Stöckli (Tekki).

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.