I think a lot of people's approach, including mine, is to have OO Perl
modules for all database access.  In my code (I use Mason), a web page
only gets its data through calls like this:

my $obj = NAIC::User->(DBH=>$dbh, EMAIL=>'[EMAIL PROTECTED]');
$obj->load;
my $groups_list = $obj->groups();

That way any needed SQL changes, or even ports to a new database,
don't have to be done everywhere in my code.



On Wed, Aug 01, 2001 at 10:12:45AM -0500, Joe Breeden wrote:
> All,
> 
> In his closing comments about UBB Kyle Dawkins made a statement that got me
> wondering. He said "there's SQL embedded all throughout the Perl everywhere
> (who does this?! oh my god, are they on crack?)".

...

> It would be interesting to know how other people have solved that problem.
> Currently, we are essentially using embedded SQL in our apps. 

-- 
Barry Hoggard

Reply via email to