Hi,
first time user, long time listener. Came across Par::Packer today and have been testing it to see if we can use it to hide our code in a commercial app. I have read several posts that frown upon this type of use, but that's our aim in any case.
We managed to compile a seciprt which uses the depracted Mysql Perl Module, and requires several other scripts, and managed to execute it with some results. The problem we're having is this :
When run as a regular script, the following code correctly returns 1 row :
$VAR{q} = qq~SELECT * FROM table~;
$VAR{x} = $DBCONN->query($VAR{q});
$VAR{n} = $VAR{x}->numrows;
However, as the exe, it always returns 0. What's baffling is that the following code returns 1 record in both versions :
$VAR{q} = qq~SELECT COUNT(*) FROM table~;
$VAR{x} = $DBCONN->query($VAR{q});
$VAR{n} = $VAR{x}->numrows;
Could it be some sort of Mysql privilege problem?
I search high and low in google, and only found one case of a similar problem, but no solution, here :
http://perlguru.com/gforum.cgi?post=44983;guest=
With any luck, there'll be more potential solutions, than negative comments, provided here.
What else could the problem be?
==========================================
Update
==========================================
Connecting to the wrong database :)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.