9 years of perl and I somehow did not know that...
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / mysql.pm
index ae55f1f..3ace8e2 100644 (file)
@@ -5,7 +5,6 @@ use warnings;
 
 use base qw/DBIx::Class::Storage::DBI/;
 
-use List::Util 'first';
 use namespace::clean;
 
 __PACKAGE__->sql_maker_class('DBIx::Class::SQLMaker::MySQL');
@@ -69,7 +68,7 @@ sub _prep_for_execute {
     ) {
       # this is just a plain-ish name, which has been literal-ed for
       # whatever reason
-      $target_name = first { defined $_ } ($1, $2);
+      $target_name = (defined $1) ? $1 : $2;
     }
     else {
       # this is something very complex, perhaps a custom result source or whatnot