in reply to Re^2: use File::Path qw(make_path); fails with php 5.6.11
in thread use File::Path qw(make_path); fails with php 5.6.11

Problem solved, changed make_path to mkpath and all is well. Sorry to have wasted everyone's time.

  • Comment on Re^3: use File::Path qw(make_path); fails with php 5.6.11

Replies are listed 'Best First'.
Re^4: use File::Path qw(make_path); fails with php 5.6.11
by 1nickt (Canon) on Jul 28, 2015 at 18:17 UTC

    Hi windjammer, the docs from File::Path say:

    mkpath( $dir ) mkpath( $dir, $verbose, $mode ) mkpath( [$dir1, $dir2,...], $verbose, $mode ) mkpath( $dir1, $dir2,..., \%opt ) The mkpath() function provide the legacy interface of make_ +path() with a different interpretation of the arguments passed. T +he behaviour and return value of the function is otherwise ide +ntical to make_path().

    So it rather seems that the only problem that could be solved by changing:

    use File::Path qw/ make_path /;

    to

    use File::Path qw/ mkpath /;

    is that your code called make_path() with deprecated argument-passing syntax, and you upgraded from an older version of File::Path to a newer one in which the make_path() syntax has changed and mkpath() offered as a legacy alternative.

    So I am guessing that when you upgraded your PHP version, you may have also upgraded your Perl libraries ... did you use a shared host's one-button upgrade tool or something similar? If so, did it say that it was going to upgrade your Perl, too?

    Just a theory, but I found the fact that you fixed your problem by only changing the File::Path method used, to be quite interesting.

    The way forward always starts with a minimal test.