From 15f8ba92704ea3e81d4d380a868a68101737cdb2 Mon Sep 17 00:00:00 2001
From: Chris Nehren <cnehren@omniti.com>
Date: Mon, 10 Jun 2013 03:49:28 +0000
Subject: [PATCH] Code and doc fixes for WatchOutput

---
 lib/Core/WatchOutput.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/Core/WatchOutput.pm b/lib/Core/WatchOutput.pm
index e84aa08..dd59002 100644
--- a/lib/Core/WatchOutput.pm
+++ b/lib/Core/WatchOutput.pm
@@ -16,7 +16,7 @@ Core::WatchOutout - watch a command's output, reporting it
 =head1 SYNOPSIS
 
  Core::WatchOutput {
-     command: cmd => "/bin/ls"
+     ls: command => "/bin/ls"
  }
 
 =head1 DESCRIPTION
@@ -61,14 +61,14 @@ sub new {
 sub handler {
     my $self = shift;
     my $config = $self->{config};
-    my $command = $self->{command};
+    my $command = $config->{command};
 
     my $output = run_command($command);
     chomp $output;
     my $status = $? >> 8;
 
     return {
-        "output" => [$self->{check_name}, "s"],
+        "output" => [$output, "s"],
         "return_code" => [$status, "i"],
     };
 };
-- 
GitLab