From: Jeff King Date: Wed, 02 Jul 2008 08:02:01 GMT Subject: Re: [PATCH] git-add--interactive: manual hunk editing mode Message-ID: <20080702080200.GA21367@sigill.intra.peff.net> In-Reply-To: <7v7ic4hmj5.fsf@gitster.siamese.dyndns.org> On Tue, Jul 01, 2008 at 10:39:58PM -0700, Junio C Hamano wrote: > > +use File::Temp; > > People with minimum Perl installation should still be able to use "add -i" > as long as they do not use 'e' subcommand, shouldn't they? Shouldn't we > do something like: > > my $can_use_temp = eval { > require File::Temp; > 1; > }; > > and disable 'e' subcommand unless $can_use_temp? According to Module::CoreList, File::Temp has shipped as part of core perl since 5.006001. "add -i" doesn't work with perl < 5.6 already due to things like 3-argument open. So if the problem is "old perl", I don't think it is an issue. Are there modern perl installations in the wild that don't have File::Temp? -Peff