env:
  PATH: "${ROCK_PATH}/bin:${ROCK_PATH}/local/bin:${PATH}"
  PERL_LOCAL_LIB_ROOT: "${ROCK_PATH}/local"
  PERL_MB_OPT: "--install_base ${ROCK_PATH}/local"
  PERL_MM_OPT: "INSTALL_BASE=${ROCK_PATH}/local"
  PERL5LIB: "${ROCK_PATH}/lib:${ROCK_PATH}/lib/perl5/x86_64-linux:${ROCK_PATH}/local/lib/perl5"
  ROCK_CARTON_INSTALL: "install"
  ROCK_CARTON_INSTALL_DEPLOYMENT: "--verbose --no-color install --deployment"

build: |

  if [[ -f ./cpanfile ]]; then
    carton ${ROCK_CARTON_INSTALL}
  else
    warn 'no "cpanfile" file found'
  fi

build_deployment: |

  if [[ ! -f ./carton.lock ]]; then
    die 'no "carton.lock" file found'
  fi

  carton ${ROCK_CARTON_INSTALL_DEPLOYMENT}

test: |

  prove

clean: |

  if [[ -d ./local ]]; then
    rm -fr ./local
  fi

env:
  PATH: "${ROCK_PATH}/bin:${ROCK_PATH}/local/bin:${PATH}"
  PERL_LOCAL_LIB_ROOT: "${ROCK_PATH}/local"
  PERL_MB_OPT: "--install_base ${ROCK_PATH}/local"
  PERL_MM_OPT: "INSTALL_BASE=${ROCK_PATH}/local"
  PERL5LIB: "${ROCK_PATH}/lib:${ROCK_PATH}/lib/perl5/${PERL_ARCHNAME}:${ROCK_PATH}/local/lib/perl5"
  ROCK_CARTON_INSTALL: "install"
  ROCK_CARTON_INSTALL_DEPLOYMENT: "--verbose --no-color install --deployment"

build: |

  if [[ -f ./cpanfile ]]; then
    carton ${ROCK_CARTON_INSTALL}
  else
    warn 'no "cpanfile" file found'
  fi

build_deployment: |

  if [[ ! -f ./carton.lock ]]; then
    die 'no "carton.lock" file found'
  fi

  carton ${ROCK_CARTON_INSTALL_DEPLOYMENT}

test: |

  prove

clean: |

  if [[ -d ./local ]]; then
    rm -fr ./local
  fi

Use PERL_ARCHNAME in PERL5LIB paths
Use PERL_ARCHNAME in PERL5LIB paths
