Windows CPAN Testers, your help please...

I recently blogged about Ask, my new(ish) module for interacting with users via STDIN/STDOUT, a GUI, or whatever means possible.

Writing GUI code in Perl unfortunately requires you to compile non-core modules such as Gtk2, Wx or Tk. There is an alternative no-compilation-required approach though: most modern Linux and BSD distributions ship with (or at least package for separate download) a program called Zenity. Zenity is a tool for adding basic GUI dialogue boxes to shell scripts. You call it like this:

zenity --file-selection

And it will display a standard file chooser. Once a file is chosen, Zenity will print the file path to STDOUT and then exit.

Ask provides Ask::Zenity, a wrapper around Zenity, and will fall back to that if Wx, Gtk2, Tk, etc are not available. However, none of this really addresses Windows...

Messing around with Calendars

So I've been messing around with Calendars a bit for fly-half in order to handle events and stuff like that nice nicely... in a typical ADHD Yak Shaving event I ended up writing a new CPAN module for dealing with Calendars : Calendar::Model

You can see a nice Bootstrap calendar page in the examples on github with the end result looking like this image on twitter .. I haven't hooked the perl into generate it dynamically in the example yet, hopefully have that working nicely soon tho.

I've also been karma-whoring a bit more on metacpan by adding my coderwall profile and amazon wishlist, so feel free to share the love ;)

pmtool-1.30 (Perl Module Tools) Released

I've released v1.30 of pmtools (Perl Module Tools) with these changes:

  • Moved to Git for source control.
  • Added a GitHub repo for pmtools.
  • Fixed Devel::Loaded to not include itself in the output (thanks to NEILB@cpan.org for spotting this problem). As long as you don't have files like 'MyOwnDevel/Loaded.pm', you are good to go.
  • Patched pmeth to flag constants (thanks to jpierce@cpan.org). Note that XS constants are not yet flagged (needs some C-fu applied).
  • Patched for basepods now in 'pods' in modern Perls. I guess the patch was from a CPANgnome, as there was no Requestor :(.

Devel::Cover and meta-testing

At work I recently set up a Jenkins instance to run all our tests whenever someone pushes changes to the master branch of our git repo. And, after changing some stuff in our code that made the perl debugger cry*, I added Devel::Cover to the mix. So now, Jenkins not only notifies us by email whenever someone is naughty and makes the tests fail, it also generates a lovely report of how much of our code is actually tested.

Naturally, the first thing I looked at was how well-covered our tests were. This seems like a bit of a weird thing to do, but it has exposed bugs in the tests themselves. Let me explain just one example.

Ask not what your user can do for you...

In many scripts, we need to prompt the end user for information - this could be a prompt for a file name, a selection from a list of options, or an answer to a yes/no question.

The traditional approach to this sort of question is to print your question to STDOUT, read a line from STDIN, and apply some sort of parsing to the answer...

Lock::File - yet another file locking module

I just uploaded a new module: Lock::File.

I guess the main reason I'm writing this blog post is because I feel guilty about it. There are SO MANY other similar modules.
I wanted to review them all, neilb style. I never found time to do it. Damn you, perfectionism.

I don't want to explain my issues with other modules here. I'm not sure if Lock::File is really much better than others, or if I'm just biased because I used it for years. You can look at Lock::File POD and decide for yourself.
But I finally realised that I have too much unreleased code and I've postponed its uploading to CPAN just because I didn't want to duplicate some existing code. Damn you, perfectionism.

In addition to that, the copy of Lock::File, named Ubic::Lockf, was bundled with Ubic for years.

And yet, I feel guilty. Sorry, guys.

OT: Purdue Course Signals - An Early Warning System for Students in Trouble

Purdue's Course Signals provides instructors with an early-warning system for students who are struggling or otherwise in trouble in their courses. And it works! Possibly the coolest piece of educational technology I've seen in quite a while.

Swiss Perl Workshop - Registration open

On behalf of the organisers I am pleased to announce the workshop website for Swiss Perl Workshop 1.

http://perl-workshop.ch

Registration is open, so register early and often. :-)
As this is the first Perl workshop in Switzerland, please help spreading the word.

You can also submit your talk proposal(s).

We are looking forward to see many of you on March 22 in Bern, Switzerland, Central Europe!

More exciting news to follow.

:m)

The JVM *could* host a Perl implementation - and do it well!

I started writing this as a response to chromatic's post at his Modern Perl blog. Short version: I think that the VM will be no problem for Moe, Stevan Little's new project to bring a Perl (or dialect) to the JVM.

Overall, I think chromatic's points are very good, and I agree with many of them, especially in the "What Moe Could Produce" section.

But I disagree with one point, in that the JVM has (at least to me) proven that it is an excellent platform for hosting dynamic languages. Well, at least one dynamic language.

Galileo 0.012 released!

Galileo is a simple but modern Perl CMS which is totally installable from CPAN. Just a few quick commands and the site is live and usable! The primary focus is small sites, which need immediate availability and easy (no?) administration. All content is written in a markdown editor in the browser and saved live via websockets with no reload.

This morning I released the newest version of Galileo with several improvements that have been in waiting for months. Among the most exciting is preliminary support for in-place database upgrades via DBIx::Class::DeploymentHandler.

In addition, Mojolicious author Sebastian Riedel made an extra effort to ease the testing of JSON messages passed via websockets. This means that Galileo’s two-way communications between the browser and the server are now even more robust and better tested. Further, this move has made unicode handling more reliable (since websocket unicode handling has its own quirks) so I can now say that Galileo should be unicode friendly! Thanks SRI!

Need a quick website? Give Galileo a try!

EDIT: I have now released a few nit-fixes so the release number is now 0.015. This should ease installation in some situations and on more platforms.

Vim - Creating a Macro Without Recording It

Just as you can edit a macro in Vim by pasting it to a buffer and editing the pasted text (then yanking the edited text into the macro register), you can create a Vim macro by yanking (J. Random) text into a register then executing that register as a macro.

(This makes it easy to play the home game, "Gee, I wonder what this line noise would do in Vim?")

YAPC::Europe 2013 in Kiev, week minus 30. Call for sponsors

Hello,

After a week of Christmas (the Eastern one) break we are here to continue our weekly newsletters. They will now also appear on the conference site in the News section.

First, a brief statistics update. Today there are 71 registered people coming from 15 countries and 26 monger groups. There are four submitted talks already. And we have some first early bird ticket purchasers. Thanks to all of them.

Today we would like to call for sponsorship.

YAPC::Europe is a non-profit event aimed for those who use Perl in their daily activity (or even on a monthly or yearly basis, checking the crontab settings after migrating to a new server :-) All income comes from attendee fees and from sponsors.

MadMongers: A New Way To Build Web Services Apps

Tomorrow (Tuesday, January 14th), I'll be giving a talk at MadMongers about a new technique for building web-services enabled web apps. It is the core technology we developed to create The Game Crafter, and we now use it in all apps that we develop both internally and for customers. With it, you can build web-services enabled web apps in minutes rather than months, and I'll be demonstrating that live at the presentation. If you are within driving distance of Madison, WI I encourage you to join us. The presentation begins at 7pm at the Essen Haus.

Got CSS to hide ridiculously long posts?

Does anybody have CSS handy to hide -- say anything after 2 paragraphs -- ludicrously long posts on the front page of blogs.perl.org?

A list of the Perl::Critic policies CERT recommends

I spent the morning collating the CERT recommendations and rules for secure Perl coding. Some of their policies recommend particular Perl::Critic policies. Here's that list:

I put all the data in a JSON file.

Jeff said it would be trivial to make a cert theme, and now that I've collected all the data, it's someone else's turn to do that. :)

A language for writing languages

[ This is cross-posted from the new home of the Ocean of Awareness blog. ]

Marpa::R2's Scanless interface is not yet two weeks old, but already there are completed applications. Significantly, two of them are for work.

A JSON Parser

The non-work-related application is a JSON parser. Given what it does, it easily could have been work-related. (It's been available for a few days as a gist, so it may well be in production use somewhere.) It was written by Peter Stuifzand, runs 185 lines and took him less than 30 minutes to write. Peter reports that it was a matter of typing in the grammar, and adding a few Perl functions to provide the semantics.

There are, of course, other JSON parsers out there, many of which run faster. These, however, took weeks to write. If you are, for example, thinking of extending JSON, and development time is a major consideration, the Marpa-based solution will be attractive.

Printer escape codes

CPAN Testers Summary - January 2013 - Up

Quite a few updates for this month's summary. New CPAN distributions, plenty of fixes, some updates, lots of discussion ... and 27 over million reports!

Installing all CPAN modules

Is there a bundle out there of all CPAN modules? I'm looking to install every single module on CPAN onto a machine.

A quick static file webserver

Wow, I’ve been busy lately! This is just a quick note.

Have you ever needed a quick webserver? Just static files, nothing fancy. Well here’s a quick way to make Mojolicious’ built-in server do just that.

Just make a little file, I’ll call it server.pl and put this inside:

Once a week, every week

CPAN modules

A year ago, Mark Fowler resolved to release a Perl distribution each and every week and invited other Perl hackers to do so.

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.