HaloO, Juerd wrote:
I think it should be both.
So do I.
my $foo = {}; $foo(); # It was a sub
The postfix () is valid syntax irrespective of the former assignment, right?
my $foo = {}; $foo<bar> = 1; # It was a hash
Would you expect the second line to work witout the first? I would, but perhaps with a more convoluted sequence how that comes to pass: 1) $foo has no particular constraints 2) postfix <> lazily autovivifies a hash element ref which has key bar and stores a not-yet ref to the not-yet hash holding the key into $foo 3) the lvalue from 2) is the lhs arg of infix = 4) the rhs obviously is 1 5) now infix = creates a new hash with the single key value pair bar => 1 and actualizes the not-yet ref in $foo
It's not as if we're allergic to intelligent autovivifithingy... :)
No allergy on my side, as long as the magic is under kind control ;) --