[Rt-commit] rtir branch, return-back-return-undef, created. 2.6.0-32-g13b5e20
Ruslan Zakirov
ruz at bestpractical.com
Fri Jul 29 18:57:14 EDT 2011
The branch, return-back-return-undef has been created
at 13b5e204a4021fe6853a2df890c90f3bd498f4bc (commit)
- Log -----------------------------------------------------------------
commit 13b5e204a4021fe6853a2df890c90f3bd498f4bc
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Sat Jul 30 02:55:08 2011 +0400
return back 'return undef'
returning empty list may affect callers, for exeampl:
take_a_look_at_this_call(
some_name => $x->function_that_was_returning_undef_and_now_returns_empty_list,
another_name_that_turns_into_value => ...,
);
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index 0328486..ebd451e 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -151,7 +151,7 @@ sub OurQueue {
my $self = shift;
my $queue = shift;
$queue = $queue->Name if ref $queue;
- return unless $queue;
+ return undef unless $queue;
return '' unless $QUEUES{ lc $queue };
return $TYPE{ lc $queue };
}
@@ -173,7 +173,7 @@ sub TicketType {
$obj->Load( ref $arg{'Ticket'} ? $arg{'Ticket'}->id : $arg{'Ticket'} );
$arg{'Queue'} = $obj->QueueObj->Name if $obj->id;
}
- return unless defined $arg{'Queue'};
+ return undef unless defined $arg{'Queue'};
return $TYPE{ lc $arg{'Queue'} } if !ref $arg{'Queue'} && $arg{'Queue'} !~ /^\d+$/;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list