Enter MooseX, V Well Thats a Wrap

Well a wrap for Kwalitee at least as my little changes from my last post left me with only one Extra metric

is prereq

Well there is not much I can do about that unless one of the many legions of my readers, (well maybe a contubernium at least) will have to do that for me.

So I did improve from 86%/111.2 in version 00.001 to 100%/134.4 for version 0.00.04 so not bad but what does this mean?

Well in the end not much as it is only a game and I am sure there are plenty of Mods out there that have a less than stellar scores but are made to very high standard.

Silliness of the day: digit-by-digit tab completion for ints/floats

I was hacking on Perinci::Sub::Complete these past two days and I thought I'd add a (silly) feature that most other completion libraries don't (bother to) have.

When a fat comma is confusing

I frequently swap out commas for fat commas ( => ) when I think it reads better. One place this bites me in the ass is when I reread code where I'm using a function that takes two parameters but look like they could take more. This recently happened to me with Test::LWP::UserAgent.

I started with the docs' example:

$test_ua->map_response(
  "myapp",
  sub { HTTP::Response->from_psgi($app->($_[0]->to_psgi)) },
);

Then thought this would look prettier:

$test_ua->map_response(
  myapp =>
  sub { HTTP::Response->from_psgi($app->($_[0]->to_psgi)) },
);

Then of course I came back two days later and added:

When a failure is not a failure

[What I really should have done here is something like Tom Wyant or Joel Berger.  Being a literary type, that appeals to me.  Of course, with Dupin and Holmes taken, who would I pay homage to? Nero Wolfe, perhaps? Batman? Michael Westen? Harry Dresden?

Anyways, maybe next time, if I have more time to prepare.  For now, you’ll have to settle for plain ol’ me.]

At $work, I’m the guy who maintains the tool we use for branching, merging, pushing ... release management, I suppose you’d say.  I don’t actually do the pushes most of the time, but I’m usually the guy who takes the tickets when there’s something wrong with the process.

Enter MooseX, IV 100% Nice and Clean

Well I did it my Kwalitee results are now at 100% but I see from a comment on my last post that there is a way to fix an Emperimental metics

metayml has provides

and that is to use 'MetaProvides::Package' so a quick update to my ini file and of course it did not work as I did not have the plugin installed so after a few minutes looking blankly at my screen I figured this out and installed the plugin!

So after a few false runs I figured it out all I need to do it put the package that calls the other packages like this

[MetaProvides::Package]
MooseX::Meta::Method::Role::Authorized = 1

the one meaing look for other packages and in my META.YML I get

Conflict Resolution: local::lib and git's Perl

I ran into a frustrating problem the other day:

$ git add -i
/usr/bin/perl: symbol lookup error: ~/perl5/lib/perl5/x86_64-linux-thread-multi/auto/List/Util/Util.so:
undefined symbol: Perl_xs_apiversion_bootcheck
fatal: 'add--interactive' appears to be a git command, but we were not
able to execute it. Maybe git-add--interactive is broken?

I've seen this error message from Perl a lot. It basically means that I'm trying to load an XS module compiled for a different version of Perl. Since git is directly trying to run /usr/bin/perl (5.10.1) as opposed to the perlbrew Perl I have installed (5.16.3), the error comes as no surprise: PERL5LIB is checked before Perl's built-in libraries. So if you have a local::lib (which adds its directories to PERL5LIB) and try to use those modules in a different Perl, things may not work as you expected.

General hardware hackathon at YAPC::NA 2014

How many Perl programmers does it take to change a lightbulb?

Wait, I thought that was a hardware problem. Well, it used to be; now it's a new module to contribute to CPAN, a new web service, or maybe something not dreamed up yet. Thanks to a proliferation of inexpensive SBCs (Single Board Computers), such as Arduino and Raspberry Pi, and an amazing array of easy-to-use sensors and actuators, the lines between programming and hardware are blurring fast.

Sort the videos by date

In the last couple of weeks I had some more time publishing and featuring videos on the Perl TV site. Today I even managed to work on the UI a bit. It is still close to what Dancer provided as default, but now you can already opt-in to see the dates of the videos and the dates they were featured on. You can also sort by any of the columns.

For the former, there are two toggle buttons on the right side of the page. For the sorting, just click on the title of each column. (Currently only ascending sort was added.)

Try, for example the list of all the videos.

Just a little background

The objective of the PerlTV site is to collect, categorize, annotate, and promote Perl-related screencasts and videos. Its source (both code and content) can be found GitHub.

Enter MooseX, III Now Lets see whats up.

So I have the latest Kwalitee results from my latest changes and I have improved a little now at 96.88 up from my 84.83 and only one Core fail

package version matches dist version

Still haven't got that right but at leas my README.pod is acceptable to CPANTS.

So a quick look and yikes I guess I fixed the Dist::Zilla ini file

name = MooseX-AuthorizedMethodRoles
version = 0.00.02
author = John Scoles
license = GPL_1


but did not fix the main module

On the awesomeness of the Perl community v2 (201406)

Remember how I pointed out last year that the Perl community is *AWESOME*? Well, glad some things stay the same :)

This year I am part-time unemployed and was only planning to maybe visit YAPC::EU in Sofia. I wasn't looking to do another crowdfund because, well, others should get a chance too :) And in fact one such campaign is running right this moment for our very own Leon 'leont' Timmermans. The fact it has been up for several hours and is already closing to 10% makes me quite happy and confident I'll meet Leon in sunny Orlando in couple weeks.

The Captain Is Dead

Last year at YAPC::NA a few dozen of you helped me play test a new board game I was working on called The Captain Is Dead. Well actually back then it was still called Bridge Command. Almost universally you asked me to let you know when the game was ready so you could buy a copy. I'm here to let you know that the game has officially launched on Kickstarter.

tcid-300x500.jpg

I'd also like to give a shout out to Tony Cook, the maintainer of Imager. Nearly all of the graphic design work done in the game was rendered using Perl and Imager. It made running the hundreds of variations of the game over the past year a snap. Thank you Tony!

Google misleads users

RT #96394 in a nuthsell:
user searched for Perl CPAN PayPal, Google led to
Business-PayPal-0.03 on search.cpan.org which pointed the user
to "Latest Release: Business-PayPal-0.04" which he missed and thus opened the ticket.

In fact, as of this writing, the latest release is is 0.13, but who cares if you make sure only the stable, version-independent link is indexable by Google.

Enter MooseX, II Now Lets Clean Things Up.

Well after my excitement of the release this week after fixing a few obvious pod bugs and cleaning up the repository, I was going to take a look at the Kwalitee page and clean what it tells me.

So the first thing to look at is the Core Metrics and the first on my hit list is

has readme

So I guess my Dist::Zilla did not pick up that file as I do remeber creating a bad one but I will create a better on just in case. Now what I have seen in the past is to just use to POD as the readme so I will do that and to make it complete I will add in a a little install section into the pod.

However before I go and do that I think I will look at the section lower down

no pod errors

Automating Stratopan Releases with Dist::Zilla

I recently started using Jeffrey Thalhammer's excellent Stratopan to manage CPAN dependencies for a new Perl project. I had played a little with Stratopan before, but now that I'm starting to get some use out of it, I am even more impressed with Jeffrey's work.

Stratopan allows you to create your own CPAN-like site in the cloud, which you can use to maintain a stable basket of dependencies for your project. You won't have to worry about new versions of distributions sneaking onto your private CPAN and breaking your stuff. Even better, you can upload your own, private CPAN-like distributions, and now you have the entire CPAN toolchain available to manage your internal codebase.

Read more at my blog: Automating Stratopan Releases with Perl's Dist::Zilla

Sick of being mocked by unit tests

Back in 2002, the company I worked for had a valuable client with a terrible problem: seems the developer of their POS (point of sale, or "cash register") system sent them a bill for their license: five year's worth. The company disputed the bill and the developer informed them that their POS system would be remotely disabled in 23 days. So our client contacted us and the owner informed a colleague and myself that we had just over three weeks to develop a POS for the client. Never mind that neither of us had any experience with swiped credit cards, or bar code readers, or cash registers, or, or, or ...

This is the story of how I learned to loathe unit tests.

search.cpan.org

Where oh where can my search.cpan.org be?

Enter MooseX, The First, I made it

Well I am happy to say my first MooseX module MooseX::AuthorizedMethodRoles is now happily up on CPAN and awaiting global usage by the entire Nation of Perl.

Well maybe not, I have found a use for it and maybe some one else will someday we will see what comes of it,

Now that I am a proud MooseX authour I wonder if I get to wear a funny hat of special badge or maybe at the next YAPC EU conference at the big dinner I will be asked to sit at the cool kids table

Draughtsman Meal.jpg

rather than being shuffled over way in the back with the Dutch

dsc_7923.jpg

Anyway I digress from today's task that is to see it there is anything wrong with my MooseX that I or Dist::Zilla did not pick up.

Dynamic Web-Based Student Management (thesis abstract)

For a post-graduate project in university, I developed a prototype web-based student information exchange system using Linux, Perl, it's associated modules, Ajax and SQLite. At my university, there was a bit of inefficiency in the exchange of student information which I set out to prove could be alleviated with a tailored minimalist web application written in Perl. This was achieved using the Catalyst framework and it's AutoCRUD plugin, written by Oliver Gorwits, for performing CRUD (create, read, update, delete) functions on most modern databases. I'd also like to thank Mr. Gorwits and Dr. Damian Conway for taking time to review the thesis.

The following is an abstract of the final thesis. Following posts will describe the steps followed in developing the prototype as well as code snippets.

ABSTRACT

Catalyst Development Summary

Hey All,

I've recently blogged about things we're doing with Catalyst. IF you are a Catalyst developer or just interested here's the post: http://jjnapiorkowski.typepad.com/modern-perl/2014/06/catalyst-development-and-stable-releases-current-summary.html

Looking for BTROTT

Benjamin Trott has 20 modules published on CPAN right now. Sadly, none of them saw a release in past 3 years. Following Neil's crusade to a better CPAN, I decided to adopt one module (for a start). As part of the process I need to articulate this intention in some high traffic place, as suggested by brian d foy (one of many PAUSE admins). Hence this post. Maybe it will find Ben.

PS: you can watch (and like!) this little endeavor of mine on Questhub.

UPD: Ben had responded to this call and now I'm a co-maintainer of Crypt::OpenPGP.

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.