Beefy Boxes and Bandwidth Generously Provided by pair Networks BBQ
Perl Monk, Perl Meditation
 
PerlMonks  

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
Re^5: DBI Placeholders and DB2 Integers
by acka.au (Novice) on Apr 12, 2012 at 06:10 UTC

    SUCCESS!

    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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2014-04-19 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (478 votes), past polls