|Just another Perl shrine|
Well, I reply to Corion's posting although it becomes a general reply to all who replied ;-)
Thank you very much for your replies. I hoped for a beautiful way to write this, but I will use version 3 since it looks less ugly than the other two ways.
Adding a timeout-parameter to extend_order_lease would be best. But I don't dare to change the external framework or Boldra would look at me with very sad eyes the whole day long ;-)
The synthetic sugar with the prototype looks nice, but in my case I don't want to use it. I put the methods do_sub_with_timeout or do_method_with_timeout into a Moose role so we can be use them everywhere in our framework (in the moment in about 4 different classes), and so I want them to be methods and not subs for not to need import subs into a foreign namespace. (And methods ignore prototypes anyway.)
Have a nice evening
In reply to Re^2: Style - how to give class method call as parameter