Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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
Replies are listed 'Best First'.
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 imbibing at the Monastery: (7)
As of 2015-07-08 06:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls