I'm working on a module that I hope will provide a similar function for SQL 
code that the various templating modules provide for HTML generation.

The goal is to move SQL code entirely out of the Perl, and to provide a very 
straightforward means of executing the SQL statements that are maintained in 
separate files.

e.g. given this SQL statement in a file named "lookup_employee":

        select  name,
                salary,
                hire_date
        from    EMPLOYEE
        where   id = :id

The module works like this:

  my $thingy = new Thingy;
  my $data = { id => 473 };
  $thingy->execute("lookup_employee", $data);
  print "Employee $data->{id} is $data->{name} with salary $data->{salary}\n";


What is an appropriate module name for this package?  I'm unclear on the 
rules regarding use of the various db-related namespaces on CPAN.

Some ideas:
        DBIx::Template
        DBI::Template
        SQL::Template
        DBIx::SQLManager

Suggestions welcome,
-Jason

Reply via email to