>>>>> On Thu, 03 Dec 2009 20:50:24 -0600, brian d foy <brian.d....@gmail.com> 
>>>>> said:

  > Localizing $CPAN::Distrostatus::something_has_failed_at seems to
  > decouple calls to install() when I don't want them to know about each 
  > other, and halt_on_failure still works as far as I can tell:

  >    DISTRO: foreach my $distro ( @distros ) {
  >       local $CPAN::Distrostatus::something_has_failed_at;

Darn. Now I got it. The thing is that the interactive user gets the FAIL
condition reset by the counter $CPAN::CurrentCommandId that increments
in CPAN.pm, line 423. The programmer does not get this service and
that's how you were trapped:-(

  > I don't particularly like that as a permanent solution, but it's a fine
  > one until the holidays are over.

Could we bring this into CPAN::Shell::rematein? Would this solve it:

  sub rematein {
      my $self = shift;
+     local $CPAN::CurrentCommandId = $CPAN::CurrentCommandId;

? I'm tempted to believe it would and I'll try it for now. I have not
yet constructed a test case, so this is a blind shot.

  > I think there's room for improvement in Distrostatus, but I'll think
  > about that later and maybe finish my half a patch.

I've reverted your previous patch (the s/NO/NA/ one). I'll put the
tentative fix above in, too, to see what else it breaks.

Thanks!
-- 
andreas

Reply via email to