Closed Yoposoc closed 7 years ago
Will look when I get home. Net::LastFM isn't supposed to be a dependency now since I wrote my own non-blocking module. Probably forgot to remove a reference to it somewhere.
Alright. Update your copy and make sure you've installed both my Net::Discord and Net::Async::LastFM modules.
I've updated the readme, but just in case it should be as simple as symlinking the modules into your perl5 lib folder, something like this:
ln -s /path/to/Net-Async-LastFM/lib/Net/Async ~/perl5/lib/perl5/Net/Async
ln -s /path/to/Net-Discord/lib/Net/Discord ~/perl5/lib/perl5/Net/Discord
ln -s /path/to/Net-Discord/lib/Net/Discord.pm ~/perl5/lib/perl5/Net/Discord.pm
If you don't have a user lib you'll have to install them to the system lib folder as root.
Hmmm. I have Windows and I have installed the directories from Net::Discord and Net::Async::LastFM into my perl lib folder. Redownloaded Discord-NP and I got this error.
Can't locate Mojo/UserAgent.pm in @INC (you may need to install the Mojo::UserAgent module) (@INC contains: C:/Perl64/site/lib C:/Perl64/lib .) at C:/Perl64/lib/Net/Async/LastFM.pm line 7. BEGIN failed--compilation aborted at C:/Perl64/lib/Net/Async/LastFM.pm line 7. Compilation failed in require at discordnp.pl line 7. BEGIN failed--compilation aborted at discordnp.pl line 7.
So I figured I need to get this Mojo::UserAgent module, but it seems like I have to get it by installing cygwin and using commands there to get it. I'm going to try it later today.
Yep, there are a number of other modules that have to be installed for this to run. You can find them listed inside the "cpanfile" file.
From CPAN:
Mojo::IOLoop
Mojo::UserAgent
Mojo::JSON
Compress::Zlib
Encode::Guess
Config::Tiny
And from my own:
Net::Discord
Net::Async::LastFM
There's a really easy easy way to install all of the CPAN dependencies, and you don't need Cygwin to do it.
Which Perl did you install? Strawberry? If so, it comes with the cpanm tool, so all you really need to do is open a Command Prompt (cmd) window in this project's root folder and type cpanm --installdeps .
I updated the dependencies file, so make sure to update your copy of this project first.
You might also need Data::Dumper
. It's a module I use for debugging and sometimes forget to remove from the code before pushing commits here. If so, you can install it with the command: cpanm Data::Dumper
.
I tried running cpanm --installdeps
on my root folder and got the error Unescaped left brace in regex is deprecated
I believe I have activeperl 5.24.0 installed? I think I can use it to run perl scripts but I just cd to my perl script in cmd and run it using perl ____.pl
Tried to run cpanm Data::Dumper
. Results are below:
I see, I just needed to run cpanm installdeps
(without the hyphens)
Hi - Sorry I missed your previous comments. Not sure what happened there. Glad you figured it out!
I'll update my docs with "cpanm installdeps" an an alternative command.
When I try to execute the perl script, I get this: Can't locate Net/LastFM.pm in @INC (you may need to install the Net::LastFM module) (@INC contains: C:/Perl64/site/lib C:/Perl64/lib .) at discordnp.pl line 7. BEGIN failed--compilation aborted at discordnp.pl line 7.