Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Failed to find share dir for dist 'Dancer2'

by markong (Pilgrim)
on Feb 19, 2018 at 12:13 UTC ( #1209472=perlquestion: print w/replies, xml ) Need Help??

markong has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I've cloned the Dancer2 official git repo and now I'm trying to setup a dev environment (inside a perlbrew local lib) and I'm stuck at this command, receiving back:
Failed to find share dir for dist 'Dancer2' at lib/Dancer2/CLI/Command/ line 62.
which I guess is to be expected seen that I haven't installed the 'Dancer2' dist from CPAN and File::ShareDir::dist_dir('Dancer2') will fail.

I'm trying to execute the dancer script from the cloned checkout code base, in order to setup a test dancer2 project, but it seems that it is not something supported?!

I'm wondering if anybody has experience with the code base and can suggest something. Is the Dancer2 distro installation from CPAN mandatory to execute the 'dancer2' script or else how do you call that 'script/dancer2' bin around that share dir check while developing?

  • Comment on Failed to find share dir for dist 'Dancer2'

Replies are listed 'Best First'.
Re: Failed to find share dir for dist 'Dancer2'
by tinita (Parson) on Feb 19, 2018 at 17:35 UTC
Re: Failed to find share dir for dist 'Dancer2'
by 1nickt (Abbot) on Feb 19, 2018 at 13:18 UTC

    Hi, it sounds like you are trying to set up Dancer2 as a user, i.e. "to setup a test dancer2 project", not like you are planning to contribute to the source. In that case, why clone the project rather than simply install the module from CPAN (which will get all libraries installed in the right place on your system, etc.)? I think you are making it more difficult for yourself than is necessary.

    The way forward always starts with a minimal test.

      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 :/ ...

        I'm using 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.

        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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1209472]
Approved by marto
Front-paged by haukex
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2021-10-16 19:16 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (69 votes). Check out past polls.