5 jQuery tutorials for budding Perlmeisters

Click keep reading to, errr, keep reading.

This is because I put the text of the entry in MT's 'Extended', and now I've just added this stuff to 'Body'.

Also, the 5th tut is on Autocomplete.

YAPC::Europe 2013 in Kiev, week minus 19

This week's newsletter

How to involve more Indians in the Perl community?

A few days ago I published some data on the distributions of visitors of the Perl Maven site and the people clicking on the links in Perl Weekly newsletter. (The number of visitors there is not that interesting.)

One intersting part of the data is that the 11.68% of the visitors of the Perl 5 Maven site are from India while they only generate 1.60% of the clicks in the Perl Weekly.

Why is the difference and what can be done with this information?

Is the module list useful?

Is the PAUSE module list (www.cpan.org/modules/00modlist.long.html) useful anymore? Do any cpan clients, or other tools, make use of it?

I've seen many users (via http://www.nntp.perl.org/group/perl.modules) isubmit their module for registration immediately after upload, so there seems to be an impression that it is a necessary step, despite the PAUSE documentation saying it's not (however it is quite vague as to *how* useful this measure actually is).

This list doesn't even seem to be up to date - e.g. I don't see my module Test::LWP::UserAgent in the list, despite registering it many months ago.

Chicago.PM - Dependency Injection (also: Beam::Wire)

At this month's Chicago.PM meeting, I gave a presentation on Dependency Injection and my new module, Beam::Wire.

[EDIT: The presentation doesn't appear to work on mobile devices. I'm trying deck.js, and I'm not sure I like it.]

Role::REST::Client and hash key randomization

Role::REST::Client is a small module to be used as a Moose role. It will enable your module to call REST services in a clean, transparent way. It was originally a part of Catalyst::Model::REST , and I guess that is still the main use case, but it can really be used in any module needing to call a REST service. To use it, all you have to do is

use Moose; 
with 'Role::REST::Client';

and you will be able to use ->get, ->post, and so on with Role::REST::Client handling the encoding, (de)serialization, etc of the call. Thanks to many contributions from Wallace Reis, Matt Phillips and Mark Stosberg it is very configurable and robust.

I've been getting error reports for some time, but a cursory glance through the code showed no faulty use of hashes. I've used all my ressources at $work, so I haven't had time to dig into this problem, until Сергей Романов (sergeyromanov) poked me with a pointy test case. The problem was easy to find, two parameters to ->new relying on their individual order.

Problem is fixed and uploaded to CPAN as Role::REST::Client 0.15

Bringing Old Modules Up To Modern Specification

While working on Pinto, I discovered that a fair number of distributions on CPAN have invalid or incomplete metadata. This makes it hard for the toolchain (Pinto especially) to fully utilize them.

Usually the offenses are pretty minor -- misspelled or missing keys in the META files, or a non-parsable version number. Some of us have probably made local patches of these distributions to fix those problems. But there's no reason everyone should have to do it.

So I had an idea -- what if there was a secondary public CPAN where folks could contribute patched versions of these older distributions? Read the rest of the story here:

https://github.com/Stratopan/Patchpan/blob/master/README.md

What does this PHP print?

Via this blog entry which I'm sure some of you have seen before, the following PHP prints "horse".

<?php
  $arg = 'T';                                                                                                                
  $vehicle = ( ( $arg == 'B' ) ? 'bus' :
               ( $arg == 'A' ) ? 'airplane' :
               ( $arg == 'T' ) ? 'train' :
               ( $arg == 'C' ) ? 'car' :
               ( $arg == 'H' ) ? 'horse' :
               'feet' );
  echo $vehicle;
?>

No fun shooting fish (or a horse) in a barrel, but wow. Just wow.

A Case for Tie::Array::CSV

What is the favorite module you have released to CPAN? For me, its not some shiny CMS or fancy scientific simulation. In fact, mine is probably horribly inefficient, maybe even a little evil, but I like this one best because it is clever.

Today I used my favorite of my modules in order to accomplish a difficult task, and in doing so I found a little bug, which I have just fixed. Which one is it? Let me introduce you to Tie::Array::CSV.

Cluj.pm Anniversary Meeting Report

So, I went to Cluj.pm's anniversary meeting this month. It's been a year since Cluj.pm was formed and I've been lucky enough to be invited to the event. Here's my report of it.

Code Pornography

Ok, that title is a bit of a teaser. But I do think that code should be sexy. In this full-color high-definition world, we've come to expect things to actually look attractive.

I'd love to see pretty logos or icons for each module on MetaCPAN. Perhaps we could add a new attribute to the META spec that points to an image file inside the distribution, or a URL somewhere.

Citations in the Humanities

I have written a few articles and more than a few essays for school/class. I know most of the major citations styles (MHRA, MLA, Chicago, etc.). Mostly, however, I use biblatex to format them all. However, I have begun to think that most of these citation styles are really just pointers to other resources or more generally they are really just URLs with a arcane special formatting rules. Many academics are obsessed with these bits of meta-data as they validate that the writer knows the rules of the road. When I read academic articles or books, I generally don’t notice or skip over citations as, while they are necessary and useful, they don’t always help with digestion of the actual argument. Although, occasionally in fields I know well, I will scan the citation to see who they are referencing just for credibility purposes.

Chef cookbook for plenv

plenv is so cool that I'd like to use it for my personal project. Then, I have to hack up chef cookbooks for automated provisioning. I tried to write Chef LWRPs for the first time.

Using the cookbook, you can easily install perls via plenv and CPAN modules via cpanm.

I'm waiting for your feedback.

Usage

Using Attributes and Recipes

Add these recipes below into run_list:

recipe[plenv]
recipe[plenv::install]
recipe[plenv::global]
recipe[plenv::cpanm]

Then set attributes described later.

Using LWRPs (Recommended)

Only recipe[plenv] should be added into your run_list.

recipe[plenv]

Then use LWRPs in your own recipe.

Mobrater and White Camel Nominations

I'm looking for nominations for the 2013 White Camel Awards, and this year I'm using MobRater, a PlainBlack service, to get those nominations at http://whitecamelawards.mobrater.com.We're looking for people who have made significant non-technical contributions to Perl and the Perl community. We typically divide that up into user groups, community, and advocacy, although the categories are a bit squishy.

Us using MobRater doesn't mean that the most voted nomination will get the award, but the committee will certainly take that into account. There might be a great nomination that comes in at the end and doesn't get that many votes. To help get around that, check back sometime to vote on the new people added.

You can vote on the names there and also add your own. I'm really looking for new names, especially in the communities that might not overlap that well with the US and European communities that I knew much better. So far, we've had no one from India or Africa receive an award, and we've had very few recipients from Asia and South America. There might be people doing great things for their local communities that don't get much press far away.

Fat Versus Thin Core

I used to feel the Perl core should be as small as possible. That is, it should ship with the smallest number of modules whilst still being "practical". For everything else, there is CPAN.

So naturally, I was pretty pleased when I heard that CGI and some other modules were going to be removed from the core in perl 5.20. But lately, I've started to change my view on that. Here is why...

Encouraging bloggers to use the 'extended' feature

This is a collection of ideas for how we can encourage bloggers using blogs.perl.org to split their posts into an abstract and body. Attempts at education have largely failed, so I think we should try something else.

App::Midgen, Take two

First I would like to say a big Thank You for all the critiques I received, here and in the channels.

App::Midgen

Food for thought, if we update our Modules, don't we want our users to use the current version, so should we not by default do the same with others Modules. Thus we always show the current version number, regardless.

Now able to show dual-life modules current version number.

Lets start with the changes and inspiration.

  • Switched to using MetaCPAN-API due to a write issue with CPAN, neilb++

  • Switched to using Perl-PrereqScanner to do most of the grunt work as pointed out by Mithaldu++ daxim++

  • spelling, re-factor option names, inspired by mauke++

    • --format change output format
  • changed default output, no extra processing, only distribution version for modules without a version number mst++

if I missed anybody, sorry

And some new features.

Add command line option to show dual-line module versions as well.

midgen --dual_life

Add ability to read/write options from ~/.midgenrc

Back in the #!perl groove ...

I've taken a lot of time off from the work force (and even more from the community). I have been occupying my time with pursuing other ventures (my other brand), but now I find myself actively desiring to write code.

So i began by refreshing and slightly expanding the "jeffa/unlocalhost" brand and ensuring all was available and secured. Next I grabbed the small amount of old code from my CPAN repository and rebuilt each distribution using Module::Starter. Not only did i upload each distribution to github, i also set up Jenkins on my server and set up a job for each one. Each Jenkins job clones a read-only copy, builds the make file, runs the tests (and creates JUnit output for Jenkins) and builds a tardist upon success.

Awesome. Not a bad first step if i do say so myself. And in the process of setting this up i was already able to correct some Pod::Coverage infractions. Next step will be to write proper tests for each of these distros but i am not going to spend too much more time on them. If others wish to fix bugs or otherwise enhance the code they now have a much cooler way to submit patches.

Bigger fish to fry ahead ... >:)

FLOSS Weekly Interview on Pinto

My FLOSS Weekly interview on Pinto is now online here:

http://twit.tv/show/floss-weekly/246

Big thanks to Randal Schwartz and Aaron Newcomb for having me on the show!

Gtk3::WebKit on Ubuntu

After some really fantastic help & support from potyl I got Gtk3::WebKit to pass it's installation tests on Ubuntu 12.04 (precise, LTS).

Given that this requires one step that cpan/cpanm won't deal with out of the box, in the interests of documenting for the interwebs ...

Dependencies ... at least on Ubuntu 12.04:

aptitude install xvfb libgirepository1.0-dev pkg-config libgtk-3-dev libglib2.0-dev libglib2.0-0 gir1.2-webkit-3.0

Gtk3::WebKit isn't intended to run "headless", which might be one response to the comments on Web Scraping with Perl & PhantomJS about why you'd want to use PhantomJS instead.

However, having been enlighted by potyl, you CAN run it sorta pseudo headless, by using framebuffer display. And thus, no X server is required.

But this is the bit that's going to throw cpanm and naive installs off. Here's the voodoo that you do:

xvfb-run --server-args="-screen 0 1024x768x24" cpanm Gtk3::WebKit

or, if you're doing it old school

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.