ehdonhon has asked for the wisdom of the Perl Monks concerning the following question:

Hello,
I just started learning how to use CPANPLUS. This is probably an easy question, more than likely to be something where I neglected to RTFM. But, after going through the docs and even some of the source code, I'm left with the following question:

How do I specify what the address that will be used in the From: header of my reports will be? I have a number of machines that I would like to use for testing. Instead of having a bunch of reports each coming from root@machinename, I'd much rather that they all appear as coming from the address that I actually use on the cpan testers list. Is this possible?

  • Comment on Setting the From: address in CPANPLUS reports.

Replies are listed 'Best First'.
Re: Setting the From: address in CPANPLUS reports.
by Juerd (Abbot) on Jun 05, 2002 at 07:45 UTC

    This is possible by hacking the cpantest executable.

    - Yes, I reinvent wheels.
    - Spam: Visit eurotraQ.
    

      It's doable in an ugly way, but to do it the right way takes a bit more effort.

      To do it the ugly way, you just have to add the following line:

      $msg = new Mail::Send Subject => $subject, To => $CPAN_testers; $msg->add('From', 'me@example.com'); # add this line

      This is at line 244 of cpantest (at least for version 0.034).

      To do it the right way, you would have to store the email address in the CPANPLUS config hash, possibly using the installation's Config.pm $Config{perladmin} as a starting point, and patching the Makefile.PL to prompt for this as well. Easy to do, just need to find the time to do it I guess.


      print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u'
      So in other words, not really, though sorta. :-)
      ____________

      Makeshifts last the longest.