Further information is available on http://code.google.com/p/m4o/.
Here's a teaser of what Meta-PL/SQL looks like:
@package-begin greeter_pkg
@procedure hello_dbms_output*
i_name in varchar2
@begin
dbms_output.put_line('Hello, ${nvl(i_name,'stranger')}!');
@end
@procedure hello_web*
i_name in varchar2
@begin
<h1>Hello, <%=nvl(i_name,'stranger')%>!</h1>
@end
@package-end
generates
create or replace package greeter_pkg as
procedure hello_dbms_output(i_name in varchar2);
procedure hello_web(i_name in varchar2);
end;
create or replace package body greeter_pkg as
procedure hello_dbms_output(i_name in varchar2)
is
begin
-- log that greeter_pkg.hello_dbms_output was called with i_name
dbms_output.put_line('Hello, '||nvl(i_name,'stranger')||'!');
end;
procedure hello_web(i_name in varchar2)
is
begin
-- log that greeter_pkg.hello_web was called with i_name
htp.p('<h1>Hello, '||nvl(i_name,'stranger')||'!</h1>');
end;
end;
Please note that this is a very early release and a few planned features are missing. A previous version of Meta-PL/SQL has been in production use since summer 2008, however.