in reply to Can't locate object method "new" via package

Is this exactly the code you're running? On my end it complies fine and does not show that error message.

Please provide a Short, Self-Contained, Correct Example that reproduces the problem on your end, and let us know what Perl version you're using, as well as what version of Set::Similarity::Cosine and what OS you're using.

  • Comment on Re: Can't locate object method "new" via package

Replies are listed 'Best First'.
Re^2: Can't locate object method "new" via package
by Ggavazzo (Novice) on Aug 17, 2020 at 17:27 UTC
    Thank you; Similarity and Cosine $ VERSION = '0.026'; Yes, that's exactly the code. Now with windows 10. 64 bits. Interesting that when it was with windwos 7 it worked.

      Does loading Set::Similarity work?

      Have you made sure that you are actually running the code you've posted?

      What else did change except Windows? Did you reinstall Perl?

        Yes, I reinstalled perl64. perl -v This is perl 5, version 24, subversion 3 (v5.24.3) built for MSWin32-x64-multi-thread (with 1 registered patch, see perl -V for more detail) Yes. This is the Code.

      How did you install this module?

        Perl Package Manager