From owner-freebsd-perl@FreeBSD.ORG Sun Jan 30 04:51:44 2005 Return-Path: Delivered-To: freebsd-perl@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43FDF16A4CE; Sun, 30 Jan 2005 04:51:44 +0000 (GMT) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03DA043D1F; Sun, 30 Jan 2005 04:51:44 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 1B59B5DE5; Sat, 29 Jan 2005 23:51:43 -0500 (EST) Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 52290-09; Sat, 29 Jan 2005 23:51:41 -0500 (EST) Received: from [192.168.1.3] (pool-68-161-114-38.ny325.east.verizon.net [68.161.114.38]) by pi.codefab.com (Postfix) with ESMTP id 5D42A5DC6; Sat, 29 Jan 2005 23:51:41 -0500 (EST) Message-ID: <41FC67D8.2020609@mac.com> Date: Sat, 29 Jan 2005 23:51:36 -0500 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew McNaughton References: <20050129202425.GA56998@heechee.tobez.org> <20050129220905.46ab86ae.lehmann@ans-netz.de> <41FBFDD9.7070605@mac.com> <20050130162753.D9021@a2.scoop.co.nz> In-Reply-To: <20050130162753.D9021@a2.scoop.co.nz> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at codefab.com cc: perl@freebsd.org cc: freebsd-stable@freebsd.org cc: freebsd-ports@freebsd.org Subject: Re: [HEADS UP] perl symlinks in /usr/bin will be gone X-BeenThere: freebsd-perl@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: maintainer of a number of perl-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jan 2005 04:51:44 -0000 Andrew McNaughton wrote: > On Sat, 29 Jan 2005, Chuck Swiger wrote: [ ... ] >> Well-behaved 3rd party scripts ought to start Perl via: >> >> #! /usr/bin/env perl >> >> ...so long as /usr/local/bin is in the $PATH, they should still work >> fine. > > I commonly use this approach, but I run into some problems with flags. > Probably a simple gotcha someone can help with. > > Eg the following useful constructs don't work: > > #!/usr/bin/env perl -p > #!/usr/bin/env perl -T > #!/usr/bin/env perl -w See "man perlrun" for some additional suggestions (and caveats), as it gives examples for passing -p to perl when invoked via /usr/bin/env or /bin/sh. You might also try putting a "--" between the 'env' and the 'perl' to indicate the end of command-line option processing to env. It's possible that taint mode cannot be invoked this way (as that needs to be set very early on), though. There also seems to exist a PERL5OPT variable which could be set like so: #!/usr/bin/env PERL5OPT='-w' perl This should support -T, too, only it will zap any additional args specified afterwards (or so the docs say)... -- -Chuck