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.

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.

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)

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.

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

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!

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!

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;

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.

Rakudo Star 2016.11 Release Candidate

There is a Release Candidate for Rakudo Star 2016.11 (currently RC2) available at

http://pl6anet.org/drop/

This includes binary installers for Windows and Mac.

Usually Star is released about every three months but last month's release didn't include a Windows installer so there is another release.

I'm hoping to release the final version next weekend and would be grateful if people could try this out on as many systems as possible.

Any feedback email steve *dot* mynott *at* gmail *dot* com

Full draft announce at

https://github.com/rakudo/star/blob/master/docs/announce/2016.11.md

Perl Blaster - get selected videos in your inbox

A long long time ago I've set up a web site called Perl TV where I used to collect Perl-related videos. It is now on the move and soon it will be integrated in the recently created Code And Talk site.

That's where you can find videos from Open Source related conferences.

This time however, instead of just having a site with videos, I've also create blasters. Each blaster is a newsletter in which you'll get curated, topic-specific videos.

So far there are two such blasters:

The Perl Blaster and the JavaScript Blaster.

Go sign up and enjoy the new service!

Dist::Zilla Party Time

Its a good day for a party here in the Dist-pen.

A milestone here today in the Dist-pen. I finally got;

t/56_retrieve.t ............. ok
t/test.t .................... ok
All tests successful.
Files=26, Tests=319, 34 wallclock secs ( 0.21 usr  0.11 sys + 31.23 cusr  1.99 csys = 33.54 CPU)
Result: PASS
[DZ] all's well; removing .build/usLuCs7LTk
So time for a praty.

Once I got though that problem I had with my last post, I quickly went through the last set of tests updating mostly the includes and the lib call and finally got the result above.

I did notice one thing I kept getting this

An introduction to MetaCPAN's use of Elasticsearch

This is the second in a series of articles, which we're writing to celebrate meta::hack, our first MetaCPAN hackathon, which is currently (Nov 17th through 21st) taking place in Chicago.

This hackathon was by invitation only, since it had a very specific goal: completing migration of the live service to MetaCPAN v1 (which includes a major Elasticsearch upgrade, from 0.20 to 2.4, or nearly 70 stable releases forward). Once that's done, any remaining time will be spent fixing bugs, and discussing what comes next. The attendees are Olaf Alders (founder of MetaCPAN), Mickey Nasriachi, Leo Lapworth, Tom Sibley, Joel Berger, Doug Bell, Brad Lhotsky and Zach Dykstra. Matt Trout is contributing remotely.

This post is brought to you by cPanel, a platinum sponsor for meta::hack. cPanel are a well-known user and supporter of Perl, and we're very grateful for their support. More about cPanel at the end of this article.

Beam::Emitter v1.004 Released

This week, I released a new version of Beam::Emitter. A lot has changed since the first releases, so here's some details on all the new features.

Beam::Emitter is a role for turning your classes into event emitters. Being an event emitter allows other classes to subscribe to important events from your object. Subscribers can use these events to perform additional tasks, transform your object's data, or otherwise extend and enhance your class. Beam::Emitter makes your class extensible by allowing you to provide specific places for custom code to run.

Since the 1.000 release last year, Beam::Emitter has gotten quite a few new features and bug fixes to make it easier to use and safer for your code.

Perl 5 Porters Mailing List Summary: November 6th-16th

Hey everyone,

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

Enjoy!

Very Little Dist::Zilla

Only an indirect dist-pen post today.

You ever have one of those days. Your code just does not want to come together and gives you know end of grief. Well today was one of those days for me.

I left off yesterday with what I though was a solution for my problems with 't/30_view.t', by moving my 'Database::Accessor::Roles::DAD' out of Accessor.pm and into its own file. Seem I still had a problem as in the 'Database::Accessor::DAD::Test' I still had a 'use Database::Accessor;' present.

Now that was setting up a circular call to Accessor.pm, as well it was never my intention for some-one to use a DAD directly only as a call from Database::Accessor. In the next test case 't/31_elements.t' I got

RETRIEVE No Database::Accessor::Driver loaded for Data::Test Maybe you have to install a Database::Accessor::DAD::?? for it? at...
# Looks like your test exited with 2 just after 1.

Perl and Elasticsearch from Sydney PM

Perl and Elasticsearch - The talk I gave this week and Sydney PM.

Note: All typos and mistakes are intended as tests for the reader.

How to upload a script to SparrowHub

This is informal response to David Farrell's article How to upload a script to CPAN.

Preamble: CPAN is great. This post in no way should be treated as Sparrow VS CPAN attempt. Sparrow is just an alternative method to distribute your scripts. Ok, let's go.

So let’s say I’ve got this Perl script:

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.