Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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...)

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]
[Discipulus]: yes erix when you specify a Tk geometry 10x10 it goes from 0,0 to 10,10 aka 11x11

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2018-04-24 09:04 GMT
Find Nodes?
    Voting Booth?