blob: 1782c56431420d5f45f690a6f4e0a3af8ade751e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package Plack::Middleware::Debug::Dancer::Session;
# ABSTRACT: Session panel for your Dancer's application
use strict;
use warnings;
use parent qw(Plack::Middleware::Debug::Base);
use Dancer::Session;
sub run {
my ( $self, $env, $panel ) = @_;
return sub {
my $session = Dancer::Session->get();
my @settings = map { $_ => $session->{$_}} keys %$session;
$panel->title('Dancer::Session');
$panel->nav_subtitle("Dancer::Session");
$panel->content( sub { $self->render_list_pairs( \@settings ) } );
};
}
1;
=head1 SYNOPSIS
To activate this panel:
plack_middlewares:
Debug:
- panels
-
- Dancer::Session
|