Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Cannot install ExifTool because of strict hashpairs #422

Open
jiucenglou opened this issue Aug 27, 2020 · 2 comments
Open

Cannot install ExifTool because of strict hashpairs #422

jiucenglou opened this issue Aug 27, 2020 · 2 comments

Comments

@jiucenglou
Copy link

jiucenglou commented Aug 27, 2020

Attempt to install ExifTool to CPerl failed due to strict hashpairs. Because the existing post of fixes does not list ExifTool, could you suggest how to fix ? Many thanks !

$ sudo cpan5.30.0 App::cpanminus
$ head -n 1 `which cpanm`
#!/usr/local/bin/cperl5.30.0
$ sudo cpanm  Image::ExifTool

The error is

Only pair in map hash assignment allowed while "strict hashpairs", got 4 elements at /home/test/.cpanm/work/1598527653.7099/Image-ExifTool-12.00/blib/lib/Image/ExifTool/Validate.pm line 154.
Compilation failed in require at /home/test/.cpanm/work/1598527653.7099/Image-ExifTool-12.00/blib/lib/Image/ExifTool.pm line 2165.
t/ExifTool.t .......
Dubious, test returned 255 (wstat 65280, 0xff00)

The corresponding line in Validate.pm

153 # generate lookup for any IFD
154 my %stdFormatAnyIFD = map { %{$stdFormat{$_}} } keys %stdFormat;
155
@rurban
Copy link
Member

rurban commented Aug 27, 2020

This module does not confirm to the strict rules of cperl or perl6.
Add a no strict to it's scope before line 2165.

Just from looking at it, it looks extremely fishy, not to say wrong.

@jiucenglou
Copy link
Author

ExifTools can be installed to CPerl after no strict "hashpairs" is added immediately after use strict in Validate.pm.
Furthermore, perlcc runs fine towards a hello-world script that uses ExifTools installed.

Many thanks for your great work and kind help !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants