http://www.perlmonks.org?node_id=867805


in reply to Creating consructor new with empty $self

I think it makes sense. For instance, consider your constructor and following getter/setter method:

sub temperature { my ($self, $t) = @_; if (1 < @_) { $$self{temperature} = $t; } return $$self{temperature}; }

-> I do not see any technical reason for initial filling. Of course, sometimes you really want to initialize it because application logic.