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 ]

koschei (147)


Um. Me. Iain Truskett. Can be found as either Spoon or Koschei around the place, and as Braxiatel in rare circumstances. Um. Cool. Ta.

My perl svn repository [] if you want bits of code by me. Also see [] for most of them in action.

My friends [], foes [], fans [], and freaks []. And you can see what my friends are journalling [].

And everybody's journals [] (in order of updating).

Journal of koschei (147)

Thursday October 04, 2001
08:40 PM

Programming the Perl DBI - a review

[ #879 ]

Programming the Perl DBI, by Alligator Descartes & Tim Bunce.

In brief: Great for DBI beginners. Needs to have (or be) a quick reference card for the more experienced user.

Not in brief:

Chapter 1: Introduction: Fairly standard O'Reilly introduction chapter. Tells you what what the book is about is about.

Chapter 2: Basic Non-DBI Databases: At first glance, it is a strange thing to have in a book that's about DBI. However, it does serve as a good explanation of why DBI and relational databases in general are good things. It explains both simple data (scalars) and complex data in flat files (mentions Data::Dumper and Storable).

Mentions file locking, which is a good thing, and then goes on to explain DBM.

It then talks about encapsulating records as objects. Doesn't mention the indirect method invocation ambiguity problems that Damian mentions in OOPerl (p.99). Only a minor problem that.

It then points out the limitations of querying using DBM and goes on to (briefly) talk about MLDBM.

So chapter 2 has basically given the reader a reason for reading on. Which is a good thing.

Chapter 3: SQL and Relational Databases:

I can't fault this chapter. An excellent 22 page precis of SQL.

Chapter 4: Programming with the DBI:

This is part 1 of the meat of the book: How to use DBI. Covers connecting and disconnecting. Then it devotes 8 pages to how to handle errors. It's very lovely and comprehensive.

It then gives pointers on debugging and scalar handling.

To be continued...

Code notes: (reminiscent of the litmus test)

  • File locking with flock() is covered reasonably well.
  • Examples all use -w, but rarely 'use strict;'. On the other hand, the majority of the code is also 'strict-clean'.
  • Examples tend to end in 'exit;' which may cause problems with people who don't read the mod_perl notes on using exit() in mod_perl.
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.