For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > March 2006 > Name wanted for module in construction









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Name wanted for module in construction
lukeross@gmail.com

2006-03-15, 6:56 pm

Hi,

I'm writing a module designed to work along with DBI to enable
database-independent SQL generation. I've seen DBIx::SQLEngine and
DBIx::Abstract, but I feel that the syntax is too verbose and the data
structures too nested. My module uses source filters and PPI to allow
you to write some Perlish code which is transformed. Syntax is nowhere
near fixed yet, but along the lines of:

$dbh->My::Module(table1, table1.foo == 1 && table1.bar eq "hello");
(a.k.a. select * from table1 where table1.foo = 1 and table1.bar =
"hello")

or the more complex:

$dbh->My::Module([table1->table2(table1.a==table2.b)], table1.status =~
m/^Foo/ and (table2.a eq "a" || table2.a eq $foo));
(a.k.a. select * from table1 right join table2 on table1.a=table2.b
where table1.status like "Foo%" and (table2.a = "a" or table2.a =
$foo)) where $foo is interpolated at runtime.

Questions: am I reinventing the wheel? and if not, what should I call
it? I have in mind Filter::SQL or DBIx::Filter.

Thanks,

Luke

Ron Savage

2006-03-16, 6:56 pm

On Thu, 16 Mar 2006 10:21:35 +1100, lukeross@gmail.com wrote:

Hi Luke

> Questions: am I reinventing the wheel? and if not, what should I
> call it? I have in mind Filter::SQL or DBIx::Filter.


Yes, you are :-)). There are far too many such modules on CPAN already.=
Truely,
we don't need another one, especially one which forces the user to learn=
another
language/syntax (the one /you/ are embedding in Perl).

The point of CPAN is for all of us, yes including you and me, to re-use=
existing
tools.

The same mistake is made repeatedly with HTML-based templating languages.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com