[2656] in BarnOwl Developers
Re: [PATCH] add a random zsig function
daemon@ATHENA.MIT.EDU (Kevin Riggle)
Mon Sep 20 23:59:54 2010
Cc: barnowl-dev <barnowl-dev@mit.edu>
From: Kevin Riggle <kevinr@free-dissociation.com>
To: Anders Kaseorg <andersk@mit.edu>
In-reply-to: <alpine.DEB.2.00.1009190314130.15192@dr-wily.mit.edu>
Date: Mon, 20 Sep 2010 23:59:49 -0400
Excerpts from Anders Kaseorg's message of Sun Sep 19 03:43:56 -0400 2010:
> @lines and FILE are global variables. The open call lacks a mode ('<'),
> and its failure does not necessarily imply that the zsig file doesn’t
> exist. Also, if ~/.zsigs is empty, the failure mode is less graceful than
> it could be: ‘Use of uninitialized value $zsig in scalar chomp’.
>
> The while loop could be written more succinctly, if you’re into that kind
> of thing.
> my @lines = grep !(/^#/ || /^\s*$/), <FILE>;
>
Oh goodness, the python has really rotted my brain, hasn't it. Thanks for
catching those. Updated patch follows.
- Kevin