Larry Wall <[EMAIL PROTECTED]> writes: > 1 .. (<some_big_hairy_expression>) > ^:by(3) > > But we'd have to pay really close attention to how indenting is > done. Maybe we should just pass this suggestion on to Guido... :-)
Yes, please leave column-alignment tricks to Python. I don't even like the fact that indentation is significant in POD, to the extent that I've given up on the idea of putting the documentation with the code in Perl5 (the whole point of POD, so I thought), because of the havoc it wreaks on the indentation. 1 .. (<some_big_hairy_expression>) :by(3) seems fine to me. The parens should keep the adverb from applying to anything inside of them, and so assuming that the parens themselves don't take adverbs[1], then the adverb applies to the preceding operator, in this case the range operator. I think that should be the rule: the adverb should apply to the closest preceding thing that can take adverbs. That's a simple rule, and it's _approximately_ similar to how it works in English, most of the time (except that in English we also allow the adverb to come before the thing it modifies, or in some cases to modify the entire clause, and a few other complications not worth going into ATM). So, then, with something like open "$( $file ).log" :follow; We have to decide whether quotes are allowed to take adverbs; if they are, then that has to be written differently: open ($file . ".log") :follow; Which in some ways looks cleaner anyway. (As far as :follow goes, I'm imagining something like tail -f does, but I'm currently not prepared to argue for the inclusion of such a feature; it's just an example of an adverb.) OTOH, do quotes constructs really need to be able to take adverbs? A negative answer allows the parens above to go away, and it seems like it would play okay with most things. Certainly, in the case of pattern matching, it is not the quoting character that takes the adverb: m :i /foo/ The adverb attaches to the m (or the s or whatever). And if we're still to have qq and its kin, they could take adverbs in the same fashion, presumbaly: qw :pairs (a A b B c C); qq :xyzzy "Some Arbitrary String"; q :plugh {Another String}; It seems to me that thus it is not strictly necessary for regular quotes to be able to take adverbs directly, since qq and so on can. (We'd probably be losing the ability to use colon as the quoting character. To me, that seems better than having "Some String" :adverb attach the adverb to the quote marks. Maybe I'm just odd.) Someone will doubtless point out that quotes are just a special kind of circumfix operator. Do circumfix operators need adverbs, though? I'm *really* hoping that parentheses don't need them[2]. Aren't those theoretically just circumfix operators too (if you squint)? Larry suggested that maybe only binary operators need adverbs. I'm not sure about that. But I'm leaning toward thinking that circumfix operators, at least, don't need them. --- Footnotes: [1] No. Just say no. [2] ibid. -- $;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,"[EMAIL PROTECTED]/ --";$\=$ ;-> ();print$/