Also relevant is Damian's Rod::Logic module. Unfortunately this hasn't reached CPAN (yet!) but examples can be found in his talks (for eg: http://blip.tv/open-source-developers-conference/temporally-...)