Das liest sich bereits wie das Metaobjektprotokoll. Willst du das etwa neu schreiben?
perl -Moose=Foo -E'
has "midi" => (is => "rw");
my $f = Foo->new;
say "# has midi" if $f->meta->has_attribute("midi");
$f->meta->remove_attribute("midi");
say "# still has midi" if $f->meta->has_attribute("midi");
'
# has midi