Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^4: DBI Placeholders and DB2 Integers

by Eliya (Vicar)
on Apr 12, 2012 at 03:59 UTC ( #964692=note: print w/ replies, xml ) Need Help??

in reply to Re^3: DBI Placeholders and DB2 Integers
in thread DBI Placeholders and DB2 Integers

However I notice that the Math::Base36 module uses BigInts...

In this case, it's probably easiest to ->numify them, which is a method provided by the Math::BigInt module.  In other words, there's no need to load any other module.  Your numbers already are objects of type Math::BigInt, so you can simply say $doc_len->numify, etc.

(Don't use ->as_int instead (as mentioned in the docs), because this method wouldn't remove the Math::BigInt type...)

Comment on Re^4: DBI Placeholders and DB2 Integers
Select or Download Code
Replies are listed 'Best First'.
Re^5: DBI Placeholders and DB2 Integers
by (Novice) on Apr 12, 2012 at 06:10 UTC


    What I have done is 'decode' the base 36 string into a string of regular base 10 numbers and then split this into its component parts. (Previously I was splitting the base 36 string and then decoding each component directly to a numeric variable).

    The result is that the numeric variables get initialised as regular integers and the DBI module is then happy to use them with the prepared place holders.

    Many thanks Eliya, et al, as this had been driving me nuts for about a day and a half. Guess I should have checked with The Monks earlier! :-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://964692]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2015-11-28 01:05 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (736 votes), past polls