Great find! It partially supports Damian Conway's Perl Best Practices, except that he advocates for an anonymous hash, like this:
my $obj = This::Class->new( { that => 2, those => 4 } );
He makes the point that a missing 'value' with this strategy would result in compile-time error this way rather than a runtime problem.
Regarding perlmodstyle's mention that the hyphenated parameter tag is based on an antequated need, it does confirm that the behavior of the fat comma is supposed to quote strings with hyphens in them (even at the beginning). So perl and perlmodstyle are both at odds with perlop as to what should qualify for the fat comma's quote-like behavior.
|