def METHOD_NAME(self, state):
    dubbin = state.find_program('dub', silent=True)
    if dubbin.found():
        try:
            p, out = Popen_safe(dubbin.get_command() + ['--version'])[0:2]
            if p.returncode != 0:
                mlog.warning('Found dub {!r} but couldn\'t run it'
                             ''.format(' '.join(dubbin.get_command())))
                # Set to False instead of None to signify that we've already
                # searched for it and not found it
                dubbin = False
        except (FileNotFoundError, PermissionError):
            dubbin = False
    else:
        dubbin = False
    if dubbin:
        mlog.log('Found DUB:', mlog.bold(dubbin.get_path()),
                 '(%s)' % out.strip())
    else:
        mlog.log('Found DUB:', mlog.red('NO'))
    return dubbin