Forum OpenACS Development: Response to OpenACS Developer tools

Collapse
Posted by Domingo Alvarez duarte on
I wrote a small perl script that swap the parameter value with
the parameter name in function calls.

obj_type    => 'acs_object',
description => 'area'

becomes

'acs_object',  -- obj_type =>
'area'         -- description =>

save the code bellow to a file.

--------
while (<>) {
    if (/(s+)(.*=>) (.*)/) {
            print "$1$3		-- $2
";
    }
    else {
	print $_;
    }
}
-----

execute it:

perl file_where_script_saved file_to_swap_paramteres.sql