From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-5.6 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id C091020756 for ; Fri, 13 Jan 2017 16:59:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750843AbdAMQ7B (ORCPT ); Fri, 13 Jan 2017 11:59:01 -0500 Received: from dcvr.yhbt.net ([64.71.152.64]:45782 "EHLO dcvr.yhbt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750760AbdAMQ7A (ORCPT ); Fri, 13 Jan 2017 11:59:00 -0500 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 0300A20756; Fri, 13 Jan 2017 16:58:19 +0000 (UTC) Date: Fri, 13 Jan 2017 16:58:19 +0000 From: Eric Wong To: Johannes Schindelin Cc: Pat Pannuto , Junio C Hamano , Johannes Sixt , git@vger.kernel.org Subject: Re: [PATCH 2/2] Use 'env' to find perl instead of fixed path Message-ID: <20170113165819.GA6069@starla> References: <20170112055140.29877-1-pat.pannuto@gmail.com> <20170112055140.29877-3-pat.pannuto@gmail.com> <6fe462dd-929a-671b-a210-36ee38e99115@kdbg.org> <20170113024842.GA20572@starla> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Johannes Schindelin wrote: > I guess I do not understand, still, what the difference is between using > -w and adding `use warnings` *very early* in the script... Could you give > an example where it makes a difference? "use warnings" won't leak across files/modules. In the following example, only the "useless use of join or string in void context" from void.perl gets shown w/o -w. The VoidExample.pm warning can get lost. ----- VoidExample.pm ------ package VoidExample; use strict; # use warnings; # uncomment to trigger warning on next line: join('', qw(a b c)); 1; ------ void.perl ------ #!/usr/bin/perl use strict; use warnings; use VoidExample; join('', qw(a b c)); # warns ----------8<---------- $ perl -I . void.perl # 1 warning $ perl -w -I . void.perl # 2 warnings