From 86241b024ccd568a02e6b8b24e5fbf9ed19e6038 Mon Sep 17 00:00:00 2001 From: doy Date: Wed, 26 Nov 2008 14:29:43 -0500 Subject: explicitly return undef in channel and output when the requested object doesn't exist --- lib/Log/Dispatch/Channels.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Log/Dispatch/Channels.pm b/lib/Log/Dispatch/Channels.pm index 574e5d1..4caf513 100644 --- a/lib/Log/Dispatch/Channels.pm +++ b/lib/Log/Dispatch/Channels.pm @@ -125,6 +125,7 @@ sub output { my $output = shift; return $self->{outputs}{$output} if exists $self->{outputs}{$output}; + return undef; } sub channel { @@ -132,6 +133,7 @@ sub channel { my $channel = shift; return $self->{channels}{$channel} if exists $self->{channels}{$channel}; + return undef; } 1; -- cgit v1.2.3