git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH V3] git-send-email.perl: Add --to-cmd

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 24, 2010, 16:47 UTC
Message-ID
<AANLkTinGZ1H3ODYwRhvzya_UkA8t2QTW7cEyjb2Hx_7M@mail.gmail.com>
In-Reply-To
<1285344394.11616.23.camel@Joe-Laptop>
On Fri, Sep 24, 2010 at 16:06, Joe Perches <joe@perches.com> wrote:
Show 10 quoted lines
> On Fri, 2010-09-24 at 08:32 -0700, Jakub Narebski wrote:
>> Joe Perches <joe@perches.com> writes:
>> > +# Execute a command (ie: $to_cmd) to get a list of email addresses
>> > +# and return a results array
>> > +sub recipients_cmd(@) {
>> Do not use subroutine prototypes: they do not do what you think they
>> do.  In this case using prototype is unnecessary and can be dangerous.
>
> It can be removed.  I was following the form of the
> other returned array in the code.

While we generally follow the rule that you should use the style of the existing code, I think resaonable to discard that when the surrounding code with less than wizard-level understanding of the language.

In any case most of git-send-email.perl doesn't use prototypes, it's just 2-3 subs out of ~30.

Previous: Joe PerchesNext: Joe Perches
Message 13 of 15 in “Re: threaded patch series”
  1. Joe PerchesSep 23, 2010
  2. sit-send-email.pl: Add --to-cmdJoe Perches, Sep 23, 2010
  3. Ævar Arnfjörð BjarmasonSep 23, 2010
  4. Joe PerchesSep 23, 2010
  5. Ævar Arnfjörð BjarmasonSep 23, 2010
  6. git-send-email.perl: Add --to-cmdJoe Perches, Sep 23, 2010
  7. matt mooneySep 23, 2010
  8. Junio C HamanoSep 23, 2010
  9. Ævar Arnfjörð BjarmasonSep 23, 2010
  10. git-send-email.perl: Add --to-cmdJoe Perches, Sep 24, 2010
  11. Jakub NarebskiSep 24, 2010
  12. Joe PerchesSep 24, 2010
  13. Ævar Arnfjörð BjarmasonSep 24, 2010
  14. git-send-email.perl: Add --to-cmdJoe Perches, Sep 24, 2010
  15. Joe PerchesSep 24, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.