in reply to Re^7: Finding End of Month's date
in thread Finding End of Month's date

Use call_on_obj() and don't chain. It's still a slick API, Q.E.D.

FWIW, DateTime IMHO falls under the accumulator exception, just like the chained calls in File::Find::Rule.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re^9: Finding End of Month's date
by Anonymous Monk on Jan 05, 2005 at 10:48 UTC

    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?