in reply to Re^2: Design Question - I've gone object mad!
in thread Design Question - I've gone object mad!

Somehow, I do not like the '<' string. Cannot you supply a sub ref that will return the values you need, i.e. similarly to sort:
My::Customer->get( registered => [ DateTime->new( year => 2011, month +=> 4, day => 1 ), \&greater ] );
You can than define between etc.

Replies are listed 'Best First'.
Re^4: Design Question - I've gone object mad!
by Cagao (Monk) on Apr 06, 2011 at 09:45 UTC

    Me neither, that string isn't very nice.

    An interesting approach you suggest, this is what I was after! :)

    Tho that does make the code look a bit messier - maybe some more encapsulation around it...

    My::Customer->get( registered => [ $datetime, My::Operator->greater ] +); package My::Operator; sub greater { return '>'; # or something more fully fledged! }