I’m looking at the code of sub make in perl’s Math::Complex, and the first line of code is:
my $self = bless {}, shift;
and I’m trying to figure out what it’s doing. My guess is that this is a comma operator, which evaluates and then discards the first operand (the bless), and then returns the second operator, the shift, which provides the argument passed to the function. But then what exactly is the bless doing?