From 81a380987d4f92fe85c3eab4ec94618163494632 Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 10 Nov 2016 14:51:29 +0000 Subject: docs & critic fixes --- lib/Data/QRCode/Input.pm | 55 +++++++++++++++++++++++++++++++++++++++++++++++ lib/Data/QRCode/Result.pm | 25 +++++++++++++++++++++ lib/Data/QRCode/Types.pm | 2 ++ 3 files changed, 82 insertions(+) (limited to 'lib/Data/QRCode') diff --git a/lib/Data/QRCode/Input.pm b/lib/Data/QRCode/Input.pm index 69fd283..937474c 100644 --- a/lib/Data/QRCode/Input.pm +++ b/lib/Data/QRCode/Input.pm @@ -10,6 +10,20 @@ use Data::QRCode::Input::Inline C => ( typemaps => 'typemap', ); +=head1 SYNOPSIS + + use Data::QRCode::Input; + + my $input = Data::QRCode::Input->new(); + + $input->version(3); + $input->error_correction_level(Data::QRCode::Input::ECLEVEL_M); + $input->append(Data::QRCode::Input::MODE_8, 'some data'), + +=method C + +=cut + sub new { my ($class) = @_; @@ -18,6 +32,10 @@ sub new { return $self; } +=attr C + +=cut + sub version { my $self = shift; if (@_) { @@ -28,6 +46,10 @@ sub version { } } +=attr C + +=cut + sub error_correction_level { my $self = shift; if (@_) { @@ -38,6 +60,39 @@ sub error_correction_level { } } +=head2 CONSTANTS + +=head3 Error Correction Level + +=for :list += C += C += C += C + +=head3 Data Mode + +=for :list += C += C += C += C += C += C += C += C + +=method C + +=for Pod::Coverage +QRinput_getVersion +QRinput_setVersion +QRinput_getErrorCorrectionLevel +QRinput_setErrorCorrectionLevel +QRinput_new + +=cut + 1; __DATA__ diff --git a/lib/Data/QRCode/Result.pm b/lib/Data/QRCode/Result.pm index 10c79d0..9821868 100644 --- a/lib/Data/QRCode/Result.pm +++ b/lib/Data/QRCode/Result.pm @@ -10,6 +10,18 @@ use Data::QRCode::Result::Inline C => ( typemaps => 'typemap', ); +=head1 SYNOPSIS + + use Data::QRCode::Result; + + my $qr = Data::QRCode::Result->new(build_a_qrcode_input()); + + print $qr->data_at(1,1); + +=method C + +=cut + sub new { my ($class, $input) = @_; my $self = QRcode_encodeInput($input); @@ -32,6 +44,10 @@ sub _data_hash { }; } +=method C + +=cut + sub data_at { my ($self,$x,$y) = @_; my $width = $self->width; @@ -41,6 +57,15 @@ sub data_at { return _data_hash($self->_data_at($x,$y)); } +=method C + +=method C + +=for Pod::Coverage +QRcode_encodeInput + +=cut + 1; __DATA__ diff --git a/lib/Data/QRCode/Types.pm b/lib/Data/QRCode/Types.pm index ac711e2..f0cfbcb 100644 --- a/lib/Data/QRCode/Types.pm +++ b/lib/Data/QRCode/Types.pm @@ -8,6 +8,8 @@ use Type::Utils -all; use Types::Standard qw(Int Str); use Data::QRCode::Input; use Carp; +# ABSTRACT: types +# VERSION my %letter_for_ec = ( Data::QRCode::Input::ECLEVEL_L() => 'L', -- cgit v1.2.3