[rt-devel] gratuitous looping in Watchers.pm

ivan ivan-rt-devel at 420.am
Mon Apr 2 12:57:42 EDT 2001


Index: Watchers.pm
===================================================================
RCS file: /proj/maps/cvsroot/rt/lib/RT/Watchers.pm,v
retrieving revision 1.1.2.6
retrieving revision 1.7
diff -u -b -r1.1.2.6 -r1.7
--- Watchers.pm 2001/04/02 16:25:12     1.1.2.6
+++ Watchers.pm 2001/03/16 16:56:20     1.7
@@ -176,13 +176,7 @@
 
 sub Emails  {
     my $self = shift;
-    my @list;    # List is a list of watcher email addresses
-
-    # $watcher is an RT::Watcher object
-    while (my $watcher=$self->Next()) {
-       push(@list, $watcher->Email);
-    }
-    return \@list;
+    [ map { $_->Email } @{$self->ItemsArrayRef} ];
 }
 # }}}

-- 
meow
_ivan




More information about the Rt-devel mailing list