Health-SHC
view release on metacpan or search on metacpan
"Test::Perl::Critic" : "0",
"Test::Spelling" : "0.17"
}
},
"runtime" : {
"requires" : {
"Barcode::ZBar" : "0",
"Crypt::JWT" : "0",
"File::ShareDir" : "0",
"File::Temp" : "0",
"Image::Magick" : "0",
"JSON::Parse" : "0.59",
"PostScript::Convert" : "0",
"perl" : "5.008"
}
},
"test" : {
"requires" : {
"Test::Exception" : "0"
}
}
file: lib/Health/SHC/Extract.pm
version: '0.006'
Health::SHC::Validate:
file: lib/Health/SHC/Validate.pm
version: '0.006'
requires:
Barcode::ZBar: '0'
Crypt::JWT: '0'
File::ShareDir: '0'
File::Temp: '0'
Image::Magick: '0'
JSON::Parse: '0.59'
PostScript::Convert: '0'
perl: '5.008'
resources:
bugtracker: https://github.com/timlegge/perl-Health-SHC/issues
repository: git://github.com/timlegge/perl-Health-SHC.git
version: '0.006'
x_generated_by_perl: v5.38.2
x_serialization_backend: 'YAML::Tiny version 1.74'
x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later'
Makefile.PL view on Meta::CPAN
},
"DISTNAME" => "Health-SHC",
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.008",
"NAME" => "Health::SHC",
"PREREQ_PM" => {
"Barcode::ZBar" => 0,
"Crypt::JWT" => 0,
"File::ShareDir" => 0,
"File::Temp" => 0,
"Image::Magick" => 0,
"JSON::Parse" => "0.59",
"PostScript::Convert" => 0
},
"TEST_REQUIRES" => {
"Test::Exception" => 0
},
"VERSION" => "0.006",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"Barcode::ZBar" => 0,
"Crypt::JWT" => 0,
"File::ShareDir" => 0,
"File::Temp" => 0,
"Image::Magick" => 0,
"JSON::Parse" => "0.59",
"PostScript::Convert" => 0,
"Test::Exception" => 0
);
unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
delete $WriteMakefileArgs{TEST_REQUIRES};
delete $WriteMakefileArgs{BUILD_REQUIRES};
$WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
# This file is generated by Dist::Zilla::Plugin::CPANFile v6.032
# Do not edit this file directly. To change prereqs, edit the `dist.ini` file.
requires "Barcode::ZBar" => "0";
requires "Crypt::JWT" => "0";
requires "File::ShareDir" => "0";
requires "File::Temp" => "0";
requires "Image::Magick" => "0";
requires "JSON::Parse" => "0.59";
requires "PostScript::Convert" => "0";
requires "perl" => "5.008";
on 'test' => sub {
requires "Test::Exception" => "0";
};
on 'configure' => sub {
requires "ExtUtils::MakeMaker" => "0";
-remove = Readme
-remove = GatherDir
[Prereqs / RuntimeRequires]
perl = 5.008
Crypt::JWT = 0
JSON::Parse = 0.59
File::ShareDir = 0
PostScript::Convert = 0
File::Temp = 0
Image::Magick = 0
Barcode::ZBar = 0
[Prereqs / TestRequires]
Test::Exception = 0
[MetaProvides::Package]
[MetaJSON]
[Pod2Readme]
[CPANFile]
[ManifestSkip]
lib/Health/SHC/Extract.pm view on Meta::CPAN
=cut
=head1 PREREQUISITES
=over
=item * L<PostScript::Convert>
=item * L<File::Temp>
=item * L<Image::Magick>
=item * L<Barcode::ZBar>
=back
=cut
=head1 COPYRIGHT
The following copyright notice applies to all the files provided in
lib/Health/SHC/Extract.pm view on Meta::CPAN
Arguments:
$filename: string filename of a png file.
Returns: ARRAY shc:/ URI from QR code
=cut
sub extract_qr_from_png {
my $self = shift;
my $filename = shift;
require Image::Magick;
require Barcode::ZBar;
# obtain image data
my $magick = Image::Magick->new();
$magick->Read($filename) && die;
my $raw = $magick->ImageToBlob(magick => 'GRAY', depth => 8);
# wrap image data
my $image = Barcode::ZBar::Image->new();
$image->set_format('Y800');
my ($col, $rows) = $magick->Get(qw(columns rows));
$image->set_size($col, $rows);
$image->set_data($raw);
( run in 0.400 second using v1.01-cache-2.11-cpan-beeb90c9504 )