Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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;

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://940991]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2018-03-24 16:49 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (299 votes). Check out past polls.