use namespace::clean w/ Try::Tiny
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / SQLAnywhere.pm
index 38a1775..5d9170d 100644 (file)
@@ -5,6 +5,8 @@ use warnings;
 use base qw/DBIx::Class::Storage::DBI::UniqueIdentifier/;
 use mro 'c3';
 use List::Util ();
+use Try::Tiny;
+use namespace::clean;
 
 __PACKAGE__->mk_group_accessors(simple => qw/
   _identity
@@ -42,7 +44,7 @@ sub insert {
   my ($source, $to_insert) = @_;
 
   my $identity_col = List::Util::first {
-      $source->column_info($_)->{is_auto_increment} 
+      $source->column_info($_)->{is_auto_increment}
   } $source->columns;
 
 # user might have an identity PK without is_auto_increment
@@ -115,7 +117,7 @@ sub build_datetime_parser {
   my $self = shift;
   my $type = "DateTime::Format::Strptime";
   try {
-    eval "use ${type}"
+    eval "require ${type}"
   }
   catch {
     $self->throw_exception("Couldn't load ${type}: $_");