[Gas] Re: Changed Gas::form_preamble()
Zachary C.Miller
wolfgang at wolfgang.groogroo.com
Thu May 17 01:28:28 CDT 2001
> $form = $gas->form_preamble( "GET", to=>'foo' );
>
> or,
>
> $form = $gas->form_preamble( {method=>"GET", form_name=>"bar"},
> to=>'foo' );
I wonder if it might make sense to structure this like this instead
(in keeping with the style of other Gas stuff):
$form = $gas->form_preamble( -method => "GET",
-form_name => "bar",
[ to => 'foo', from =>'baz', meef=>1 ] );
It just makes sense to me that if anything deserves to be grouped into
a hash it is the key/vals rather than the function's other unrelated
parameters. It would have to be a anon array since there may be 2 vals
for 1 key.
The function itself would start something like this then:
sub form_preamble {
my @keyvals = @{pop @_}; # in the old subroutine this was @param
my %params = @_;
#...
}
--
Zachary C. Miller - @= - http://wolfgang.groogroo.com/
IMSA 1995 - UIUC 2000 - Just Another Leftist Muppet - Ya Basta!
Social Justice, Community, Nonviolence, Decentralization, Feminism,
Sustainability, Responsibility, Diversity, Democracy, Ecology
More information about the Gas
mailing list