in reply to Re^2: Simplifying repeated parameter lists
in thread Simplifying repeated parameter lists

Voronich:

Admittedly, it's probably more "neat-o!" than practical. (Though it's just useful enough for me to drop into my bag-o-tricks module for general use.) It probably only pulls its weight when you have multiple sets of default arguments and/or multiple different functions you want to decorate.

There might be a few useful variations, too. For example, might want to make a bunch of default arguments at the *end* of your list (such as for adding formats to cells using Spreadsheet::WriteExcel.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

  • Comment on Re^3: Simplifying repeated parameter lists

Replies are listed 'Best First'.
Re^4: Simplifying repeated parameter lists
by Voronich (Hermit) on Sep 19, 2012 at 21:00 UTC

    yeah the more I reread that the more it becomes that it's going to make it in to my code before too terribly long.

    for instance: the "submit_thingamabob" function is a nasty piece of databasocity. If I could reasonably swap that call out and replace it with a mock, without mucking too much with the existing code, it would speed development remarkably.