—#!perl
use
5.020;
no
warnings
'experimental::signatures'
;
use
utf8;
use
Getopt::Long;
GetOptions(
'charset|c=s'
=> \
my
$charset
,
);
=head1 NAME
qrencode - qr-encode input
=head1 OPTIONS
charset|c - output charset, allowed are ascii or utf8
=cut
$charset
//=
'utf8'
;
if
( $^O eq
'MSWin32'
) {
Win32::Console::OutputCP(65001);
}
binmode
STDOUT,
':encoding(UTF-8)'
;
qr_code_as_text(
text
=>
$ARGV
[0]
,
charset
=>
$charset
);