Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Dancer2: Why is bundled 'lib/' required?

by bliako (Monsignor)
on Feb 01, 2022 at 23:46 UTC ( #11141032=note: print w/replies, xml ) Need Help??

in reply to Dancer2: Why is bundled 'lib/' required?

Isn't it just a matter of finding out where make install installed Private::Work::Module from its output? And then check apache's INC and yours. If all else fails, bin/app.psgi tries to find required modules with this: use lib "$FindBin::Bin/../lib";

Replies are listed 'Best First'.
Re^2: Dancer2: Why is bundled 'lib/' required?
by kcott (Archbishop) on Feb 02, 2022 at 03:49 UTC

    G'day bliako,

    Both Private::Work::Module and Private::OtherWork::OtherModule are in the same "@INC" directory. Dancer2 finds the latter but not the former. Why would it find one but not the other?

    I thought you might be on to something with FindBin but a few tests indicate that's not the case. If /path/to/bin/../lib doesn't exist, it still gets prepended to @INC. Having a non-existent directory in @INC does not cause Perl any problems.

    $ alias perle alias perle='perl -Mstrict -Mwarnings -Mautodie=:all -MCarp::Always -E +' $ ls -al /home/ken/tmp/zxc/bin/../lib ls: cannot access '/home/ken/tmp/zxc/bin/../lib': No such file or dire +ctory ken@titan ~/tmp/zxc/bin $ perle 'use FindBin; use lib "$FindBin::Bin/../lib"; use JSON; say $J +SON::VERSION; say $INC{""}; say for @INC;' 4.03 /home/ken/perl5/perlbrew/perls/perl-5.34.0/lib/site_perl/5.34.0/JSON.p +m /home/ken/tmp/zxc/bin/../lib /home/ken/perl5/perlbrew/perls/perl-5.34.0/lib/site_perl/5.34.0/cygwin +-thread-multi /home/ken/perl5/perlbrew/perls/perl-5.34.0/lib/site_perl/5.34.0 ...

    Thanks for the suggestions anyway.

    — Ken

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11141032]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2022-10-05 15:43 GMT
Find Nodes?
    Voting Booth?
    My preferred way to holiday/vacation is:

    Results (24 votes). Check out past polls.