skaji/cpm

Feature Request: Make -L, --local-lib-contained default to environment variable ${PERL_LOCAL_LIB_ROOT} if set

j1n3l0 opened this issue · 2 comments

Currently calling cpm install is equivalent to cpm install -L local. Is it possible to try ${PERL_LOCAL_LIB_ROOT} first, falling back to local if it's not set?

skaji commented

If you want to respect existing environment variables, use --global option.

My apologies. I think my feature request was not very clear or very incorrect.

I was more thinking of the fairly common practice of being able to set a value like that in:

  • a default value
  • a configuration file
  • the environment
  • a CLI option

With the latter alternative overriding earlier ones. So the default could remain as is but if I specified the something in a configuration file that would be preferred e.t.c.

My motivation stems from not using local as my default for -L, --local-lib-contained.

I appreciate that is a significant amount of work but I was just curious if it was something you had considered.

Thanks.