in reply to Re^8: Finding End of Month's date
in thread Finding End of Month's date
Use call_on_obj() and don't chain.
Why should I? You were the person who complained about chaining mutators, and you were the one that used them in preference over call_on_obj. I don't object to the use of chaining mutators.
Q.E.D.
Eh? What were you supposed to prove, and how did your prove it?
FWIW, DateTime IMHO falls under the accumulator exception,
$obj -> truncate(to => 'month') -> add('months' => 1, days => -1) is an "accumulator exception" (guess 'truncate' and 'add' are "accumulators" then), but $widget -> title(foo) -> border(20) isn't?
That makes me curious. What decides whether something falls under "accumulator exception" and what doesn't?
|
|---|