From: John Napiorkowski Date: Wed, 9 Jul 2008 17:40:37 +0000 (+0000) Subject: use BUILDARGS intead of wrapping new, added make_immutable, removed unnneeded test... X-Git-Tag: v0.08240~402^2~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=150bda3538a5a7e52fff51b70d3cde283b35a7ef;p=dbsrgits%2FDBIx-Class.git use BUILDARGS intead of wrapping new, added make_immutable, removed unnneeded test, added some docs --- diff --git a/lib/DBIx/Class/Storage/DBI/Replicated.pm b/lib/DBIx/Class/Storage/DBI/Replicated.pm index 4790f9a..7dd1d0d 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated.pm @@ -415,6 +415,8 @@ inserted something and need to get a resultset including it, etc. =cut +use Benchmark; + sub execute_reliably { my ($self, $coderef, @args) = @_; @@ -422,6 +424,14 @@ sub execute_reliably { $self->throw_exception('Second argument must be a coderef'); } + my $t0 = new Benchmark; + my $clone = $self->clone; + my $t1 = new Benchmark; + my $td = timediff($t1, $t0); + warn "----------------- the code took:",timestr($td),"\n"; + + + ##Get copy of master storage my $master = $self->master;