All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Wong <e@80x24.org>
Cc: Pat Pannuto <pat.pannuto@gmail.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Johannes Sixt <j6t@kdbg.org>,
	git@vger.kernel.org
Subject: Re: [PATCH 2/2] Use 'env' to find perl instead of fixed path
Date: Fri, 13 Jan 2017 10:27:54 -0800	[thread overview]
Message-ID: <xmqq4m12izmd.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170113024842.GA20572@starla> (Eric Wong's message of "Fri, 13 Jan 2017 02:48:42 +0000")

Eric Wong <e@80x24.org> writes:

> Pat Pannuto <pat.pannuto@gmail.com> wrote:
>> You may still want the 1/2 patch in this series, just to make things
>> internally consistent with "-w" vs "use warnings;" inside git's perl
>> scripts.
>
> No, that is a step back.  "-w" affects the entire process, so it
> spots more potential problems.  The "warnings" pragma is scoped
> to the enclosing block, so it won't span across files.

OK, so with "-w", we do not have to write "use warnings" in each of
our files to get them checked.  It is handy when we ship our own
libs (e.g. Git.pm) that are used by our programs.

If something we write outselves trigger a false-positive, we can
work it around with "no warnings;" in the smallest block that
encloses the offending code in the worst case, or just rephrase it
in a way that won't trigger a false-positive.

If something we _use_ from a third-party is not warnings-clean,
there is no easy way to squelch them if we use "-w", which is a
potential downside, isn't it?  I do not know how serious a problem
it is in practice.  I suspect that the core package we use from perl
distribution are supposed to be warnings-clean, but we use a handful
of things from outside the core and I do not know what state they
are in.

  parent reply	other threads:[~2017-01-13 18:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12  5:51 [PATCH 0/2] Use env for all perl invocations Pat Pannuto
2017-01-12  5:51 ` [PATCH 1/2] Convert all 'perl -w' to 'perl' + 'use warnings;' Pat Pannuto
2017-01-12  5:51 ` [PATCH 2/2] Use 'env' to find perl instead of fixed path Pat Pannuto
2017-01-12  6:27   ` Johannes Sixt
2017-01-12  7:17     ` Pat Pannuto
2017-01-12 10:21       ` Johannes Schindelin
2017-01-12 20:40         ` Junio C Hamano
2017-01-12 21:01           ` Pat Pannuto
2017-01-12 21:49             ` Junio C Hamano
2017-01-13  2:48             ` Eric Wong
2017-01-13 15:27               ` Johannes Schindelin
2017-01-13 16:58                 ` Eric Wong
2017-01-13 17:13                   ` Johannes Schindelin
2017-01-13 18:27               ` Junio C Hamano [this message]
2017-01-13 18:52                 ` Eric Wong
2017-01-13 20:01                   ` Junio C Hamano
2017-01-13 21:39                     ` Eric Wong
2017-01-14  7:54                   ` Jeff King
2017-01-14 10:31                     ` Eric Wong
2017-01-14 21:57                       ` brian m. carlson
2017-01-13 15:21             ` Johannes Schindelin
2017-01-12  6:21 ` [PATCH 0/2] Use env for all perl invocations Junio C Hamano
2017-01-12  7:13   ` Pat Pannuto
2017-01-12  8:21     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq4m12izmd.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=e@80x24.org \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=pat.pannuto@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.