[Dancer-users] Logging and "info"

damien krotkine dkrotkine at gmail.com
Wed Mar 28 17:07:43 CEST 2012


On 28 March 2012 09:51, Ovid <curtis_ovid_poe at yahoo.com> wrote:

>
> As for why I would prefer info separate from warning: I hate to overload
> the semantics of something. It keeps biting developers repeatedly, even
> when it seems like a safe thing to do (I have a long explanation of one
> facet of this at
> http://blogs.perl.org/users/ovid/2010/02/exceptions-as-flow-control.html)
>

So, I think you'll be interested by the fact that we implemented
continuations in Dancer, using exceptions. I tried to do it properly , by
monkey-patching Try::Tiny and have two seperate exceptions families :
Dancer::Exception for when things go wrong, and Dancer::Continuation  that
are meant to be used only internally, to break flow control.

I decided to not use Upper::Stack and co, to stick ith simple technology.
But maybe I should revisit it. Let me know what you think of the code :)

https://github.com/sukria/Dancer/blob/devel/lib/Dancer/Exception.pm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20120328/495db8b8/attachment.htm>


More information about the Dancer-users mailing list