Dist::Zilla Like Chores

Just a post-ette today on the Dist:-Pen

A few more little plug-ins to add to my '.ini' today and again these are largely house-keeping chores and like all chores they are never fun to do and easy to ignore or bugger up.

What I am talking about are the Meta files that should be released with each distribution to be put on CPAN. The first files I am going to look at are Meta.yml and Meta.json which should both contain the same data but only differ in format. Sometimes I have made a mistake and forgotten to update one or the other or forgotten some important information in the file. Judging from this page so do many many others so automating their creation with Dist::Zilla will take one more thing off my plate.

All I have to do is add in the two plug-ins into may '.ini' MetaYAML and MetaJSON

Update on rakudo.js

Current State

rakudo.js (Rakudo compiled to JavaScript) compiles 70% of the core setting.
I'm working on getting it to compile the whole setting.
The setting executes a bunch of code at compile time (it has BEGIN blocks, constant declarators etc.) so the code the compiler is generated is validated to some degree (the test suit will exercise it much more).
I'm mostly fixing bugs, and implementing missing features in the backend (most are small some required bigger changes to the way we handle things, like nqp::attrinited).
While doing that I'm also expanding the nqp test suite so that new backend implementers have an easier job.

What's left?

Fixing bugs and missing features found while running the test suit.
Writing a tutorial and making rakudo.js more usable (making sure the source maps are correct, it installs easily, the error messages it produces are usable etc.).

When it will be done?

A large part of the work remaining is bug fixing so I find it hard to provide a reliable estimate.
I hope to wrap things up by the end of the year.

Perl6::Parser available for Perl 6

It’s by no means complete, but it’s available for trial from your friendly neighborhood Panda installer. This tool uses Perl 6’s own internal parser in order to generate a parse tree for Perl 6 code, and has enough information to reconstruct the original Perl 6 source, complete with whitespace and comments.

perl6-Perl6-Parser is available in the ecosystem for trial. It’s very much rough around the edges, and can so far handle only a relatively narrow range of Perl 6 code, but that will quickly change, I’m sure. Once it’s further along you should be able to integrate this into things such as pretty-printers, editors, syntax highlighting and other tools. It takes compilable Perl 6 source and generates a tree of Perl 6 objects, which themselves have a .perl6 method to return the original Perl 6 source. Or feel free to override the .perl6 method and format your Perl 6 code how you want it.

Perl 5 Porters Mailing List Summary: September 29th - October 10th

Hey everyone,

Following is the p5p (Perl 5 Porters) mailing list summary for the past two weeks. Enjoy!

Dist::Zilla: Feeling Better after Smoke

Today in the Dist-Pen I am going to have another crack at a different Versioning technique.

In my last post I had a look at using Dist::Zilla::Plugin::PkgVersion and I found it very useful but in the end I ran into a problem with putting all my Database::Accessor classes into my Accessor.pm file.

I wanted to see if I could have differing versions within the same file and the short answer was 'No' but the long answer was 'Yes'. I did play about with 'Dist::Zilla::Role::PPI' to see if I could adjust it to what I wanted it to do.

Well after a little while of poking about I did manage to get it to work the way I wanted but it was a hard-coded Kludge which I think could evolve into a patch. Now before I started to go down that rabbit hole I noticed there was an IRC for Dist::Zilla so I asked a quick question there before I created the patch.

Hangman

So I'll confess that I've had a big crush on Haskell for a couple of years now. I've tried and failed many times to really get beyond trivial code, but I'm utterly fascinated by the code one can write with strong, static typing. It can feel contrived at times and very constraining, but I can definitely see the benefits, which is why I'm so excited that Perl 6 has (gradual) types!

Dancer2 0.204000 improves app config, content caching, and dependency management

Fresh off of Perl.Dance 2016 is Dancer2 0.204000. The latest version of Dancer2 is on its way to a CPAN mirror near you.

This version brings some compelling enhancements and features:

  • Improved configuration handling (Jonathan Duff):

You can now create a local version of your configuration files which you then do not need to commit to any repository. If you create a file called config_local.yml, you will have a local config.yml. You can do the same with any configuration file, just change the filename to end with _local.

You can now set the DANCER_CONFIG_EXT environment variable in order to only load configuration files of a particular type (such as JSON). For example: DANCER_CONFIG_EXT=json plackup bin/app.psgi

You can now get some diagnostics information about loaded conifguration files by setting the DANCER_CONFIG_VERBOSE environment variable to a true value.

  • Improved static content caching:

Automating deployment of my personal Perl projects with Dokku

Last weekend I completed an article about deploying my personal Perl projects using Dokku - it might be interesting if you have similar needs!

Send in New Dist::Zilla!!

In the Dist-Pen today I am looking at another plugin to help with my many versioning woes.

In my last post I had a look at a Dist::Zilla plugin that helped me out with versioning my distributions. Today I am going to see if there is a plugin that will help me out with my Module versions as well. So a quick look about and I see we have a few options so I will start with the most likely candidate 'Dist::Zilla::Plugin::PkgVersion'

Like all the Dist::Zilla plugins I have used so for this one is quite simple; Just add

[PkgVersion]
in my '.ini' Now there are a number of attributes I can play with but before I do that lets see what I have I my Database::Accessor classes;

Split amino acid and nucleotide sequences

A labmate got a FASTA file of sequences that had a mix of amino acids and nucleotides that she wanted separated into separate files. Here's a little script to do that. Again, I wish there was an easier way to get the basename for a file that does not have the extension.

A discussion of DBIx-Class governance and future development

Due to a dispute on the exact nature of the future of DBIx-Class development after Peter Rabbitson's pending departure, a conversaton has been opened on the DBIx-Class mailing list to feel out what the users of DBIx-Class think.

If you have an interest in the module and its future, please have a read of the current sitation, and maybe leave a note on your position:

http://dbix-class.35028.n2.nabble.com/IMPORTANT-A-discussion-of-DBIC-governance-and-future-development-tt7578987.html

In order to leave a comment of your own, you can subscribe to the mailing list here:

http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class

With David Golden's permission, i reproduce a copy of his email below:

XML::CompactTree::XS Works Again

The Report

In a GitHub issue discussion by my former colleagues, I noticed weird errors being reported. I was curious about the cause, but not enough to dig deeper, and as nothing happened, I forgot about it.

But then they asked me for a favour, and I agreed to help them with a project. But, to my surprise, I wasn’t able to install the tools I originally helped to create, getting the same error as the poor GitHub guy. Quick check of the CPAN Testers showed problems in Treex::PML, one of the underlying libraries, all the way down to 5.20.0. A typical report would look like this:

Dist::Zilla Set B Scene 169 Take 2A

Today in the Dist-Pen I am going to try and get all my version numbers in a row.

Doing some more investigation on how Dist::Zilla will solve another of my distro pains and that is Versioning of my package. I did learn a lesson on version some years again when I though I was doing someone a favor I did a quickie release of DBD::Oracle where the release tar ball didn't match up with the release name.

Go a whole bunch of heat over that breaking a few things that other people where doing. I guess going from 1.23 to 1.24a can really spoil some peoples day, who new? So since that time I have always been very weary about visioning my code.

There is a nice little plugin for Dist::Zilla called ' AutoVersion ' which is suppose to fix this sort of thing for you. Up till now I just had

Monitoring minion workers/tasks using Sparrow

Hi! This is small post concerning sparrow plugin to monitor minion workers. I had some post on this recently, but now I have made some improvements at existed plugin, so I am writing a new one ...

On my production server I use Minion to send emails to my clients. For some reasons there are faults on executing minion tasks or even minion workers get stopped sometimes for reasons unknown. As sending emails is a vital part of the service registration system I need to know if everything goes bad with my email system. Here is minon-check sparrow plugin to risqué.

Install sparrow

$ cpanm Sparrow

Install sparrow plugin

$ sparrow index update # get latest plugins index from Sparrowhub
$ sparrow plg install minion-check # install plugin

Set plugin up

SECURITY RELEASE - Buffer overflow in DBD::mysql perl library

DBD::mysql is the perl DBI driver for MySQL and the primary way Perl applications and scripts access MySQL and MariaDB databases. The source repository is at https://github.com/perl5-dbi/DBD-mysql.

A vulnerability was discovered that can lead to a buffer overflow, possibly triggered by user supplied data. This vulnerability is present in all releases at least back to versions 3.0 of the driver, which were released in 2005.

The CVE identifier for this vulnerability is CVE-2016-1246.

Version 4.037, including the fix for this vulnerability, is available on CPAN at https://metacpan.org/pod/DBD::mysql

Users of DBD::mysql are advised to patch their installations as soon as possible.

We have already made a pre-announcement for this security release at the distros security mailing list. People using DBD::mysql installed from their (linux) distributions can expect to receive an updated version soon.

Many thanks to Pali Rohár for discovering and fixing the vulnerability.

The DBD::mysql maintainers, Patrick Galbraith Michiel Beijen

Mojolicious and FullCalendar.js

You've been pulled into an impromptu meeting where the client now wants a web calendar tacked onto their application. Grimace. Walk out worried. But most important ...

Don't re-invent the wheel.

FullCalendar.js has most of what's required by default, is extensible and will take a json web feed. Given a list of hash refs, Mojolicious will spit out json. I'll show you a short template for displaying the calendar. Creating all your calendar appointments in json is left as an exercise for the reader.

Dist::Zilla Check License

Just a quickie post here at the Dist-Pen today!

One thing that has been pointed out to me in the past it that I neglected to includ a license file on some of my CPAN distros. I have even forgotten to include a copyright notice, not a mistake one should really be making.

Dist::Zilla already has a rule that compels me to add in a license, as we saw that in this post and I think with only a few quick changes to my '.ini' file I will be able to get the license file in there as well.

In my '.ini' I just enure I have the correct license set up, right now I have

license = Perl_5

Yet another FASTA something

Yes, I write a lot of scripts having to do with parsing FASTA. I want to put lots of example code out into the wild so people have things to read and copy. In this example, a student needed to take a subset of reads from a set of FASTA files as her assembly was failing due to excessive memory requirements. This script will process a list of FASTA files to take the first "n" (default 100,000) reads from each, placing the output file into "out-dir" (or the same directory as the input file). So as not to accidentally overwrite the original data, I append an integer (1, 2, ...) if the output file already exists.

Tag your CPAN issues on github for Hacktoberfest

Hacktoberfest is nearly upon us again. If you sign up and then do 4 pull requests in October, you'll get a free t-shirt. Sadly the list of Featured Projects doesn't include any Perl ones, but last year I created a list of featured Perl projects.

If you've got some issues you'd like to offer as fodder for the fest, all you need to do is add a Hacktoberfest label to the issues

Perl 5 Porters Mailing List Summary: September 12th-28th

Hey everyone,

Following is the p5p (Perl 5 Porters) mailing list summary for the past two weeks. Enjoy!

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.