<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Folks,<br>
    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>
    <br>
    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>
    <blockquote>
      <pre>foreach $i ("a".."z") {
...
</pre>
    </blockquote>
    and so ignore the fulldirhash-ed directories.<br>
    <br>
    Also, most of the Perl scripts still have this sort of baggage:<br>
    <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>
    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>
    <br>
    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>
    <br>
    Cheers,<br>
        -nic<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 Road, Suite 24           v. 414.272.4477
Milwaukee, Wisconsin  53213-4073
</pre>
  </body>
</html>