develooper Front page | perl.perl5.porters | Postings from January 2013

Re: [perl #116543] [PATCH] Clean up warnings in toke.c

Thread Previous
From:
Peter Martini
Date:
January 26, 2013 17:28
Subject:
Re: [perl #116543] [PATCH] Clean up warnings in toke.c
Message ID:
CAFyW6MRJsC_VfhpvdYRnVAzpEx9Vuk4jiwxneDgvz2+0rNk5Hg@mail.gmail.com
On Sat, Jan 26, 2013 at 12:04 PM, bulk88 via RT
<perlbug-followup@perl.org> wrote:
>
> Why are const char arrays and const char * consts being used instead of
> string literals? Git blame says
> http://perl5.git.perl.org/perl.git/commit/8903cb82b09fb34870c757f52ce481b09be4b606?f=toke.c
> by Chip Salzenberg in 1997 added "Identifier too long". Just curious.
>
> --
> bulk88 ~ bulk88 at hotmail.com

I imagine for maintainability - the same warning is displayed in half
a dozen places, so rather than copy and paste the message it was
declared once and referenced everywhere.

I kind of like it in the sense that it could make it easier to
localize the error message in the future.  Another project for another
year, I think; moving all of the literal warnings and format strings
into a single localizable table of strings.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About