[Dancer-users] why does "warn" fail?

sawyer x xsawyerx at gmail.com
Sat Jan 22 09:30:43 CET 2011


Hi Brian.

You can use the exported "debug", "warning" and "error" functions to output
to the logger with a certain severity which is easier to identify in the
log. This includes other useful information such as timing.

Hope that helps.

On Sat, Jan 22, 2011 at 3:08 AM, Brian E. Lozier <brian at massassi.com> wrote:

> As a perl veteran I am used to using the built-in "warn" function to
> write to STDERR.  Under mod_perl/Apache this prints to the web
> server's error log.  Using my dancer app like this:
>
> plackup -L Shotgun app.pl
>
> If I have a "warn" anywhere in my app, I get an error message:
>
> Error trace
>
> status code needs to be an integer greater than or equal to 100 at
> /usr/local/lib/perl5/site_perl/5.12.2/Plack/Middleware/StackTrace.pm
> line 27
>
> However, if I print STDERR "msg"; that works.  My question is: what
> happened to warn?  Can it be fixed so that it writes to STDERR instead
> of triggering an error message?
>
> I know about the "warning" function but it's really hard to change 10
> years of muscle memory!
>
> Thanks,
> Brian
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20110122/5952e83d/attachment-0001.htm>


More information about the Dancer-users mailing list