Subject: bug#5064 closed by [email-masked] (reply to [email-masked], [email-masked]) (Bug#558428: mention that perl can't deal with certain one letter subroutines)

From: [email-masked] (Emacs bug Tracking System)
Date: Sat, 28 Nov 2009 20:40:07 +0000

This is an automatic notification regarding your bug report
which was filed against the emacs package:

#5064: 23.1.50; perl mode coloring gone if subroutine name is one letter long

It has been closed by [email-masked] (reply to [email-masked], [email-masked]).

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact [email-masked] (reply to [email-masked], [email-masked]) by
replying to this email.

-- 
5064: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5064
Emacs Bug Tracking System
Contact [email-masked] with problems

Subject: Bug#558428: mention that perl can't deal with certain one letter subroutines
From: [email-masked]
To: [email-masked]
Date: Sun, 29 Nov 2009 04:23:07 +0800

X-debbugs-cc: [email-masked], [email-masked]
Package: perl-doc
Version: 5.10.1-8
Severity: wishlist
File: /usr/share/man/man1/perlsub.1.gz
Tags: upstream

Dear Perl guys: On the perlsub man page, please mention near:

       Subroutines whose names are in all upper case are reserved to the
       Perl core, as are modules whose names are in all lower case.

that sub m {...}
won't work too.

SM> Actually, the problem is not really that it's only one letter, but that
SM> it's the "keyword" m, used for matching (as in "m/regexp/").  Of course
SM> the same can happen with other keywords like "s", "tr", "y", "q", "qx",
SM> and various others.

Subject: 23.1.50; perl mode coloring gone if subroutine name is one letter long
From: [email-masked]
To: [email-masked]
Date: Sat, 28 Nov 2009 09:41:40 +0800

Gentlemen, consider the following perl subroutines.
Notice how the latter has all its coloring gone, just because it starts
with one letter. (perl-mode)^X^E

sub max {
    my $max = shift(@_);
    foreach $foo (@_) {
        $max = $foo if $max < $foo;
    }
    return $max;
}
sub m {
    my $max = shift(@_);
    foreach $foo (@_) {
        $max = $foo if $max < $foo;
    }
    return $max;
}