    if [ ! -s "$dist_tarball" ]; then
        echo "Distribution tarball '$dist_tarball' empty or non-existent."
        exit 1
    fi

    tar -xzf "$dist_tarball"
    cd "${dist_tarball%.tar.gz}"

    if [ -f Build.PL ]; then
        perl Build.PL
        perl ./Build
        perl ./Build test