Skip to content

Instantly share code, notes, and snippets.

View alranel's full-sized avatar
👨‍💻

Alessandro Ranellucci alranel

👨‍💻
View GitHub Profile
package DBIx::Lite::ResultSet::Role::Slave;
use strict;
use warnings;
use Role::Tiny;
around $_ => sub {
my ($ORIG, $self, @args) = @_;
local $self->{dbix_lite} = $self->{dbix_lite}->master;
return $self->$ORIG(@args);
} for qw(