From: short <> Date: Sun, 28 Aug 2005 06:31:49 +0000 (+0000) Subject: No longer depend on undef()ed "heading"/"footing"/... X-Git-Url: http://git.jankratochvil.net/?p=MyWeb.git;a=commitdiff_plain;h=3b62e3657c71b5ee91280b70c7af35e01231e343 No longer depend on undef()ed "heading"/"footing"/... - undef() is too sensitive to the weather, force it instead by: 0 --- diff --git a/Web.pm b/Web.pm index dcd40ea..0616f94 100644 --- a/Web.pm +++ b/Web.pm @@ -232,6 +232,10 @@ my($class,%args)=@_; } # Although we have &tie-d *STDOUT we try to not to be dependent on it in My::Web itself. +# Do not: Wprint $W->{"heading"},"undef"=>1; +# as we would need to undef() it to turn it off and it would get defaulted in such case. +# Do not: exists $W->{"heading"} +# as we use a lot of 'for $W->{"heading"}' which instantiates it with the value: undef() sub Wprint($%) { my($text,%args)=@_; @@ -416,7 +420,7 @@ sub footer (;$) Wprint vskip if $W->{"footer_delimit"}; - Wprint $W->{"footing_delimit"},"undef"=>1; + do { Wprint $_ if $_; } for $W->{"footing_delimit"}; Wprint "