miyagawa/cpanminus — Issue #138: Extra ENVvar needed to allow distinguishing from a smoker
Author: ribasushi
Created: 2011-12-11 09:27:01+00:00
State: open

We spoke about this on IRC earlier, I am just adding it here as placeholder.

```
miyagawa: it used to be (or maybe I am mistaken) that cpanm would set $ENV{PERL5_CPANM_IS_RUNNING} at all times
now it only does this at configure time, which makes it impossible to guess between a smoker and a cpanm run (both set AUTOMATED_TESTING)
ribasushi: i think you misremember - it's been like that always
miyagawa: so um - then is there a way to make this happen?
miyagawa: I often run more involved stuff on smokers, before my detector was
sub is_smoker { return ( $ENV{AUTOMATED_TESTING} && ! $ENV{PERL5_CPANM_IS_RUNNING} && ! $ENV{RELEASE_TESTING} ) }
ribasushi: i remember that discussion but i guess it has never worked like that
miyagawa: so what about adding some envvar or such so I *can* tell them apart?
miyagawa: or there is a specific reason you want to obscure this?
```

I am willing to submit a patch, but I am not sure which direction you want to go?

Example of why this is relatively important:
http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits/DBIx-Class.git;a=blob;f=t/zzzzzzz_perl_perf_bug.t;h=e0aad960dd6c557b8ef6804c0d3a7a6505bead40;hb=HEAD#l26

I do need to alert the user that his/her perl is fucked, but I do not want to get potential FAILs from actual smokers that chose to smoke this particular RH flavor.