App-QRCodeUtils
view release on metacpan or search on metacpan
This function is not exported.
Arguments ('*' denotes required arguments):
* filename => *filename*
If unspecified, will save to a temporary filename and show it with
Desktop::Open.
* format => *str* (default: "png")
(No description)
* level => *str* (default: "M")
Error correction level.
* text* => *str*
(No description)
lib/App/QRCodeUtils.pm view on Meta::CPAN
schema => 'filename*',
pos => 1,
description => <<'MARKDOWN',
If unspecified, will save to a temporary filename and show it with
<pm:Desktop::Open>.
MARKDOWN
},
format => {
schema => ['str*', in=>[qw/png html txt/]],
default => 'png',
},
level => {
summary => 'Error correction level',
schema => ['str*', in=>['L', 'M', 'Q', 'H']],
default => 'M',
},
},
examples => [
],
};
sub gen_qrcode {
require QRCode::Any;
my %args = @_;
my $format = $args{format} // 'png';
my $filename = $args{filename};
unless (defined $filename) {
require File::Temp;
(undef, $filename) = File::Temp::tempfile("qrcodeXXXXXXXXX", TMPDIR=>1, SUFFIX=>".$format");
}
my $res = QRCode::Any::encode_qrcode(
format => $format,
text => $args{text},
lib/App/QRCodeUtils.pm view on Meta::CPAN
Arguments ('*' denotes required arguments):
=over 4
=item * B<filename> => I<filename>
If unspecified, will save to a temporary filename and show it with
L<Desktop::Open>.
=item * B<format> => I<str> (default: "png")
(No description)
=item * B<level> => I<str> (default: "M")
Error correction level.
=item * B<text>* => I<str>
(No description)
script/gen-qrcode view on Meta::CPAN
If unspecified, will save to a temporary filename and show it with
L<Desktop::Open>.
Can also be specified as the 2nd command-line argument.
=item B<--format-arg>=I<s>
Default value:
"png"
Valid values:
["png","html","txt"]
=item B<--level>=I<s>
Error correction level.
Default value:
"M"
Valid values:
( run in 0.962 second using v1.01-cache-2.11-cpan-df04353d9ac )