[Gas] Re: Changed Gas::form_preamble()

Zachary C.Miller wolfgang at wolfgang.groogroo.com
Sun May 20 15:51:32 CDT 2001


Correct. I think we could engineer a change that would not break
existing stuff. For now just go with what Bob has done and I'll figure
out something more standard (but non-breaking) later.

Sigfried Gold wrote:
> 
> 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
> 


-- 
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