I like that idea, but I've never liked having to write XML by hand. What's the benefit over an API more like:
my $project = APPML::Project->new( name => "sample", title => "Sample Application" ); my $table = $project->add_table( name => "contact", caption => "contact", descriptor => "name" ); my $vc40notnull = AppML::FieldType->new( type => "varchar", size => "40", notnull => "1", ); $table->add_fields( [ name => "name", caption => "name", type => $vc40notnull, ], [ # more fields here... ] ); $project->create();
That's the sort of interface I'd create. Maybe it's appropriate to make that write out the XML for you, but I'd personally skip the step of writing out XML, reading it in, and translating it into internal data structures.
In reply to Re: Code Generation in Perl
by chromatic
in thread Code Generation in Perl
by nferraz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |