Summary
[2006-03-05-1]を応用し,Refererを用いてQRコード生成.インストール
# aptitude install libexpat-dev libgd2-dev
# cpan install GD
# cpan install GD::Barcode::QRcode
qr.cgi
#!/usr/bin/perl
use strict;
use GD::Barcode::QRcode;
my $str = $ENV{'HTTP_REFERER'};
my $header = qq(Content-Type: image/png\n\n);
my $qr = GD::Barcode::QRcode->new($str,{ ECC => 'L', Version => 2, ModuleSize =>2,})->plot->png;
print $header,$qr;
exit;
各ページに以下の HTML で付加可能.
<img src="path/to/qr.cgi" width="97" height="97" alt="QRcode" />
Reference
GD::Barcode::QRcodenitsujiの日記 - GD::Barcode::QRcodeのバグ?の件について
http://d.hatena.ne.jp/nitsuji/20070626/1182840997