Mooify SQLT::Schema
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Schema / Role / Error.pm
1 package SQL::Translator::Schema::Role::Error;
2 use Moo::Role;
3
4 has error => (is => 'rw', default => sub { '' });
5
6 around error => sub {
7     my ($orig, $self) = (shift, shift);
8
9     return $self->$orig unless @_;
10     $self->$orig(ref($_[0]) ? $_[0] : join('', @_));
11     return undef;
12 };
13
14 1;