Agreed.  I usually try to keep all non trivial logic outside of recipes/LWRP's and shove it in libraries instead.  I find libraries easier to test and debug. Additionally, I prefer to keep recipes and LWRP very clean and easy to read so that people less familiar with Chef can grok them easier.  The downside to this is that you end up with kludges like this where it is harder to read with very little gained by moving the method to a library.