Catalyst::View::GD::Barcode::QRcode - GD::Barcode::QRcode View Class
Create a View class using the helper
script/myapp_create.pl view QRcode GD::Barcode::QRcode
Configure variables in your application class
package MyApp; MyApp->config( 'View::QRcode' => { ecc => 'M', version => 4, module_size => 1, img_type => 'png' }, );
Or using YAML config file
View::QRcode: ecc: 'M' version: 4 module_size: 1 img_type: 'png'
Add qrcode action to forward to the View on MyApp::Controller::Root
sub qrcode : Local { my ( $self, $c ) = @_; $c->stash->{qrcode} = 'http://www.cpan.org'; $c->forward( $c->view( 'QRcode' ) ); }
Or change configuration dynamically
sub qrcode : Local { my ( $self, $c ) = @_; $c->stash( qrcode => 'http://www.cpan.org', qrcode_conf => { ecc => 'Q', version => 5, module_size => 3, img_type => 'gif', }, ); $c->forward( $c->view( 'QRcode' ) ); }
Catalyst::View::GD::Barcode::QRcode is the Catalyst view class for GD::Barcode::QRcode, create QRcode barcode image with GD.
ECC mode. Select 'M', 'L', 'H' or 'Q' (Default = 'M').
Version ie. size of barcode image (Default = 4).
Size of modules (barcode unit) (Default = 1).
Type of barcode image (Default = 'png').
Hideo Kimura <<hide@hide-k.net>>
<<hide@hide-k.net>>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
To install Catalyst::View::GD::Barcode::QRcode, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::View::GD::Barcode::QRcode
CPAN shell
perl -MCPAN -e shell install Catalyst::View::GD::Barcode::QRcode
For more information on module installation, please visit the detailed CPAN module installation guide.