in reply to problems wrapping DBI

  1. If you are doing this for a learning experience, there are plenty of examples in the SQL and DBIx hierarchies on CPAN. Download a few and look at what they did.
  2. If you are trying to make a contribution to CPAN with the idea that what you are doing is somehow new, unique, or fills a gap, please be sure to look at the above and also heed the recent words of Dave Rolsky on the dbi-users@perl.org mailing list (which you should join if you are serious about staying up to date on such issues)
    There are a lot of tools that already provide wrappers around DBI. These include:

    Alzabo, DBIx::RecordSet, and Class::DBI all provide fairly high level RDBMS-OO mappers.

    Other lower-level wrappers include DBIx::Abstract, DBIx::Easy, DBIx::SearchBuilder, and EZDBI.

    There's really more than enough of these things at this point. Probably one of them already does most of the things yours does, so I'd suggest you find that one and offer the author patches for any features you think it might be missing.

Replies are listed 'Best First'.
Re: Re: problems wrapping DBI
by mr.dunstan (Monk) on Dec 14, 2001 at 06:36 UTC
    DOH! I am so embarrassed. Of course I use strict always, this was slapped into a new file from some old code so I was going to tighten the bolts later.

    Thanks for all the useful feedback, the regular function was getting called from the same package so that's why I was doing that ...

    ... yes, I know I am obnoxiously using the wrong DBI method to return a string (I am only expecting one row back, I have other functions to handle arrays, hashes, AoA's etc.. )

    Thanks for the inheritance tip, that's why I'm getting into fixing this old stuff.

    As far as CPAN goes, all that stuff is useful, sure, but it's not doing things -my- way!! :) I leave the glory for all you guys ...

    -mr.dunstan
Re: Re: problems wrapping DBI
by IlyaM (Parson) on Dec 14, 2001 at 15:48 UTC
    Before starting reinventing the wheel check what have been done before.

    This page contains very good summary of Perl OO wrappers for DBI.

    --
    Ilya Martynov (http://martynov.org/)