in reply to confusion about blessing inside a constructor

return {bless({},ref($class) || $class)};

the second argument in bless is the class to be referenced with.

return bless ($self);

returns a referance to an object