X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FReplicated%2FWithDSN.pm;h=b389ce20ea831c4e8d3df130815c51eff79e2189;hb=0bbe6676ded552fae69b1a4ca8110ee669245671;hp=50f4f8b6d6a6f64b1c29a2b17dc830cb429a987e;hpb=52b420dd006f55aced42c669f49182890b8826ea;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/Replicated/WithDSN.pm b/lib/DBIx/Class/Storage/DBI/Replicated/WithDSN.pm index 50f4f8b..b389ce2 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated/WithDSN.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated/WithDSN.pm @@ -1,12 +1,10 @@ package DBIx::Class::Storage::DBI::Replicated::WithDSN; -use Moose::Role; -use Scalar::Util 'reftype'; +use Try::Tiny qw(try); +use Scalar::Util (); +use Role::Tiny; requires qw/_query_start/; -use namespace::clean -except => 'meta'; -use Try::Tiny; - =head1 NAME DBIx::Class::Storage::DBI::Replicated::WithDSN - A DBI Storage Role with DSN @@ -39,7 +37,7 @@ around '_query_start' => sub { my $storage_type = $self->can('active') ? 'REPLICANT' : 'MASTER'; my $query = do { - if ((reftype($dsn)||'') ne 'CODE') { + if ((Scalar::Util::reftype($dsn)||'') ne 'CODE') { "$op [DSN_$storage_type=$dsn]$rest"; } elsif (my $id = try { $self->id }) { @@ -59,7 +57,7 @@ L =head1 AUTHOR -John Napiorkowski +John Napiorkowski =head1 LICENSE