in reply to Re^4: Any module suggestion for URL QRCode rendeing for ActivePerl?
in thread Any module suggestion for URL QRCode rendeing for ActivePerl?

The image you get back is an Imager object, and the documented method for checking if a ->write call was successful is:

$thumb->write(file=>$file) or die $thumb->errstr;

So maybe the $img->errstr method has better information?

Replies are listed 'Best First'.
Re^6: Any module suggestion for URL QRCode rendeing for ActivePerl?
by exilepanda (Friar) on Aug 04, 2014 at 12:08 UTC
    Yes, I got something new now, that said
    'format \'gif\' not supported - formats bmp, ico, pnm, raw, sgi, tga +available for writing - Can\'t locate Imager/File/GIF.pm'
    and this bug was actually reported at https://rt.cpan.org/Public/Bug/Display.html?id=90785

    So I tried to find Imager::File::GIF, nothing from ppm, but cpan. However, when I use cpan, it's ok to download the package file, but fails during install:

    C:\Documents and Settings\Panda>cpan Imager::File::GIF Set up gcc environment - 3.4.5 (mingw-vista special r3) CPAN: Term::ANSIColor loaded ok (v3.00) CPAN: Storable loaded ok (v2.27) Reading 'R:\Programming\Perl\cpan\Metadata' Database was generated on Sun, 03 Aug 2014 12:06:12 GMT Running install for module 'Imager::File::GIF' CPAN: Digest::SHA loaded ok (v5.61) CPAN: Compress::Zlib loaded ok (v2.033) Checksum for R:\Programming\Perl\cpan\sources\authors\id\T\TO\TONYC\Im +ager-File-GIF-0.89.tar.gz ok CPAN: Archive::Tar loaded ok (v1.76) Imager-File-GIF-0.89/ Imager-File-GIF-0.89/imgif.h Imager-File-GIF-0.89/META.yml Imager-File-GIF-0.89/README Imager-File-GIF-0.89/MANIFEST Imager-File-GIF-0.89/imgif.c Imager-File-GIF-0.89/t/ Imager-File-GIF-0.89/t/t30fixed.t Imager-File-GIF-0.89/t/t10gif.t Imager-File-GIF-0.89/t/t20new.t Imager-File-GIF-0.89/t/t40limit.t Imager-File-GIF-0.89/t/t50header.t Imager-File-GIF-0.89/Changes Imager-File-GIF-0.89/Makefile.PL Imager-File-GIF-0.89/GIF.xs Imager-File-GIF-0.89/MANIFEST.SKIP Imager-File-GIF-0.89/GIF.pm Imager-File-GIF-0.89/testimg/ Imager-File-GIF-0.89/testimg/scalei.gif Imager-File-GIF-0.89/testimg/scale.gif Imager-File-GIF-0.89/testimg/screen3.gif Imager-File-GIF-0.89/testimg/bandw.gif Imager-File-GIF-0.89/testimg/trmiddesc.gif Imager-File-GIF-0.89/testimg/trimgdesc.gif Imager-File-GIF-0.89/testimg/loccmap.gif Imager-File-GIF-0.89/testimg/expected.gif Imager-File-GIF-0.89/testimg/zerocomm.gif Imager-File-GIF-0.89/testimg/screen2.gif Imager-File-GIF-0.89/testimg/nocmap.gif Imager-File-GIF-0.89/testimg/badindex.gif Imager-File-GIF-0.89/META.json Imager-File-GIF-0.89/inc/ Imager-File-GIF-0.89/inc/Devel/ Imager-File-GIF-0.89/inc/Devel/CheckLib.pm CPAN: File::Temp loaded ok (v0.22) CPAN: YAML::XS loaded ok (v0.35) CPAN: Parse::CPAN::Meta loaded ok (v1.4401) CPAN: CPAN::Meta loaded ok (v2.110930) CPAN: Module::CoreList loaded ok (v2.49) Configuring T/TO/TONYC/Imager-File-GIF-0.89.tar.gz with Makefile.PL Set up gcc environment - 3.4.5 (mingw-vista special r3) GIF: building independently GIF: main: includes not found - libraries not found GIF: Checking if the compiler can find them on its own Note (probably harmless): No library found for -lgif GIF: Test code failed: Can't link/include 'gif_lib.h', 'stdio.h', 'err +no.h', 'string.h', 'gif' OS unsupported: GIF libraries or headers not found Warning: No success on command[R:\Programming\Perl\bin\perl.exe Makefi +le.PL INSTALLDIRS=site] TONYC/Imager-File-GIF-0.89.tar.gz R:\Programming\Perl\bin\perl.exe Makefile.PL INSTALLDIRS=site -- NOT + OK
    I don't know much about C though... but I guess what I am going to do is try to find those .h files, but where should I put them so I can make the compile success ? or do I need to also find the C source ? Any further workaround you might suggest ?

      The bug report you link to is unrelated to your problem. Your installation of Imager hasn't been built with GIF support, the required libraries are not found on your system. See Imager::Install. I (any many others) find that the pain of woring on Windows is eased a great deal by using Strawberry Perl, rather than ActiveState, since it ships with a more complete development environment and many additional (but frequently used) libraries.

        Thanks man! But no luck for Strawberry either. The MakeFile.pl encounter it's own error.. when I see something like this inside the MakeFile :
        my $libs = qx|$pkgconfig --cflags --libs libqrencode|; .... system("$compile_cmd -o test_libqrencode test_libqrencode.c $libs >/de +v/null 2>&1") == 0
        I am totally hopeless. Anyway, I have found a workaround by using qrencode-win32, there's an console executable.