Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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;

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?
[ambrus]: Some of the manual part is unavoidable, but not all.
[choroba]: LanX was there a way to recover the numbers from the remaining information?
[Corion]: LanX: Ow ;)
Discipulus manual work: i just tell the same to my boss: every time the quick solution is to assign some manual data entry task to my group.. because we have not direct access to many databases here..
[LanX]: point is: in high speed trade each bank has to remember what he has to get from the others... so dresdner got billed for losses but couldn't claim gains
Discipulus is this the IT?
[Corion]: Discipulus: Well, in many cases it doesn't make sense to build an interface and complicated program just to enter 20 rows into a database ;) But yes, automating data imports should pay off in the long run
[LanX]: Choroba: this happened before I joined, was still in uni, but my boss was summoned to the CEO of the second biggest German bank at that time and could only say " I told them its not ready" ;)

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2017-03-29 12:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (350 votes). Check out past polls.