How can I add an external, third-party dependency to a perl6 project?

Please make sure to read @smonff's answer as well for responses to questions 2 and 3.

  1. Where should I look for perl 6 libraries?

modules.perl6.org.

  1. When I've chosen one, how can I add it to my perl 6 project?

Use zef to install it on your local system.

Read the modules doc page for directions on useing a module in your project.

  1. If I find it [somewhere], how can I add it to my perl 6 project?

If zef can see it (and zef will usually be able to see a module if its repo is listed at modules.perl6.org) then zef should be able to install it. If not, contact the author or ask about it on #perl6.


As an answer to point 2) and 3) , you can take a look at 6pm. It's idea is to be NPM for Perl6. It could also be compared to Perl5's Carton. 6pm works over Zef.

$ 6pm init

# Install dependencies to ./perl6-modules and add it to META6.json 
$ 6pm install Test::Meta --save

# Run a file using the local dependencies
$ 6pm exec-file test.p6

# Make your code always use 6pm by making it "use SixPM;"
$ perl6 test.p6

See the full documentation for more information.