Indulge in some microoptimization
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / ResultSet.pm
index db6c27e..02cee66 100644 (file)
@@ -271,11 +271,10 @@ sub search {
   my $self = shift;
   my $rs = $self->search_rs( @_ );
 
-  my $want = wantarray;
-  if ($want) {
+  if (wantarray) {
     return $rs->all;
   }
-  elsif (defined $want) {
+  elsif (defined wantarray) {
     return $rs;
   }
   else {