The issue seems to be the existance of a file in mylib with name 'json.pm'
The problem surface even with this extremely simple setup:
mylib/json.pm:
package mylib::json;1;mylib.pm:
package mylib; use lib 'mylib'; 1;test.pl:
use strict; use warnings; use lib '.'; use mylib; use JSON::WebToken;output:
Attempt to call undefined import method with arguments ("encode_json" +...) via package "JSON" (Perhaps you forgot to load the package?) at +C:/Strawberry/perl/site/lib/JSON/WebToken.pm line 12.
I assume JSON::WebToken or JSON/JSON::XS is looking in path for json.pm file and getting confused? As long as I don't use the name json.pm there is no problem.
In reply to Re^2: Undefined import name priority issue?
by sectokia
in thread Undefined import name priority issue?
by sectokia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |