Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Mojolicious fails to respect @INC

by Corion (Patriarch)
on Dec 28, 2017 at 21:22 UTC ( [id://1206365]=note: print w/replies, xml ) Need Help??


in reply to Mojolicious fails to respect @INC

Somewhere, the wrong version of List::Util gets picked up. Maybe there is 1.38 somewhere in @INC and the 1.49 does not get picked up because file system permissions prohibit it.

I recommend trying a simpler approach by reducing the problem and eliminating Mojolicious and Moose and instead running a simple program to find out which file gets loaded and expanding from there until you locate the actual problem. Start out with something like:

#!perl -w use strict; use List::Util; use Data::Dumper; warn List::Util->VERSION; warn $INC{ "List/Util.pm" }; warn Dumper \%INC; warn Dumper \@INC; warn "Perl $^W"; warn "Perl Version $]";

This should point you to the 1.38 version. If it outputs the 1.49 version, then something else updates @INC, or your code is run by a version of Perl that you did not install 1.49 into. Check and correct until you have found the difference between your program, your expectation and the Mojolicious program.

Replies are listed 'Best First'.
Re: Mojolicious fails to respect @INC
by hesco (Deacon) on Jan 01, 2018 at 02:43 UTC

    Thanks, Corion! I had abandoned the `use lib` strategy on an earlier project, to solve some issue which I do not remember at the moment. Rather than running the `mojo generate app` and adapting from there, I did some cut-n-paste from that previous project, and found myself in this mess. Thanks for steering me back to sanity.

    if( $lal && $lol ) { $life++; }
    if( $insurance->rationing() ) { $people->die(); }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-24 21:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found