1package Plack::Middleware::Debug::Dancer::Session; 2BEGIN { 3 $Plack::Middleware::Debug::Dancer::Session::VERSION = '0.03'; 4} 5 6# ABSTRACT: Session panel for your Dancer's application 7 8use strict; 9use warnings; 10use parent qw(Plack::Middleware::Debug::Base); 11use Dancer::Session; 12 13sub run { 14 my ( $self, $env, $panel ) = @_; 15 16 return sub { 17 my $session = Dancer::Session->get(); 18 my @settings = map { $_ => $session->{$_}} keys %$session; 19 $panel->title('Dancer::Session'); 20 $panel->nav_subtitle("Dancer::Session"); 21 $panel->content( sub { $self->render_list_pairs( \@settings ) } ); 22 }; 23} 24 251; 26 27 28__END__ 29=pod 30 31=head1 NAME 32 33Plack::Middleware::Debug::Dancer::Session - Session panel for your Dancer's application 34 35=head1 VERSION 36 37version 0.03 38 39=head1 SYNOPSIS 40 41To activate this panel: 42 43 plack_middlewares: 44 Debug: 45 - panels 46 - 47 - Dancer::Session 48 49=head1 AUTHOR 50 51franck cuny <franck@lumberjaph.net> 52 53=head1 COPYRIGHT AND LICENSE 54 55This software is copyright (c) 2010 by franck cuny. 56 57This is free software; you can redistribute it and/or modify it under 58the same terms as the Perl 5 programming language system itself. 59 60=cut 61 62