[X2Go-Dev] Bug#715: Bug#715: Proposed patch
Mike Gabriel
mike.gabriel at das-netzwerkteam.de
Mon Jan 5 11:13:34 CET 2015
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
--
DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148
GnuPG Key ID 0x25771B31
mail: mike.gabriel at das-netzwerkteam.de, http://das-netzwerkteam.de
freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digitale PGP-Signatur
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20150105/35e2abed/attachment.pgp>
More information about the x2go-dev
mailing list