<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Bron,<br>
    I'll agree that there are good reasons to keep this part (i.e.
    systems sans shebang):<br>
    <blockquote>
      <pre>exec perl -x -S $0 ${1+"$@"} # -*-perl-*-</pre>
    </blockquote>
    Or even to keep the second chunk, which searches for a Perl 5
    interpreter:<br>
    <blockquote>
      <pre>if ($] !~ /^5\..*/) {
  # uh-oh. this isn't perl 5.
  foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
    exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
  }
  # we failed. bail.
  die "Your perl is too old; I need perl 5.\n";
}
</pre>
    </blockquote>
    But my argument in re: Perl5 being over 20 years old bears on that.<br>
    <br>
    The ugly, gnarly part is the final eval blob to protect potential
    Perl 4 users.  <br>
    <blockquote>
      <pre># load the real script. this is isolated in an 'eval' so perl4 won't
# choke on the perl5-isms.
eval join("\n", <DATA>);
if ($@) { die "$@"; }

__END__
</pre>
    </blockquote>
    And it's unnecessary given that the next line is:<br>
    <blockquote>
      <pre>require 5;
</pre>
    </blockquote>
    That eval's the thing which bullocks up the syntax highlighters and
    tends to confuse idle readers.<br>
    <br>
    How about we keep the former and ditch the latter?<br>
        -nic<br>
    <br>
    <div class="moz-cite-prefix">On 01/12/2017 10:54 PM, Bron Gondwana
      via Cyrus-devel wrote:<br>
    </div>
    <blockquote
cite="mid:1484283247.1659041.846324960.71E930E6@webmail.messagingengine.com"
      type="cite">
      <title></title>
      <div style="font-family:Arial;">It's there because lots of people
        on non-Linux systems have their perl in somewhere other than
        /usr/bin.  It is annoying for syntax highlighting, though we
        could work around that with some build magic.<br>
      </div>
      <div style="font-family:Arial;"><br>
      </div>
      <div style="font-family:Arial;">It works fine, there's no reason
        to remove it.<br>
      </div>
      <div style="font-family:Arial;"><br>
      </div>
      <div style="font-family:Arial;">The rehash stuff no the other
        hand, yeah - those scripts should be fixed.  I don't have time
        to do it today before the rc though!<br>
      </div>
      <div style="font-family:Arial;"><br>
      </div>
      <div style="font-family:Arial;">Bron.<br>
      </div>
      <div><br>
      </div>
      <div>On Fri, 13 Jan 2017, at 10:30, ellie timoney via Cyrus-devel
        wrote:<br>
      </div>
      <blockquote type="cite">
        <div>I'm 100% in favour of discarding the "exec perl" hack --
          solely because it confuses syntax highlighting something
          fierce :P<br>
        </div>
        <div><br>
        </div>
        <div>But I have no particular familiarity with its historical
          context, so can't reliably evaluate whether it's still needed
          for some obscure reason<br>
        </div>
        <div><br>
        </div>
        <div>On Fri, Jan 13, 2017, at 06:08 AM, Nic Bernstein via
          Cyrus-devel wrote:<br>
        </div>
        <blockquote type="cite">
          <div>Folks,<br>
          </div>
          <div>I've been working on an upgrade from 2.4.18 to 3.0.0rc1,
            and simultaneously adding to Nicola's fine Upgrading
            document.  Along the way, however, I've encountered several
            anomalies with the wide assortment of Perl scripts
            accumulated in cyrus-imapd/tools.  There's a lot of them,
            they often overlap and sometimes don't inter-operate.<br>
          </div>
          <div><br>
          </div>
          <div>For example, 'rehash' understands the 'fulldirhash'
            setting, but 'dohash' does not.  Furthermore, that setting,
            when processed by 'rehash', results in directories named "A"
            - "Z", but most of the other tools, such as 'translatesieve'
            or 'upgradesieve' (why so many?) explicitly expect these to
            be lower cased, "a" - "z":<br>
          </div>
          <div><br>
          </div>
          <blockquote>
            <pre>foreach $i ("a".."z") {
...

</pre>
          </blockquote>
          <div>and so ignore the fulldirhash-ed directories.<br>
          </div>
          <div><br>
          </div>
          <div>Also, most of the Perl scripts still have this sort of
            baggage:<br>
          </div>
          <div><br>
          </div>
          <blockquote>
            <pre>exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
...
if ($] !~ /^5\..*/) {
  # uh-oh. this isn't perl 5.
  foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
    exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
  }
  # we failed. bail.
  die "Your perl is too old; I need perl 5.\n";
}

# load the real script. this is isolated in an 'eval' so perl4 won't
# choke on the perl5-isms.
eval join("\n", <DATA>);
if ($@) { die "$@"; }

__END__
require 5;
...

</pre>
          </blockquote>
          <div>Given that Perl5 was released over twenty years ago, do
            we really need this, as opposed to say, "#!/usr/bin/perl
            -w"?  Hell, we could even parameterize that and substitute
            with @PERL@?<br>
          </div>
          <div><br>
          </div>
          <div>Just asking, because one needs a tool such as
            translatesieve to handle the transition to
            ``unixhierarchysep: yes'', and as it sits, that tool won't
            work.  I'm happy to fix it, but would like guidance on how
            far to go.<br>
          </div>
          <div><br>
          </div>
          <div>Cheers,<br>
          </div>
          <div>    -nic<br>
          </div>
          <div><br>
          </div>
          <pre>-- 
Nic Bernstein                             <a moz-do-not-send="true" href="mailto:nic@onlight.com">nic@onlight.com</a>
Onlight, Inc.                             <a moz-do-not-send="true" href="http://www.onlight.com">www.onlight.com</a>
6525 W Bluemound Road, Suite 24           v. 414.272.4477
Milwaukee, Wisconsin  53213-4073

</pre>
          <p>Email had 1 attachment:<br>
          </p>
          <ul>
            <li>
              <div><code>nic.vcf</code><br>
              </div>
              <div>  1k (text/x-vcard)<br>
              </div>
            </li>
          </ul>
        </blockquote>
        <div><br>
        </div>
      </blockquote>
      <div style="font-family:Arial;"><br>
      </div>
      <div id="sig567075">
        <div class="signature">--<br>
        </div>
        <div class="signature">  Bron Gondwana<br>
        </div>
        <div class="signature">  <a class="moz-txt-link-abbreviated" href="mailto:brong@fastmail.fm">brong@fastmail.fm</a><br>
        </div>
        <div class="signature"><br>
        </div>
      </div>
      <div style="font-family:Arial;"><br>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Nic Bernstein                             <a class="moz-txt-link-abbreviated" href="mailto:nic@onlight.com">nic@onlight.com</a>
Onlight Inc.                              <a class="moz-txt-link-abbreviated" href="http://www.onlight.com">www.onlight.com</a>
6525 W Bluemound Rd., Ste 24              v. 414.272.4477
Milwaukee, Wisconsin  53213-4073          f. 414.290.0335
</pre>
  </body>
</html>