doy / try-tiny

minimal try/catch with proper preservation of $@
http://metacpan.org/release/Try-Tiny
10 stars 15 forks source link

Better docs on capturing success with catch block #13

Closed flowchartsman closed 10 years ago

flowchartsman commented 10 years ago

While there is a note that calls it out below, I believe the behavior and usage of capturing success when also using a catch{} block is sufficiently different to the example that it merits its own example in the same code block. My rationale is twofold:

1) Because it is sufficiently different in behavior, giving an example goes a long way towards understanding. 2) Because this is a critical feature to have fail and it might be easy for someone reading the docs to digest the example and move on before reading the note below (which is unemphasized), it is best to have the second code example alongside the first with a meaningful name so that they are both digested at the same time.

doy commented 10 years ago

Looks okay, but can you fix the travis failure (end of line whitespace), and can you make your example actually do the same thing as the previous example?

flowchartsman commented 10 years ago

I wasn't able to find any erroneous whitespace in my code; hopefully that was just from editing it in github's built in editor. I've edited and pushed from the commandline. Hopefully that will do it.

doy commented 10 years ago

Thanks!