On Fri, Nov 26, 2004 at 07:31:09PM +0100, Juerd wrote:
: Larry Wall skribis 2004-11-26  9:33 (-0800):
: > but that doesn't give you protection from other kinds of interpolation.
: > I think we need two more adverbs that add the special features of qx and qw,
: > so that you could write that: q:x/echo $VAR/ where ordinary qx/$cmd/
: > is short for qq:x/$cmd/ Likewise a qw/a b/ is short for q:w/a b/
: 
: With x and w as adverbs to q and qq, are qx and qw still worth keeping?
: It's only one character less, qx isn't used terribly often and qw will
: probably be written mostly as <<>> anyway.

I might be happy to remove them, though people will write q:x instead
of qq:x and wonder why it doesn't interpolate.  What I think is fun is
qq:x:w, which presumably runs the command and then splits the result
into words.

I know everone has their reflexes tuned to type qw currently, but
how many of you Gentle Readers would feel blighted if we turned it
into q:w instead?

: And perhaps qq:x is a bit too dangerous. Suppose someone meant to type
: qq:z[$foo] (where z is a defined adverb that does something useful to
: the return value, but has no side effects) and mistypes it as
: qq:x[$foo]. Instant hard-to-spot security danger.

Seems rather unlikely.  And presumably tainting should catch it
if it's really a security issue.

Larry

Reply via email to