def METHOD_NAME(pkg: PackageMaker, fields: dict[str, Any]) -> tuple[str, PackageMaker]:
    distribution = _as_str(fields['distribution'])
    pkg.add_name(distribution, NameType.CPAN_NAME)
    version = _as_str(fields['version'])
    pkg.set_version(version)
    author = _as_maybe_str(fields['author'])
    if author:
        pkg.add_maintainers(author.lower() + '@cpan')
    pkg.add_licenses(_as_list(fields['license']))
    pkg.set_summary(_as_maybe_str(fields.get('abstract')))
    pkg.add_homepages(_as_maybe_str(fields.get('resources.homepage')))
    pkg.add_downloads(_as_list(fields.get('download_url')))
    name = _as_str(fields['name'])
    if version not in name:
        pkg.set_flags(PackageFlags.UNTRUSTED)
    return distribution, pkg