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


in reply to Redundant function calls in constructor?

I could assign the values with 1 call.
You even should. Theoretically, the first call could happen at the end of a day, month or year. Let's say 2012-01-31 23:59:59. and the next one one second later, 2012-02-01 00:00:00. in which case you'll end up with wrong data (DAY=31, MONTH=02, YEAR=2012). oops