Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Code Generation in Perl

by nferraz (Monk)
on Jun 19, 2004 at 09:19 UTC ( [id://368164]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Code Generation in Perl
in thread Code Generation in Perl

Interestingly, that's exactly what I did in the first versions of auto_coder.

One of the problems with this approach is that we don't have an easy way to define broader project properties -- we're too focused on the database design.

Moreover, we must write different scripts for different databases; with XML we can write a single source and generate different scripts.

Another advantage of XML is the avaibility of modules like XML::Simple, which translates a XML source into a Perl data structure like this:

$VAR1 = { 'table' => [ { 'descriptor' => 'name', 'caption' => 'contact', 'name' => 'contact', 'field' => [ { 'notnull' => '1', 'caption' => 'first name', 'name' => 'name', 'type' => 'varchar', 'size' => '40' }, { 'visible' => '1', 'caption' => 'organization', 'name' => 'organization', 'type' => 'varchar', 'size' => '40' }, # ...and so on.

In other words, extending SQL with comments *was* my first approach, but it had its shortcomings.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://368164]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.