From: Jeff King Date: Thu, 30 Sep 2010 14:52:18 GMT Subject: Re: [PATCH 00/16] git-send-email cleanups Message-ID: <20100930145218.GB32728@sigill.intra.peff.net> In-Reply-To: <18E0A903-D625-4C7A-A575-AC5C5EF448C9@gernhardtsoftware.com> On Thu, Sep 30, 2010 at 10:30:31AM -0400, Brian Gernhardt wrote: > > send-email: get_patch_subject doesn't need a prototype > > send-email: file_declares_8bit_cte doesn't need a prototype > > send-email: unique_email_list doesn't need a prototype > > send-email: cleanup_compose_files doesn't need a prototype > > None of these subroutines strictly need the prototype, but it does > allow Perl to warn us if we send incorrect arguments. Why remove > them? Are they causing problems somewhere? They don't necessarily do what you want: perl -e 'sub want_scalar($) { print "got $_[0]\n" } want_scalar("ok"); my @a = qw(totally broken); want_scalar(@a); ' I get: got ok got 2 And using "sub want_list(@)" basically does nothing at all (you can pass nothing, a scalar, or a list). For more details, read: http://www.perlmonks.org/?node_id=861966 (If you're impatient, skip to the section "Problems with Regular Prototypes"). -Peff