Date: Tue, 20 Feb 2001 16:19:43 +0200 From: Peter Pentchev <roam@orbitel.bg> To: Dag-Erling Smorgrav <des@ofug.org> Cc: Neil Blakey-Milner <nbm@FreeBSD.org>, Tony Finch <dot@dotat.at>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: ports/Tools/scripts/mkptools mkpbuild mkpinstall Message-ID: <20010220161943.B47687@ringworld.oblivion.bg> In-Reply-To: <xzp8zn1jwj1.fsf@flood.ping.uio.no>; from des@ofug.org on Tue, Feb 20, 2001 at 02:48:02PM %2B0100 References: <200101031116.f03BGlq39072@freefall.freebsd.org> <20010103141000.B54743@ringworld.oblivion.bg> <20010103142157.D54743@ringworld.oblivion.bg> <20010220152313.A47687@ringworld.oblivion.bg> <xzp8zn1jwj1.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 20, 2001 at 02:48:02PM +0100, Dag-Erling Smorgrav wrote: > Peter Pentchev <roam@orbitel.bg> writes: > > +my $path_tmp = "/tmp"; > > +eval { > > + require 'paths.ph'; > > + $path_tmp = &_PATH_TMP; > > +}; > > There's no point in using eval if you're not going to handle the case > where the 'require' fails. Either remove the eval { } or, add some > sort of error handling (conditional on $@ being defined). I just want the thing not to die when the require fails, e.g. paths.ph is not there. The 'error handling' has already been done higher up - $path_tmp is initialized to a fall-back value of "/tmp". G'luck, Peter -- I had to translate this sentence into English because I could not read the original Sanskrit. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010220161943.B47687>