Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: barcode renders from script, but not executable

by Khen1950fx (Canon)
on Dec 01, 2011 at 02:05 UTC ( #940991=note: print w/ replies, xml ) Need Help??


in reply to barcode renders from script, but not executable

I'm not quite sure what you mean by "bare code"; however, I think that you were missing a few critical parts. Try this:

#!/usr/bin/perl use strict; use warnings; use GD::Barcode::QRcode; my $oGdBar = GD::Barcode::QRcode->new( 'QRcode', { Ecc => 'M', Version => 6, ModuleSize => 2, } ); print "PTN:", $oGdBar->{text}, ":", $oGdBar->barcode, "\n"; open OUT, '>', 'QRcode.png' or die $!; binmode OUT; print OUT $oGdBar->plot->png; close OUT; open OUT, '>', 'QRcode.txt'; print OUT $oGdBar->barcode(); close OUT; undef $oGdBar;


Comment on Re: barcode renders from script, but not executable
Download Code
Re^2: barcode renders from script, but not executable
by cloned (Novice) on Dec 01, 2011 at 16:34 UTC

    copy and pasted your code. Works perfectly as a perl script, same as mine. But, when I make it an executable with perlapp it will only render a blank (bare) QR code. So making it an executable breaks the rendering of the actual barcode data. If I knew how to upload a .png I could show you what I mean.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2014-09-17 19:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (97 votes), past polls