C::Blocks Advent Day 1

In the tradition of the Perl Advent Calendar, I have decided to write an Advent Calendar for C::Blocks, which is in pre-Beta. My plan is to release a new treat each day about the C::Blocks library. Today we will begin with the basics: what it is and how it works.

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

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!

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.

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.

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!

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.

Dist::Zilla Plan

Just when you think Dist-Pen is gone its back again.

Now that I have my Dist::Zilla mostly worked out with all sorts of test goodies it is time that I buckle down and finish off and or clean up all my 'Automated' level test. As an side note, the term 'Automated' tests was a little confusing for me. I eventually figured out that by automated they (however they may be?) mean test that CPANTS will run. Normally these are the test in your 't' dir.

Myself I guess I must just be old school as I always called these module tests and it wasn't until I embarked on my Dist::Zilla trip that I have come to see the advantage of splitting your tests that really have noting to do with the function or you module, POD, spelling, Kwalitee etc, into the hand 'xt' dir.

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:

An Overview of MetaCPAN

This week a small group of dedicated Perl developers are gathering in Chicago for meta::hack, the first MetaCPAN hackathon. The primary goal is to complete the transition to Elasticsearch v2, a major undertaking that was started more than a year ago.

Because all the participants are volunteers, this was only possible with sponsorship. Over the next few days we'll be sharing information about MetaCPAN and the work going on, and acknowledging some of the key sponsors.

This post is brought to you by FastMail, a gold sponsor for meta::hack. FastMail is a stalwart supporter of the Perl community — they also sponsored the QA Hackathon this year.

Movie file reader

Last night I finally got to see The Martian. It was a fun movie, and it seems much of the science was solid. One thing that filmmakers still like to do is have computers spit out messages one-character-at-a-time as if they were arriving like telegrams. If you would like to read a file like this, I present the movie-file-reader. First, my very long-hand version:

Is this the End for Dist::Zilla??

The last round of test case review here at the Dist-Pen today.

Down to the final few today;

TidyAll

This is the mother of all 'Author' test cases. This little chap wraps the 'Test::Code::TidyAll' case for you which will both tidy test and a validation test on you r code. Like TidyAll you can configure it to a very high degree. For my Database::Accessor project it is a nice to have so I will give it a good try. First you have to spend a half hour or so installing all the little parts of TidyAll, there are about twenty seven plug-ins plus other little bits. The plug-in requires that a config file is present, I just copied this one from CPAN . After getting that file all you need to do is add this to you '.ini' file

How removing . from @INC is about to break CPAN

In Perl 5.26, it will no longer be a safe assumption to assume . is in @INC. This is a good move towards a more secure Perl, but will break the installation of many CPAN modules. For those of you wondering why this was done, see this post for more information.

Many CPAN modules try to do things like: use inc::Module::Install; This depends on . being in @INC. If you invoke Makefile.PL without it, the script will not even run.

We have come up with several ways to mitigate and ultimately fix the problem:

Short Term

Perl 5.26 will support an environment variable "PERL_USE_UNSAFE_INC=1". If you set this, any perl script invoked will include . at the end of @INC. Tentatively, support for this environment variable will be immediately deprecated since long term, the CPAN modules need to simply take this into account.

Perl used in an unusual place

Here's an article by New York City-based Perl hacker Jim Keenan on Medium.com about an unusual place where Perl has been put to good use:

https://medium.com/@jkeenan/perl-and-the-art-market-in-a-time-of-historical-turmoil-35a287171b6f#.yq627prvh

Barcelona Perl Workshop 2016 in 3 movements

So Barcelona Perl Workshop 2016 happened this 5th of November. This is my report in three movements.

I've been listening for quite a few time that we should blog about the events we attend and love. I know it's good for multiple reasons, and I think it's a good advice. I've helped organize, attended and talked at the workshop and I knew I wanted to write about it, but it took me a few days before even thinking on actually do it.

Dist::Zilla Improved POD

laying with another seven sisters here is the Dist-Pen today

Well the good news for today seems Dist::Zilla::Plugin::Test::Legal is finally pointing to the correct version at meta::cpan I guess if finally got indexed. Now on with today’s review of seven more Test case Plug-ins.

Pod::No404s

An 'Author' level test case that implements Test::Pod::No404s this is one for me as I can't tell you how annoying it is to have links that point to nowhere in your POD. So after the usual five minutes or so of installing from cpan I added

What happened to . in @INC

In Perl, module loads have always attempted to look for the module you refer to in the current working directory (not necessarily the script location). It has always been this way in Perl. This goes back to the keyword "do" which precedes "require". When this was originally coded, it was also common to include . in your PATH.

Convention changed somewhere in the 90's. It is now considered a bad practice to include . in your PATH. Most languages also do not attempt to look for . in @INC. During my research earlier this year, I found that of all of the scripted languages, only Ruby used to have . in @INC and it was since removed.

Staying on top of bitmaps

While putting off working on my Perl Advent Calendar submission, I was instead active in resolving bugs in App::ShaderToy and adding some interesting features. The three major features I added this week are, in order of implementation, loading of bitmap images, hot reloading of code and the feature to make the window stay always on top.

It is incredible how much joy quicker iterations bring me while toying around with shaders, tweaking the parameters to see if I can find new visuals.

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.