Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

What's the exact error message? It might have a little more information on what is happening exactly (or where it is happening).

The "uninitialized value" warning is actually disabled by default, and enabled either with use warnings, or the -w / -W / -X options, or the $^W variable. So maybe there's some config somewhere or another module that changes warnings activation. You can try this in your test version to see if the warnings appear:

{ use warnings 'uninitialized'; $update_or_insert->bind_param(10, $thing_id, SQL_INTEGER); $update_or_insert->bind_param(11, $action, SQL_VARCHAR ); }
If the warning appears, your code had the issue all along, but just didn't tell you about it. In that case, perl just silently replaces your value by either "" or 0 depending on context, so you can do it explicitly to obtain the same result.

You could also try no warnings 'uninitialized'; in your shadow test version, but it's better to fix the warnings than just hide.

Edit: it looks like -X will disable all warnings regardless of whatever else you try to do, so the use warnings; wouldn't have any effect in that case.


In reply to Re: ... something in the environment? by Eily
in thread ... something in the environment? by chexmix

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2024-04-24 16:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found