<commit_before>find_package(Perl)
include (FindPerlLibs)

if(PERL_FOUND AND PERLLIBS_FOUND)

  # Some distributions install perl packages in vendor when shipped with the distro.
  # Let's make their lifes easier by offering an install flag for this usecase.
  if(PERL_VENDORINSTALL)
    set (PX_PERL_ARCH ${PERL_VENDORARCH})
    set (PX_PERL_LIB ${PERL_VENDORLIB})
  else()
    # PERL_SITEARCH is actually not defined in latest FindPerlLibs.cmake macros, thus
    # we have to find the correct path on our own.
    EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \$Config{sitearch}"
      OUTPUT_VARIABLE PX_PERL_ARCH)
    set (PX_PERL_LIB ${PERL_SITELIB})
  endif()

  add_subdirectory(lib)
  add_subdirectory(src)
  add_subdirectory(t)
endif()
<commit_msg>Enable VENDORARCH option and PX_PERL_ARCH override<commit_after>find_package(Perl)
include (FindPerlLibs)

if(PERL_FOUND AND PERLLIBS_FOUND)

  # Enable override of perl packge install directory.
  set(PX_PERL_ARCH ${PX_PERL_ARCH} CACHE PATH "Install directory for Perl package.")

  if(NOT PX_PERL_ARCH)
    # Some distributions install perl packages in vendor when shipped with the distro.
    # Let's make their lifes easier by offering an install flag for this usecase.
    option(PERL_VENDORINSTALL "Install Perl package in vendor directory" OFF)
    if(PERL_VENDORINSTALL)
      set (PX_PERL_ARCH ${PERL_VENDORARCH})
      set (PX_PERL_LIB ${PERL_VENDORLIB})
    else()
      # PERL_SITEARCH is actually not defined in latest FindPerlLibs.cmake macros, thus
      # we have to find the correct path on our own.
      EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \$Config{sitearch}"
        OUTPUT_VARIABLE PX_PERL_ARCH)
      set (PX_PERL_LIB ${PERL_SITELIB})
    endif()
  endif()

  add_subdirectory(lib)
  add_subdirectory(src)
  add_subdirectory(t)
endif()

{'fraction_non_alphanumeric': 0.07543103448275862, 'fraction_numerical': 0.0, 'mean_word_length': 4.41399416909621, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5601805', 'n_tokens_mistral': 657, 'n_tokens_neox': 649, 'n_words': 182}