Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: Any module suggestion for URL QRCode rendeing for ActivePerl?

by exilepanda (Friar)
on Aug 04, 2014 at 11:34 UTC ( [id://1096107]=note: print w/replies, xml ) Need Help??


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

I just work it on desktop only, anyway, I tried with this
$|=1; open F, ">R:/Test.txt" or die $!; print F "OK$/"; close F; open F, "R:/Test.txt" or die $!; print <F>; close F; use Imager::QRCode qw(plot_qrcode); my $img = plot_qrcode("blah blah"); $img->write(file => "R:/qrcode.gif") or die $!; # this is line 13
and I got
OK No such file or directory at C:\Documents and Settings\Panda\Desktop\t +est.pl line 13.

Replies are listed 'Best First'.
Re^5: Any module suggestion for URL QRCode rendeing for ActivePerl?
by Corion (Patriarch) on Aug 04, 2014 at 11:36 UTC

    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?

      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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1096107]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-19 07:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found