Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

runrig (3385)


Just another perl hacker somewhere near Disneyland

I have this homenode [] of little consequence on Perl Monks [] that you probably have no interest in whatsoever.

I also have some modules [] on CPAN [] some of which are marginally [] more [] useful [] than others.

Journal of runrig (3385)

Wednesday July 28, 2004
06:22 PM

Perl/DBI to the rescue

[ #20119 ]

We implemented a new log table at a customer site which was supposed to log new orders and track changes to existing orders. Except changes to existing orders that weren't logged yet were logged as new orders. I thought this was going to be implemented before they went live, so it'd be okay. Of course it wasn't :)

So I wrote a script to correctly log all orders created before the log-implementation date, using alot of DBI selectall_* and selectrow_* methods (I hadn't used them for awhile, so I had to check the docs for arguments and found the Slice parameter to select rows of data as hashrefs).

So the boss says, "Before you run it, run it by so-and-so (who is on-site) to see if he thinks it's okay." After finishing the script, I ask so-and-so if he wants to see it, but after I tell him it's in perl, he says no-thanks. Just before running it, I seem to lose the VPN connection to the site, and can't run it. We decided to have the guys on-site install Perl. Just as I start writing up an email on how to install perl/DBI/DBD::ODBC from ActiveState (and my own shortcut module to connect to our databases), I get the connection back and run it myself.

I had a minor glitch, but I logged all the changes I made, so I was able to undo them (via another perl script), fix the original script, and run it again.

Thank you Larry, Tim, Jeff, and everyone else! :-)
(From a satisfied customer and still employed employee, though wishing he were at OSCON)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.