in reply to Strange POE parameters

It had never occurred to me to use the automatic quoting of barewords before the fat comma for anything other than a hash key. Apparently it works in the even-numbered list positions as well, but I find this usage confusing.

Given this power of the fat comma, you could write

use strict; my @days = (Mon=>Tue=>Wed=>Thu=>Fri=>);
without getting a bareword warning. But please don't.

The fat comma is recommended for use in natural pairs, mostly the key-value pairs of a hash, and the option to omit the quotes around the hash keys is widely thought to improve the presentation.

Update: I stand corrected by the response below. Given that the post() parameters are not pairs, the following equivalent code would be standard formatting:

$kernel->post( ua => 'request', got_response => GET $url, );

$kernel->post( 'ua', 'request', 'got_response', GET $url, );

Replies are listed 'Best First'.
Re^2: Strange POE parameters
by rcaputo (Chaplain) on Sep 04, 2009 at 08:00 UTC