autarch/class-load — pull request #3 by diegok (2011-12-17 18:57:16+00:00)
Title: Missed exceptions because of the way Try::Tiny was used

I've faced a warning message on a box without the XS module. When looked at the code I saw this pattern being used:

if (try { failing code }) {...}
else { $err .= $@ }

$@ is never set by try() and the only way I know of catching the exception is using a catch block and getting it from $_. So, I've made some changes on the implementation loading code to fix this problem.

I was thinking on how to make a failing test for this but I don't know. The only thing I can think of, is to set a non existant implementation (this will only test one of the two fixes) to see if the exception contains the one catched.

Hope this is fine.