Things are moving along in the world of Perl6 Modules. An Perl6 Module is a way of sharing your code with others. As of this writing there are over 460! One nice thing that has be changed was the inclusion of travis-ci With travis, you can build test for your code and have it tested automatically. It does this by starting up a virtual machine and installing the software needed to make your Module. In this case it would be the latest Perl6, and all of the dependencies your code requires.
I have recently completed two of my very own Perl6 Modules, WebService::HazIP will allow your code to easily discover the public IP address of the host it is running on. The other is WebService::GoogleDyDNS. This module is an dynamic IP address client using the domain.google.com API.
To add an module to the Perl6 ecosystem you would list your project in the META.list
file on the /per6/ecosystem
Once the change has been approved, anybody can easily install you Module by simply typing panda install WebService::HazIP
.
Once the module has been installed you can make use of it by including it like this:
use WebService::HazIP;
my $ipObj = WebService::HazIP.new();
say "My public IP address is: " ~ $ipObj.returnIP();
So the output of this program would be a line of text saying "My public IP address is: xxx.xxx.xxx.xxx" Of course your IP address would be in the place of the x's.
One really cool thing about the Travis testing environment is you have access to the current status of your project, whether it is passing or failing its test. This gives you an nice status icon from which you could build an web based dashboard to keep track of your Perl6 Modules. As you can see below my dashboard tracks a total of 4 projects, two of them I made and two of them are dependencies that my modules make use of. At the time of this post, My WebService::GoogleDyDNS module is failing. This is because one of it's dependencies (HTTP::UserAgent) is also failing.
Dashboard
Dependencies
There is quite a bit of functionally to be found in the Perl6 ecosystem the full list can be found here: modules.perl6.org
Here is a screenshot of mine...
