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

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.
  • ick (Score:3, Interesting)

    I find code like this pretty cringe-worthy. If you set RaiseError and HandleError, you can have something this simple:

    sub get_values {
        my $dbh = get_connection('databasename');
        return $dbh->selectall_arrayref(
            'SELECT * FROM table_name', { Slice => {} }

    Isn't that much nicer than 25 lines of code? I'm also not keen on returning flags for errors, you'll just have to write lots of code to check, just die if something bad happened a