jeudi 29 octobre 2015

'Not a directory' error message with File::Copy::Recursive

Posting this because I spent too much time on it. I'd load like this

use File::Copy::Recursive;

and call it like this

$foo = File::Copy::Recursive->dircopy('foo', 'bar')::die($!);

and be rewarded with

Not a directory at someline.

Calling like that works great in many uses of File::Foo but not here. To make dircopy work, load it like this

use File::Copy::Recursive qw(dircopy);

and call it like this

$foo = dircopy('foo', 'bar')::die($!);

Don't blame me. I'm just showing how to make it work.

Aucun commentaire:

Enregistrer un commentaire