NAME
Plack::Middleware::FirePHP - Middleware for FirePHP::Dispatcher
SYNOPSIS
# app.psgi
use
Plack::Builder;
my
$app
=
sub
{
my
$env
=
shift
;
my
$fire_php
=
$env
->{
'plack.fire_php'
};
$fire_php
->
log
(
'Hello from FirePHP'
);
$fire_php
->start_group(
'Levels:'
);
$fire_php
->info(
'Log informational message'
);
$fire_php
->
warn
(
'Log warning message'
);
$fire_php
->error(
'Log error message'
);
$fire_php
->end_group;
$fire_php
->start_group(
'Propably emtpy:'
);
$fire_php
->dismiss_group;
return
[ 200, [
'Content-Type'
=>
'text/plain'
], [
'Hello Foo'
] ];
};
builder {
enable
'FirePHP'
;
$app
;
};
DESCRIPTION
This is a Plack middleware component which enables FirePHP in your app using FirePHP::Dispatcher. Currently only the basic interface of supported. See The FirePHP::Dispatcher documentation for a list of supported methods.
Please do not call finalize
on the FirePHP object yourself. The middleware takes care of that for you.
To enable the middleware, just use Plack::Builder in your .psgi
file:
If you want to disable the FirePHP message (eg. for production usage) just set disabled
to 1
. In this case the middleware will use Class::Null instead of FirePHP::Dispatcher, which will silently dispatch all your calls:
BUGS
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.
SEE ALSO
http://www.firephp.org, FirePHP::Dispatcher, Class::Null
AUTHOR
Florian Helmberger <fh@25th-floor.com>
Tatsuhiko Miyagawa
COPYRIGHT AND LICENSE
Copyright 2009 25th-floor - de Pretis & Helmberger KG
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.