[Wellington-pm] Strange (for me) notation

Grant McLean grant at mclean.net.nz
Tue Jul 21 20:36:05 PDT 2009


On Wed, 2009-07-22 at 04:05 +0100, Olly Betts wrote:
> Note that this also works as intended, and the constant gets substituted:
> 
> $ib->{reg}->{(LATEST_D_ACROSS_PRODUCTS)} = $ed;
> 
> This seems clearer too (constants being subroutines feels like an
> implementation detail to me).

Agreed.

Another option that you'll come across sometimes is the unary plus
operator:

  $ib->{reg}->{+LATEST_D_ACROSS_PRODUCTS} = $ed;

Cheers
Grant



More information about the Wellington-pm mailing list