X-Git-Url: http://git.jankratochvil.net/?p=MyWeb.git;a=blobdiff_plain;f=Web.pm;fp=Web.pm;h=490e6806b7326628ea0f6453a4318fb20848867c;hp=1a3f9e0a072f9d1f3f7d85b4d091bb9e9e67f0dc;hb=edc26afba71fc943994fce6cf224eed4374d58c9;hpb=6c5cf4306de5fcb4958519e0f73cac52fea32753 diff --git a/Web.pm b/Web.pm index 1a3f9e0..490e680 100644 --- a/Web.pm +++ b/Web.pm @@ -37,6 +37,7 @@ our @EXPORT=qw( $W &input_hidden_persistents &escapeHTML + &form_method ); our @ISA=qw(Tie::Handle Exporter); @@ -278,6 +279,16 @@ my($class,%args)=@_; return $W; } +sub form_method($) +{ +my($method)=@_; + + return q{enctype="application/x-www-form-urlencoded" accept-charset="us-ascii utf-8"} if $method eq "post"; + return q{accept-charset="us-ascii utf-8"} if $method eq "get"; + cluck "Undefined method: $method"; + return "" +} + sub merge_post_args($) { my($class)=@_;