my name:              Matisse Enzer
my email address:     [EMAIL PROTECTED]
my homepage:          http://www.matisse.net/
my preferred user-ID: MATISSE

My first planned contribution is a module that provides a simple 
high-level wrapper around DBI. I've used it on several projects now 
and it is quite handy.

I have it on my web site now at http://www.matisse.net/perl-modules/

Here's the README from the module (proposed name is  DBI::Wrapper )


DBI/Wrapper version 0.01
========================

DBI::Wrapper is a simple module that provides a high-level interface
to the Perl DBI module. The provided methods are for fetching
a single record (returns a hash-ref), many records (returns
an array-ref of hash-refs), and for executing a non-select statement
(returns a result code).

The intention here is that your application will have much cleaner 
code, so instead of writing:

     my $sql = "SELECT name,address FROM $table WHERE zipcode=?";
     my $sth = $dbh->prepare("SELECT name,address FROM $table WHERE zipcode=?");
     my $rv  = $sth->execute("$zipcode");
     my @found_rows;
     while ( my $hash_ref = $sth->fetchrow_hashref ) {
         push( @found_rows, $hash_ref );
     }

You would write:

     my $sql = "SELECT name,address FROM $table WHERE zipcode=?";
     my $found_rows = $wrapper->FetchAll("$sql","$zipcode");
     # $found_rows is an array_ref of hash_refs


INSTALLATION

To install this module type the following:

    perl Makefile.PL
    make
    make test
    make install

DEPENDENCIES

This module requires these other modules and libraries:

   DBI

COPYRIGHT AND LICENCE


Copyright (c)2001 by Matisse Enzer <[EMAIL PROTECTED]>

This package is free software and is provided "as is"
without express or implied warranty.  It may be used,
redistributed and/or modified under the terms of the Perl
Artistic License (see http://www.perl.com/perl/misc/Artistic.html)





-- 
-------------------------------------------
Matisse Enzer
[EMAIL PROTECTED]
http://www.matisse.net/

Reply via email to