|We don't bite newbies here... much|
Lingua::StanfordCoreNLP uses Inline::Java and I wonder if that complicates things somehow. (I don't really see how ... but I don't know much about the way Inline::Java works.)
If you take your "Script Code" and insert package MyModule; at the very beginning of that file, then the "Script Code" is now essentially the same as "My Module Code".
Having made that change to the "Script Code" one would therefore expect that running perl myscript.pl will now produce the same Can't locate object method "new" via package ... error as is produced by loading MyModule.pm.
Is that the case ?
Similarly, running perl /full/path/to/MyModule.pm should produce the same error as running perl myscript.pl (for the modified "Script Code").
If you can test that out, it would help us determine whether Inline::Java is, in fact, the source of the problem.