$Heap is scoped to the implicit BEGIN block.use Data::Heap::Whatever 1.1 ( \my $Heap, KeepTies => 1, CompactDump = +> 1 ); # ^^^^^^^^^ Factory object gets put into +this lexical variable my $bestScores= $Heap->new( '>', -max => 10 ); my $worstScores= $Heap->new( '<', -max => 10 );
In reply to Re^2: Getting rid of "new" (wrong target; perl6)
by Anonymous Monk
in thread Getting rid of "new"
by xdg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |