From mike.gabriel@das-netzwerkteam.de  Mon Jan  5 16:22:43 2015
Received: (at 715) by bugs.x2go.org; 5 Jan 2015 15:22:44 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED
	autolearn=ham version=3.3.2
Received: from freya.das-netzwerkteam.de (freya.das-netzwerkteam.de [88.198.48.199])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 1B0315DB48
	for <715@bugs.x2go.org>; Mon,  5 Jan 2015 16:22:43 +0100 (CET)
Received: from grimnir.das-netzwerkteam.de (grimnir.das-netzwerkteam.de [78.46.204.98])
	by freya.das-netzwerkteam.de (Postfix) with ESMTPS id A15CB1307;
	Mon,  5 Jan 2015 16:22:42 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
	by grimnir.das-netzwerkteam.de (Postfix) with ESMTP id 95B393C86B;
	Mon,  5 Jan 2015 16:22:42 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at grimnir.das-netzwerkteam.de
Received: from grimnir.das-netzwerkteam.de ([127.0.0.1])
	by localhost (grimnir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id dX4i8l9nBPHg; Mon,  5 Jan 2015 16:22:42 +0100 (CET)
Received: from grimnir.das-netzwerkteam.de (localhost [127.0.0.1])
	by grimnir.das-netzwerkteam.de (Postfix) with ESMTPS id 749F53C862;
	Mon,  5 Jan 2015 16:22:42 +0100 (CET)
Received: from listrac.informatik.uni-kiel.de
 (listrac.informatik.uni-kiel.de [134.245.252.114]) by
 mail.das-netzwerkteam.de (Horde Framework) with HTTP; Mon, 05 Jan 2015
 15:22:42 +0000
Date: Mon, 05 Jan 2015 15:22:42 +0000
Message-ID: <20150105152242.Horde.7brnmUBgc6vG4pA8A_6Wjg9@mail.das-netzwerkteam.de>
From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
To: Michael DePaulo <mikedep333@gmail.com>
Cc: 715@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#715: Proposed patch
References: <CAMKht8iVc1bCg3BJ1Qg=CDtE+kSKYBeUFwT6JBS7Ou9m5PS2gw@mail.gmail.com>
 <20150105101334.Horde.2WQ_Ieu5pzXhDeMONJTlrg1@mail.das-netzwerkteam.de>
 <CAMKht8jgREGEjvu9pD6guspfzSQe9djxaEM_SMSAptJqB16_tg@mail.gmail.com>
In-Reply-To: <CAMKht8jgREGEjvu9pD6guspfzSQe9djxaEM_SMSAptJqB16_tg@mail.gmail.com>
User-Agent: Internet Messaging Program (IMP) H5 (6.2.2)
Accept-Language: en,de
Organization: DAS-NETZWERKTEAM
X-Originating-IP: 134.245.252.114
X-Remote-Browser: Mozilla/5.0 (X11; Linux i686; rv:33.0) Gecko/20100101
 Firefox/33.0 Iceweasel/33.1
Content-Type: multipart/signed; boundary="=_EiJqtWtkPxsHzj0G_oKmfA7";
 protocol="application/pgp-signature"; micalg=pgp-sha1
MIME-Version: 1.0

This message is in MIME format and has been PGP signed.

--=_EiJqtWtkPxsHzj0G_oKmfA7
Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Michael,

On  Mo 05 Jan 2015 14:29:18 CET, Michael DePaulo wrote:

> Hi Mike#1,
>
> On Mon, Jan 5, 2015 at 5:13 AM, Mike Gabriel
> <mike.gabriel@das-netzwerkteam.de> wrote:
>> Hi Michael,
>>
>>
>> On  Mo 05 Jan 2015 05:12:04 CET, Michael DePaulo wrote:
>>
>>> Tags: patch
>>>
>>> I would like someone who knows Perl better, such as theUser2, to
>>> review this patch.
>>>
>>> Although this is a very small patch, theUser2 advised me to be careful
>>> when creating full paths.
>>>
>>> I tested it successfully under CentOS 5 and CentOS 6.
>>>
>>> I intended to use "make_path" instead of "mkpath" if File::Path 2.06
>>> or later was detected. However, I could not figure out how to write a
>>> statement like "use File::Path( make_path)" if File::Path->VERSION is
>>> 2.06 or later. Specifically, it appears that "use" statements are
>>> executed at compile time in Perl, so they cannot be used within an if
>>> block. And I cannot just specify "use File::Path" for all versions of
>>> File::Path because "make_path" is not exported by default.
>>>
>>> EPEL 5:
>>> http://perldoc.perl.org/5.8.8/File/Path.html
>>>
>>> EPEL 6:
>>> http://perldoc.perl.org/5.10.1/File/Path.html
>>>
>>> Latest:
>>> http://perldoc.perl.org/File/Path.html
>>
>>
>> I recommend a more conditional approach testing the existence of the
>> make_path (and the mkpath) function during runtimed using the "defined"
>> command.
>>
>> See:
>> http://stackoverflow.com/questions/433752/how-can-i-determine-if-a-perl-=
function-exists-at-runtime
>>
>> Mike
> [...]
>
> I will follow that advice for runtime, but I still need to figure out
> what to do at compile time.
>
> http://perldoc.perl.org/functions/use.html
> "Because use takes effect at compile time, it doesn't respect the
> ordinary flow control of the code being compiled. In particular,
> putting a use inside the false branch of a conditional doesn't prevent
> it from being processed."

Ah, ok.

Simply import (use) the complete File::Path package (use File::Path)=20=20
and=20reference the make_path and the mkpath function under its full=20=20
package+function=20name (i.e. "File::Path::make_path", e.g.).

Mike



--=20

DAS-NETZWERKTEAM
mike=20gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.x=
fb

--=_EiJqtWtkPxsHzj0G_oKmfA7
Content-Type: application/pgp-signature
Content-Description: Digitale PGP-Signatur
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAABAgAGBQJUqqxCAAoJEJr0azAldxsxWT4P/3HQTTksf0koNXNEd195Wluv
yhafPW47QDvNYMate9vk1O3dDUTu1ZA5qALdZsKBZ/JHv48kIpwNQddNaiaqFHUh
Pl57jSWX2J4qRIODFlcfbpMIq423Tq9Ae/mRBMC9cGCqIdaFKshfcY+Ab88Aa4Wm
MMEcXMom8S1IQFHM1W3Dw5MTbwQTO1LsbH5UdAT08SFIvH7EmTpB2HBbQKXFq1dQ
lFBfH/nWUtFxCCy8eafh2mJQXU3/feUPBrcUCIABeuL3qNcFTvLRtFcbPaFhHR+R
F6wye6wMl6pDYO97T+44Wo6NqHwZX1uEd1xfz2e8bn509RhCnLrenOzkvj6/guqP
upDByjlpuR/J6U6g9v9DqACPqtlKxHNtuaVUryalhQ1BLh7qctV03jZOwzIQTege
RfvEBOE8F9Y664MjHM9qanQbyFFspvNuU3vEqyz/EDJbkMW7rcbW6wVHifV4OvYD
3wqAPyRQWpnB3jgc1FGWrS5zc9YafcmdSTHAx2mYgMj65AKVix7AdgB742wGt/d3
fPIjwW7sHQiq2/2QSFfocbpzi0wHWHaJhWby4GOUdAsvEcJoRcG03gOwUURlmvQw
FRoMTOCDqqO6x7u5dTvEYnLWwqNzLchSut0VGG4Yw/AiEH6rP/Ko/EwIjACm73UF
lae3jTFibFSQY7sVGujY
=LsCz
-----END PGP SIGNATURE-----

--=_EiJqtWtkPxsHzj0G_oKmfA7--

