Changeset 77c87b2 for perl/lib


Ignore:
Timestamp:
Oct 7, 2009, 5:05:57 PM (15 years ago)
Author:
Karl Ramm <kcr@1ts.org>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
1703f72
Parents:
dca3b27
git-author:
Karl Ramm <kcr@1ts.org> (10/07/09 17:00:01)
git-committer:
Karl Ramm <kcr@1ts.org> (10/07/09 17:05:57)
Message:
Strip trailing newlines from zsigs.

de3f6412cb0dc1b4e1044541558395c4c1fd807c caused a regression by not
dropping the trailing newline from the output of zsigproc.  Stripping
trailing newlines is generally a good thing, so let's do more of it.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl.pm

    rde3f641 r77c87b2  
    435435sub default_zephyr_signature
    436436{
    437   if (my $zsig = getvar('zsig')) {
    438     return $zsig;
     437  my $zsig = getvar('zsig');
     438  if (!$zsig && (my $zsigproc = getvar('zsigproc'))) {
     439    $zsig = `$zsigproc`;
     440  } elsif (!defined($zsig = get_zephyr_variable('zwrite-signature'))) {
     441    $zsig = ((getpwuid($<))[6]);
     442    $zsig =~ s/,.*//;
    439443  }
    440   if (my $zsigproc = getvar('zsigproc')) {
    441     return `$zsigproc`;
    442   }
    443   my $zwrite_signature = get_zephyr_variable('zwrite-signature');
    444   if (defined($zwrite_signature)) {
    445     return $zwrite_signature;
    446   }
    447   my $name = ((getpwuid($<))[6]);
    448   $name =~ s/,.*//;
    449   return $name;
     444  chomp($zsig);
     445  return $zsig;
    450446}
    451447
Note: See TracChangeset for help on using the changeset viewer.