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

I used below command
cpanm Plack Twiggy Dancer Dancer::Plugin::WebSocket AnyEvent::Util
And when I try to run perl script with all these packages declared inside I get an error
D:\Perl>perl -c app.pl
Can't locate Dancer.pm in @INC (@INC contains: C:/strawberry/perl/site/lib C:/strawberry/perl/vendor/lib C:/strawberry/perl/lib .) at app.pl line 1. BEGIN failed--compilation aborted at app.pl line 1.
What configuration file I need to modify to include path where cpanm is installing these packages?

  • Comment on How can I make cpanm installed packages correctly

Replies are listed 'Best First'.
Re: How can I make cpanm installed packages correctly
by swl (Prior) on Sep 14, 2022 at 21:50 UTC

    Do you have more than one perl on your system? And if so are perl.exe and cpanm from the same directory?

    where perl where cpanm

    Both perl.exe and cpanm (and cpanm.bat) should be in the same bin directory, presumably C:/strawberry/perl/bin on your system.