Hello,

On 2014-04-01 10:03, Gabor Szabo wrote:
I use File::ShareDir to locate the shared files installed with the module. How can ensure that it will access the local share directory in the development
environment during development/testing/installation and won't try to
use the files already installed by a previous version of the module?

I bumped into that same problem a while ago, and used an ugly hack to solve it. There might be better ways to work around it, but anyhow, this is as far as I got.

Note: I'm using Dist::Zilla and OurPkgVersion plugin, I'm not sure it would work otherwise. This method is in the main package.

sub _get_dist_file {
    my ($self, $file) = @_;

    if (__PACKAGE__->VERSION) {
        return File::ShareDir::dist_file('<My-Dist-Name-Here>', $file);
    }

    return "share/$file";
}

Hope it helps.

Cheers,
André

Reply via email to