[Gas] Re: Changed Gas::form_preamble()
Sigfried Gold
sigfried at onthejob.net
Thu May 17 08:05:47 CDT 2001
that's a change that will break existing stuff, right?
* Zachary C.Miller <wolfgang at wolfgang.groogroo.com> :
> > $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
>
>
>
>
>
> _______________________________________________
> Gas mailing list
> Gas at lists.groogroo.com
> http://lists.groogroo.com/cgi-bin/listinfo/gas
More information about the Gas
mailing list