[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: copypage diff



On Mon, Jul 15, 2002 at 03:24:14PM +0200, Gerfried Fuchs wrote:
[...]
> >  # Get configuration
> > +$copym = "copy";
> >  if (exists $ENV{DWWW_LANG}) 
> >  {
> >       $language = $ENV{DWWW_LANG};
> > @@ -22,6 +23,8 @@
> >  {
> >  	$language = <CONF>;
> >  	chomp $language;
> > +	$copym = <CONF> or $copym = "copy\n";
> > +	chomp $copym;
> >  	close CONF;
> >  }
> 
>  Uhm, why both initializing and having it in an or afterwards? Wouldn't
> be the
>   +	$copym = <CONF> or $copym = "copy\n";
> line be enough to inizialize it?

Because if $ENV{DWWW_LANG} is defined or if all tests fail, $copym must
also be initialized.

> And, to play perl golf, you won't need the \n for we are using chomp
> afterwards, not chop :)

Indeed, you're right.

Denis


-- 
To UNSUBSCRIBE, email to debian-www-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: