NAME
Catalyst::View::GD::Barcode::QRcode - GD::Barcode::QRcode View Class
SYNOPSIS
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'
Forward to the View
sub default : Private {
my ( $self, $c ) = @_;
$c->stash( qrcode => 'http://www.cpan.org' );
$c->forward( $c->view( 'View::QRcode' ) );
}
Or change configuration dynamically
sub dufault : Private {
my ( $self, $c ) = @_;
$c->stash( qrcode => 'http://www.cpan.org' );
$c->stash( qrcode_conf => {
ecc => 'Q',
version => 5,
module_size => 3,
img_type => 'gif',
};
$c->forward( $c->view( 'View::QRcode' ) );
}
If you use 'Catalyst::Plugin::DefaultEnd', in your application class
sub end : Private {
my ( $self, $c ) = @_;
$c->forward( $c->view( 'View::QRCode' ) ) if $c->stash->{qrcode};
$self->NEXT::end( $c );
}
DESCRIPTION
Catalyst::View::GD::Barcode::QRcode is the Catalyst view class for GD::Barcode::QRcode, create QRcode barcode image with GD.
CONFIG VARIABLES
- ecc
-
ECC mode. Select 'M', 'L', 'H' or 'Q' (Default = 'M').
- version
-
Version ie. size of barcode image (Default = 4).
- module_size
-
Size of modules (barcode unit) (Default = 1).
- img_type
-
Type of barcode image (Default = 'png').
AUTHOR
Hideo Kimura <<hide@hide-k.net>>
LICENSE
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.
SEE ALSO
Catalyst, GD::Barcode::QRcode.