For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > July 2004 > Changing the return value of a built in function









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Changing the return value of a built in function
Jason Corbett

2004-07-28, 8:56 pm

Hello all. I am running into a problem with a proprietary job scheduler that mimicks the Cron on a Unix box (with more bells and whistles that a cow farm, but with the same amout of BS!!!!).

I ran a script using DBI->trace(2, 'dbitrace.log'); and noticed that the $sth->execute( ); function is returning a value of 6. Question: Can I change this in my script to return any value once the SQL script is done? If not, is there a way to trick the re
turn value i.e. store it somewhere and if its "6" then return "success" or something?


thanks



[snitpet of the log file from trace]

fbh 124: 'BAN_UTC_UC_AMT' NULLable, otype 2-> 5, dbsize 22/40, p9.s2
out: ftype 5, bufl 41. indp 0, rlen 0, rcode 0
fbh 125: 'BAN_UTC_TAX_AMT' NULLable, otype 2-> 5, dbsize 22/40, p9.s2
out: ftype 5, bufl 41. indp 0, rlen 0, rcode 0
fbh 126: 'BAN_UTC_ADJ_AMT' NULLable, otype 2-> 5, dbsize 22/40, p9.s2

<- prepare= DBI::st=HASH(0x4032a6c8) at 4dayreport.pl line 150
-> execute for DBD::Oracle::st (DBI::st=HASH(0x4032a6c8)~0x40329164)
dbd_st_execute (for sql f4 after oci f8, out0)...
dbd_st_execute complete (rc0, w00, rpc6, eod0, out0)
<- execute= 6 at 4dayreport.pl line 152
-> fetchrow_array for DBD::Oracle::st (DBI::st=HASH(0x4032a6c8)~0x40329164)
<- fetchrow_array= ( '218990326' '2' '21-MAY-01' '07-JUL-01' undef 'BLCONF'

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com