On Fri, Oct 21, 2011 at 7:23 PM, Puneet Kishor <punk.kish@gmail.com> wrote:
On Oct 21, 2011, at 12:21 PM, Brian E. Lozier wrote:
On Fri, Oct 21, 2011 at 10:09 AM, Flavio Poletti <polettix@gmail.com> wrote:
On Fri, Oct 21, 2011 at 11:55 AM, Richard Huxton <dev@archonet.com> wrote:
At the moment, the logging levels are exposed directly (debug, warning, error). All the major logging modules seem to expose a single object (Log::Log4perl, Log::Dispatch, Log::Any etc). Doing similar would make logging more consistent across dancer and my non-web modules.
To be explicit, I'm suggesting this: debug("current id = $id") would become: log->debug("current id = $id")
It's a purely cosmetic change at one level, but it does: 1. Reduce namespace pollution 2. Allow for alternative log-levels
Namespace pollution is - for good or bad - what Dancer is about; otherwise, there would be no DSL. I like the idea of having one-off functions for logging as for anything else, even if I like Log::Log4perl and I usually avoid Dancer's internal debugging. IMHO your proposal should go on the Plugin side (e.g. Dancer::Plugin::Log::Log4perl)
Everyone keeps talking about "DSL" -- what is that? Last time I used DSL it was for getting internet access through the phone company. (and don't use google to search for "define dsl" at work, you don't want to see the urban dictionary result)
Domain Specific Language. Besides, that I am with you... have no idea what that means.
The whole "get/post/template/whatever" stuff that Dancer provide form a language that is specific to creating web applications, i.e. specific to the particular "domain" we're talking about. http://en.wikipedia.org/wiki/Domain-specific_language can be more insightful: "In software development <http://en.wikipedia.org/wiki/Software_development> and domain engineering <http://en.wikipedia.org/wiki/Domain_engineering>, a *domain-specific language* (*DSL*) is a programming language<http://en.wikipedia.org/wiki/Programming_language> or specification language<http://en.wikipedia.org/wiki/Specification_language>dedicated to a particular problem domain, a particular problem representation technique, and/or a particular solution technique."