|Syntactic Confectionery Delight|
Style - how to give class method call as parameterby strat (Canon)
|on Jun 26, 2012 at 13:13 UTC||Need Help??|
strat has asked for the
wisdom of the Perl Monks concerning the following question:
I come here with a simple problem: I need to add a timeout to a method call, and now think about the best way how to 'say' it. Well, I don't want to use named parameters for such a simple task.
Here the original call without timeout:
Well, I wrote a little sub which deals with the timeout, and called it like the following:
The => looks a little bit like the -> from the original call, but there are no pairs.
But there you don't see what belongs together...
But the longer I look at those ways, the less I like them...
Please, could you help me and tell me how you would write it?