Re: cvs: CVSROOT / loginfo.pl
| From: | Sterling Hughes | Date: | Sat, 08 Sep 2001 18:55:52 +0000 |
| Subject: | Re: cvs: CVSROOT / loginfo.pl | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-7313@lists.php.net to get a copy of this message | ||
On Sat, 8 Sep 2001, Sascha Schumann wrote:
> > 3) chop() is not the same in PHP as in Perl, in Perl you'll be
> > wanting chomp() which removes all whitespace instead of just the
> > last character.
>
> Sterling, this script has not been written by some novice PHP
> programmers with no experience in Perl.
>
> Of course, the code was designed to use only one whitespace
> character, and thus chop is perfectly fine.
>
I'm not saying it was -- there are too many Perl 4'ism for it to be
written by a PHP programmer. chomp is just a safer tool, you'll
rarely find chop (another one of those Perl 4'isms) used anymore in
Perl code.
> > 4) statement if statement, not statement if (statement) is the
> > generally agree'd upon idiom (as far as I can see).
>
> You might want to review what you commit first.
>
> -exit 0 if(fork() ne 0);
> +exit 0 if fork() ne 0;
>
There is nothing wrong with that, except it should be:
exit 0 if fork() != 0;
or
exit 0 unless fork();
Or since, 0 is implied, if you want to improve your golf score, the
best way would probably be:
exit unless fork();
or
# Fewest characters highest golf score
exit if !fork();
perldoc -f exit
> > And finally, we should really be using MIME::Lite to construct the
> > message, does anyone have any objections to me switching to use
> > this?
>
> As long as it does not break..
>
> [reading a couple more emails]
>
> The latest CVS commit messages I saw are broken.
>
Yep, and in an odd way, I'm hoping MIME::Lite will fix that:
When committing to the adt branch (with the revisions), everything
works fine, ie, the subject is set properly. When commiting to the
other branches, while the subject was set properly (in the actual
code, I tested this) it was not displayed properly in the messages.
Meanwhile, I've gotta set up a local test environment :)
-Sterling