summary refs log tree commit diff
path: root/lib/Plack/Middleware
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-04-18 19:09:30 +0200
committerfranck cuny <franck@lumberjaph.net>2010-04-18 19:09:30 +0200
commitfc649f34e011677bb79d56669f713dee9e99c6ba (patch)
treec58d03fce56a188fc162d155fc5ebe2555e4d024 /lib/Plack/Middleware
parentremove log file (diff)
downloaddancer-debug-fc649f34e011677bb79d56669f713dee9e99c6ba.tar.gz
set title and subtitle
Diffstat (limited to '')
-rw-r--r--lib/Plack/Middleware/Debug/Dancer/Logger.pm3
-rw-r--r--lib/Plack/Middleware/Debug/Dancer/Session.pm2
-rw-r--r--lib/Plack/Middleware/Debug/Dancer/Settings.pm12
-rw-r--r--lib/Plack/Middleware/Debug/Dancer/Version.pm2
4 files changed, 8 insertions, 11 deletions
diff --git a/lib/Plack/Middleware/Debug/Dancer/Logger.pm b/lib/Plack/Middleware/Debug/Dancer/Logger.pm
index 3fdc4e9..91f0cdc 100644
--- a/lib/Plack/Middleware/Debug/Dancer/Logger.pm
+++ b/lib/Plack/Middleware/Debug/Dancer/Logger.pm
@@ -5,7 +5,6 @@ use warnings;
 use parent qw(Plack::Middleware::Debug::Base);
 use Dancer::Logger;
 use Class::Method::Modifiers qw(install_modifier);
-our $VERSION = '0.07';
 
 # XXX Not thread/Coro/AE safe. Should use $c->env or something
 my $psgi_env;
@@ -37,6 +36,8 @@ sub run {
     return sub {
         my $res = shift;
 
+        $panel->title('Dancer::Logger');
+        $panel->nav_subtitle('Dancer::Logger');
         my $log = delete $env->{'plack.middleware.dancer_log'};
         if ($log) {
             $panel->content("<pre>$log</pre>");
diff --git a/lib/Plack/Middleware/Debug/Dancer/Session.pm b/lib/Plack/Middleware/Debug/Dancer/Session.pm
index 055676a..e4e410d 100644
--- a/lib/Plack/Middleware/Debug/Dancer/Session.pm
+++ b/lib/Plack/Middleware/Debug/Dancer/Session.pm
@@ -11,6 +11,8 @@ sub run {
     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 ) } );
     };
 }
diff --git a/lib/Plack/Middleware/Debug/Dancer/Settings.pm b/lib/Plack/Middleware/Debug/Dancer/Settings.pm
index cf10748..cae1602 100644
--- a/lib/Plack/Middleware/Debug/Dancer/Settings.pm
+++ b/lib/Plack/Middleware/Debug/Dancer/Settings.pm
@@ -6,22 +6,14 @@ use parent qw(Plack::Middleware::Debug::Base);
 use Class::Method::Modifiers qw/install_modifier/;
 use Dancer::Config;
 
-#my $psgi_env;
-# install_modifier 'Dancer', 'around', 'start' => sub {
-#     my $orig = shift;
-#     my $self = shift;
-#     $psgi_env->{'plack.middleware.dancer_settings'} = $self->config;
-#     $self->$orig(@_);
-# };
-
 sub run {
     my ( $self, $env, $panel ) = @_;
-#    $psgi_env = $env;
 
     return sub {
         my $res = shift;
         my $settings = Dancer::Config->settings();
-#        my $settings = $env->{'plack.middleware.dancer_settings'};
+        $panel->title('Dancer::Settings');
+        $panel->nav_subtitle('Dancer::Settings');
         my @settings = map { $_ => $settings->{$_}} keys %$settings;
         $panel->content( sub { $self->render_list_pairs( \@settings ) } );
     };
diff --git a/lib/Plack/Middleware/Debug/Dancer/Version.pm b/lib/Plack/Middleware/Debug/Dancer/Version.pm
index fe05275..5773af7 100644
--- a/lib/Plack/Middleware/Debug/Dancer/Version.pm
+++ b/lib/Plack/Middleware/Debug/Dancer/Version.pm
@@ -8,6 +8,8 @@ sub run {
     my ( $self, $env, $panel ) = @_;
 
     return sub {
+        $panel->title('Dancer::Version');
+        $panel->nav_title('Dancer::Version');
         $panel->nav_subtitle($Dancer::VERSION);
     };
 }