Just something I've been working on recently. Previously I would check the result of every DBI statement with RaiseError set and an eval around each statement:
The evals added a lot of repetitive code. DBI database handles have an attribute called HandleError that allows a subroutine to be run when an error is encountered. The code is much cleaner with rollback and confess in the HandleError subroutine.
Also if something different needs to be done with errors for a specific statement the HandleError subroutine can be disabled temporarily by saving it to a temporary variable, setting HandleError to undef, then setting HandleError back to the temporary variable later.
ikaika (ee-KYE-kah): Strong, powerful, sturdy, stalwart; strength, force, energy, might.
Subscribe to:
Posts (Atom)
PreferenceKey Quirks
PreferenceKey has a few quirks that have tripped me up. One is the reduce(value:nextValue:) implementation. The other is that a PreferenceKe...
-
While setting up OpenBSD on my PowerBook, I ran across a problem with GNOME. My mouse would work fine but the moment I tried to type somethi...
-
I've been working on a WPF project in Visual Studio 2010 and I came across a problem where Visual Studio would crash when I used the Doc...
-
I've finally had some free time to work on the Label Sphere. The new version should correctly color the labels according to your blog...