No Dist::Zilla

I guess it is the POD-pen now.

The third POD post in as many days and really noting to do with Dist::Zilla so I guess I will have to find some other pictures to post.

After yesterday's post I took some time and had a look at a large number of different CPAN modules to get some ideas on the contents and style of my Accessor POD.

One thing that I have seem many modules do is break their documentation into separate PODs, under the names-pace and I will do that with Accessor as well.

I am going to keep some things in the Accessor.pm proper as it is good to have some basic info present, most of the other items I have been working on over the past few days I think I will break into separate POD.

So here is the first draft (outline) of my documentation in all its glory by Names-pace

Database::Accessor

  • Abstract
  • Synopsis
  • Description
  • Getting Started
  • Resources

C::Blocks Advent Day 5

This is the C::Blocks Advent Calendar, in which I release a new treat each day about the C::Blocks library. Yesterday I showed how to declare and share C functions, which I think is C::Blocks’ killer feature. Today I will show some simple benchmarks that illustrate the performance of C::Blocks-compiled code.

Sorry that this Fifth Advent entry is being posted on the Seventh day of December! I got some really weird benchmark results and it took a while to really dig through them and figure out what was going on. I’ll have to work double-time for the next few days to get caught back up!

meta::hack Wrap-up Report

We had a great four days at meta::hack a couple of weeks ago. I've tried to briefly summarize what we accomplished.

Introducing Net::ACME

I’ve recently finished porting cPanel’s implementation of Let’s Encrypt’s ACME (Automatic Certificate Management Envirionment) protocol to a new CPAN module, Net::ACME.

Net::ACME offers a number of attractive features:

- It’s based closely on cPanel’s widely used Let’s Encrypt plugin.

- Memory usage is light: no Moose/Moo/etc.

- It can run in pure Perl, as long as you have an OpenSSL binary. (Otherwise, it needs Crypt::OpenSSL::RSA.)

- Thorough error checking—even Perl calling context!

- Errors are represented as typed, queryable exceptions. (The framework includes its own exception class hierarchy.)

- It’s “global clean”: no careless overwriting of variables like $@, $!, $?, etc.

The object hierarchy also closely mirrors ACME’s own object hierarchy: separate classes exist to represent ACME registrations, authorizations, challenges, and certificates.

The distribution includes example scripts that demonstrate usage of the module and should also give a good feel for the protocol itself.

I hope it’s useful!

Dist::Zilla Goes to SKULE

Another boring day in the POD-pen

I am getting sick of writing up PO of well necessary evil I guess at least my post will be sort for the next few days.

Today I managed to get my methods and attributes all written up but that left me with a layout dilemma that I have to solve. Should I go with the very traditional POD alphabetical grouping like this

  • Methods
    • add_condition
    • add_element
    • add_filter
    • add_gather
    • add_link
    • add_sort
    • create
    • delete
    • new
    • retrieve
    • update
  • Attributes
    • available_drivers
    • conditions
    • delete_requires_condition
    • dynamic_conditions
    • dynamic_elements
    • dynamic_filters
    • dynamic_gathers
    • available_drivers
    • dynamic_links
    • dynamic_sorts
    • elements
    • ...

No need to put up all the attributes up there as the list goes on a bit.

At first glance it looks ok but if I was interested in the 'elements' attribute I would have to look in at least three different places to gather all the info I may need.

My present 'Elements' entry looks something like this

elements (RO) ARRAY-REF

An array ref of Element, Param, Function or Expression classes that are passed to the underlying DAD. ...

Backticks and tests in Perl 6

Perl was created for systems administration, and Perl 6 has all the chops you've come to expect from the brand. Here I needed to use MD5 checksums from my collaborator to verify that I downloaded all their data without errors. Each data "$file" has an accompanying "$file.md5" that looks like this:

$ cat HOT232_1_0770m/prodigal.gff.md5
a36e4adfaa62cc4adb8cea44c4f7825f  HOT232_1_0770m/prodigal.gff

So I need to read the contents of this file, get just the first field, then execute my local "md5" (or "md5sum") program on the file without the ".md5" extension and determine if they are the same. All standard stuff, and I think Perl 6 gives us elegant ways to accomplish all of these, including a dead-simple testing framework. Here's my solution:

Security release - use after free in DBD::mysql when using prepared statements

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 use after free when using prepared statements. 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-1251.

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

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

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

The DBD::mysql maintainers, Patrick Galbraith Michiel Beijen

Shadertoy progress - playlists

The last two weeks, I didn't do much programming with OpenGL and GLSL. I used the weekend to catch up with some of the bug reports on Github and made the application more robust against missing input data or broken shaders. The net result is that it now can also cycle through a set of shaders:

Dist::Zilla Does Pod

So it is POD day here in the Dist-Pen.

I am not going two write up another POD tutorial as there are tons of those about what today's post-ette
is about what happened when you start writing up your POD.

What I always like to do in the POD process is start writing it at about the very same time when I am coding things up and fill in most of the banks as I go along. Others are of the do it at the beginning and others are wait for the end. So I guess I take the middle ground.

I have worked on both ends of the spectrum.

MetaCPAN operational view

This is the third in a series of articles about MetaCPAN. The first article described the two main parts that make up the MetaCPAN project, the API and the search interface. The second article gave a high level summary of how the API uses Elasticsearch to hold and search information about CPAN distributions and authors.

In this post we'll look at how MetaCPAN links to other parts of the CPAN ecosystem, how the physical setup has changed with MetaCPAN v1, and another service that v1 has made available.

This post is brought to you by Booking.com, our second platinum sponsor. Booking.com is one of the largest Perl shops in the world, and have done a lot to support our community over the years. Thank you to Booking.com for supporting meta::hack.

WebService::Fake - but still usable!

I released a new simple module/application WebService::Fake and wrote about it in my main blog. I'd love to read any feedback providing any insight, negative included of course (provided they're honest and polite).

And oh! I really hope to see Learning Perl 6 spring to life! I opted for the "early versions" pledge because I'm too curious to see what it will be...

Meta::Hack - MetaCPAN Upgrade

A small group of us got together for a 4 day hackathon (17th to 21st of Nov 2016) in Chicargo, with the goal of switching https://metacpan.org over to the new https://fastapi.metacpan.org/v1/. This has been a massive project, upgrading our core backend from Elasticsearch 0.20.2 to 2.4.0. The project has taken over 2 and a half years to get to where we are now.

Oh, I should point out, day 2, we achieved our goal - after that we then fixed issues, added more features and made plans!

For MetaCPAN I take on a sysadmin style role, even though my in day job I'm manager / code reviewer mostly.

I had already set up Elasticsearch 2.4.0 on a cluster (we had the old version on a single node before!) and at Meta::Hack reviewed the configuration with Brad (seems I mostly got it right!).

Day -1 (on the plane)

Dist-Zilla Hates Tidy

It is discovery of silly mistakes day here in the Dist-pen.

Over the past few posts I have been running down a persnickety bug in my Database::Accessor system. I had first seen it while expanding and cleaning up my test cases and I thought at first I fixed it with a simple 'lib' statement and a slight change to my embedded classes. As I dug down into my test cases the bug came up again I reverted that embedded class change and added in a kludged that so at least my test cases all passed. I wasn't satisfied with this and did some more hacking and found my 'fix' was not I had a real bug, which I fixed in the end.

Today I found the root cause of my bug, I went back to play on my Windows box today and before I did a pull of my fixed code I did a quick diff and found this

meta::hack log

Last week, I attended meta::hack, the MetaCPAN hackathon in Chicago. I'm the maintainer for CPAN Testers, the central database for CPAN users to send in test reports on CPAN distributions and one of MetaCPAN's data sources. I asked to join them so I could improve how MetaCPAN consumes CPAN Testers data, and ensure the stability and reliability of that consumption.

Here's a detailed log of what I was able to accomplish, and information on the new development of CPAN Testers.

sudo

I don't post as much as I would like to as all my free time is spent working on Tau Station, so I thought I should remind folks that I'm still alive, still hacking on Perl, and still writing obscure technical humor:

CPAN Testers RULE!

Late last evening I sent a development version of a Perl module to PAUSE. This module had had a bunch of work on it since the last release, including a change in the way timegm() and timelocal() were called.

The CPAN testers worked on it overnight, and this morning I had a brand-new shiny RT ticket in my inbox. Slaven Rezic (to give credit where it is due) had noticed and correctly diagnosed the problem. I fixed it, and tonight the CPAN testers are chewing on a new and hopefully better test release.

I credit Slaven, but credit is due to everyone in the testing infrastructure, because this is far from the first time they have pulled my fat out of the fire. Where else but Perl could this have happened?

Thanks, and kudos!

Dist::Zilla is Sad or is that Happy?

Sad day here at the Dist-pen.

Today I awoke still having nagging doubts about putting a copy of 'Database::Accessor::DAD::Test' directly into 'Test::Database::Accessor::Utils'. It did get all my tests to run correctly but it still was a cheat or a kludge at best.

So today I did build and then installed ' Database::Accessor ' on my Ubuntu box as I wanted to see if I could get this little script;

C::Blocks Advent Day 2

This is the C::Blocks Advent Calendar, in which I release a new treat each day about the C::Blocks library. On the first day I demonstrated how to weave procedural C code into your Perl code. Today I will show how to get data across the boundary between Perl and C.

Perl 5 Porters Mailing List Summary: November 17th-20th

Hey everyone,

Following is the p5p (Perl 5 Porters) mailing list summary for the past half week.

Enjoy!

Easily clean up a team's remote git branches

There's a problem that I've seen on every team I've worked with that uses git. Because at Tau Station we're fairly merciless about technical debt--which makes the code base pretty sweet to work with--we take all technical debt issues seriously on the theory that once we launch, it may be too late to clean up (a silly idea in theory, but a prevalent one in practice).

The following technical debt issue is actually causing us a problem, though it's more of a process problem than a technical one:

05:35:02 (master) ~/veure $ git branch -a | wc -l
     272

Wow! We have 272 branches? Most of those are are long merged or abandoned. We've discovered that there are a couple of them which got overlooked (I'm tempted to blame github's poor PM tooling, but it's a lousy craftsman who blames his tools). We tried asking devs to find all of their remote branches and review them and delete them, but that turned out to be a rather daunting task and they're still missing branches.

Now, with a simple Perl script, we have a solution.

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.