sub _check_obj { my ($obj, @methods) = @_; for (@methods) { return unless $obj->can($_); } return 1; }