in reply to Re^2: Getting rid of "new" (superfluous reference constructor)--
in thread Getting rid of "new"

An alternative:

use Data::Heap::Whatever 1.1 ( Factory => my $Heap, ...

But the passing of a reference has two purposes:

  1. It lets us reliably distinguish between an option name and a variable being passed in to receive a factory, thus allowing the more stream-lined usage
  2. It makes the fact that $Heap will be modified explicit, serving as a form of documentation

I don't have a strong preference (other than wishing use could return a factory), though.

- tye