package App::IdiotBox::Clonable;

use Moo::Role;

sub clone {
	my $obj = shift;

	my $class = ref $obj;

	my %copy;

	for my $f ($obj->fields) {
		$copy{$f} = $obj->$f,
	};

	return bless \%copy, $class;
}

1;
