in reply to Re: Failed to find share dir for dist 'Dancer2'
in thread Failed to find share dir for dist 'Dancer2'

Hi!

Actually no, the contrary: I've experienced what could be a bug, and I'm trying to reproduce it: I'd like to test some patch on the code-base and also test the "use case project" over different Dancer2 branches. So I'm now trying to build up the "test bug project" using the sources: this of course to stay as much isolated when developing the patches.

I don't know, but I guess that I could I've spotted yet another bug here, because I don't see how to "trick" File::ShareDir to pickup the current dir (git checkout) share dir.Also I'm already using the -Ilib switch as per documentation :/ ...

Replies are listed 'Best First'.
Re^3: Failed to find share dir for dist 'Dancer2'
by tinita (Parson) on Feb 19, 2018 at 15:28 UTC
    I'm using https://metacpan.org/release/File-Share for this. It takes care of the case when you are in a source directory. (It only works for dist_dir/dist_file, not module_dir/module_file.)
    Maybe Dancer2 could switch to File::Share.

      Whoa!It is working :)! Thank you very much!

      I'm quite surprised nobody has reported this yet: maybe all the devs have already a Dancer2 distro installed in their path :O ?

      The only thing I could still notice is that (even in templates) this function keeps returning '0.000000_000' which is probably un-related to the File::ShareDir issue though !?

        maybe all the devs have already a Dancer2 distro installed in their path :O ?
        I'm pretty sure that's the case ;-)

        The version issue is probably because the $VERSION gets written into the modules only when the dist is built. Some Dist::Zilla plugin writes $Dancer2::VERSION = ... into Dancer.pm. Can't see which plugin from looking at the dist.ini, though.
Re^3: Failed to find share dir for dist 'Dancer2'
by 1nickt (Canon) on Feb 19, 2018 at 17:19 UTC

    My apologies, then!

    I'd never experienced this flaw, so I made a new perlbrew lib and installed the dependencies after cloning the repo as documented on the page you showed, then ran the script as shown.

    I confirm the error and agree with your theory that the devs must have never seen it because they likely have a D2 installation in their normal Perl lib tree, or did when they last ran that script.


    The way forward always starts with a minimal test.

      No need to apologize, thank you for you comment.

      I confirm the error and agree with your theory that the devs must have never seen it because they likely have a D2 installation in their normal Perl lib tree, or did when they last ran that script.

      Which in either case is somewhat scary (the latter for sure) :P