PR-Challenge: January
As pointed out in my previous post (here), in the January assignment on the Pull Request Challenge, I got the Data::ObjectDriver module.
For this module I created two very simple pull requests. One regarding its management with Module::Install, that is quite dependent on the author's taste. That one wasn't merged yet and who knows if it will. The second one, also very simple, just fixed a test that relied on a DBD::SQLite error message that changed with recent versions. This PR was merged, and a development version of the module just hit CPAN.
Meanwhile, I think the most interesting achievement on this month challenge was that with this we got SIXAPART guys, that use this module heavily, to adopt it. Therefore, the current maintainer that did not have much time for it can now rest, and the module will get updated in the future. Also, the SIXAPART guys just resurrected their CPAN account.
This all to say that this challenge can be useful in quite different way.s
Mojolicious and special variable names
I recently started using Mojolicious and this week I encountered a problem when stashing data for rendering in the template.
I tried to stash a reference like this:
my $data = from_json($json_string);
$self->stash(data => $data);
Now when reloading the page it will just render something like HASH(0x85af7b0).
What has happened here is that the "data" variable is used by Mojolicious internally and that is what is rendered instead of the template.
If someone can write a better explanation or point to where this is documented please do so.
FindBin is fixed
I cannot comment on https://blogs.perl.org/users/buddy_burden/2015/01/kiss-kiss-shebang-shebang.html (seems to be an MT bug)
So I'm trying to post an article.
FindBin had a bug for quite a while but was fixed in perl 5.16 as I wrote in http://www.perlmonks.org/?node_id=41213
Here's the bug report: https://rt.perl.org//Public/Bug/Display.html?id=89698
Still, people discourage from Findbin usage, either because they don't know about the fix, or because 5.16 is not used everywhere yet. (Or because of any other reason? tell me)
That's why I wanted to mention the fix here.
Automated Scoring Systems
I’ll be giving a talk tonight at MadMongers about automated scoring systems such as Google PageRank and SpamAssassin and how that tech can be applied in other fields.
[From my blog.]
What should be in a CPAN distro README?
Most of my READMEs are lame. I have stuff that no one will really ever use. As I'm cleaning up my distros, I starting thinking about what should be in there. To do that, I have to think about the people who would read such a thing.
A long time ago in an internet far, far away, READMEs were small documents that you could inspect before you committed to the full download. After that, we neglected them for a long time. Then GitHub started formatting them, so now they are interesting again.
But who would read them?
Some people turn the embedded module documentation into text and put that in the README, but that's so much easier to get on CPAN Search or MetaCPAN.
I don't think people read the file to get installation instructions or to discover my email address.
Looking around CPAN, I saw that I wasn't doing so poorly relative to everyone else. We, as a group, keep this thing around without really making it useful.
Kiss Kiss Shebang Shebang
At the end of the discussion, our sysadmin commented:
Perl sure does seem to need a lot of scaffolding these days before one can get around to the business purpose.
And my response was that Perl had always needed a lot of scaffolding. It’s just that we never used to notice, because it was all built-in.
Pretty much every Perl tutorial is going to tell you that the first line of your first Perl script should look something like this:
#! /usr/bin/perl
More details on the CPAN Pull Request Challenge
The CPAN Pull Request challenge has had way more signups than I was expecting: 343 so far! Some are very experienced Perl programmers and CPAN contributors; some are long-term Perl programmers using this as a way to "give back"; a few are new to everything.
I wouldn't have predicted 300 pull requests in the entire year. Now we might
get that in January alone!
I know some people are concerned of the effect that this wave of locusts
enthusiastic contributors might have, particularly if authors have to start
dealing with pull requests that don't really add much value.
As a result I think it's probably helpful to give some more details on the challenge, give CPAN authors a chance to comment, and even to opt out.
Can you provide an x/y Point class in other languages?
Update: Thanks for all of the replies. However, I now need to block further replies due to the huge amount of spam this post is getting.
I'm writing a talk for Fosdem entitled "Perl 6 -- A Dynamic Language for Mere Mortals." The talk is about Perl 6 and is aimed at programmers, not just Perl devs. As a result, I'd love to find examples in Java, Python, Ruby, and so on, which are roughly equivalent to the following Perl 6 class.
class Point {
subset PointLimit of Real where -10 <= * <= 10;
has PointLimit $.x is rw = 0;
has PointLimit $.y is rw = 0;
method Str { "[$.x,$.y]" }
}
That class lets you do something like this:
My CPAN Cleaning, Day 2457034.500000
I've been playing with the Makefile.PL modulino idea this week as part of my CPAN cleaning. It's dangerous to have so much fun because I'll keep working on it. Someone might need to take my GitHub away.
Before I go on, I'm disappointed to report that the green boxes in my GitHub activity are relative to me. I was happy to make dark green boxes each day this month, showing the highest level of commit(ment)s. But then I made a few changes to about 120 repositories and pushed about 700 commits one night. Some of that was turning on GitHub pages for everything, I think. That box turned dark green, but all of my other dark green boxes disappeared because the extent is relative to me and not some level set across all of GitHub.

Serializers for Perl: when to use what
This is a moderately edited (primarily rearranged) version of a comment on the Perl 5 issue tracker written by Yves Orton (demerphq). I thought it would be useful to a wider audience so I am reposting here with permission.
Note: this was written off the cuff and is not comprehensive. In correspondence, Yves noted that such an article could/should cover more formats, e.g. MsgPack.
I [feel strongly] that Data::Dumper is generally unsuitable as a serialization tool. The reasons are as follows:
A little warning to EUMM and shell-script users
I sometimes need to write shell-script test scripts and not perl, to be able to test perl scripts, without interfering with perl, and also for performance and easier IO reasons.
In order to find out with which perl this distro was built, we need to parse the generated Makefile.
Recent EUMM 7.0x introduced a new feature which broke all my scripts. They started double-quoting PERL and FULLPERL in the generated Makefile. Damage is already done. They only thing you can do is to remove the quote.
PERL=`grep "^PERL =" Makefile|cut -c8-`
PERL=${PERL:-perl}
PERL=`echo $PERL|sed -e's,^",,; s,"$,,'`
CPAN Pull Request Challenge: The Pull Request
In my last report, I had received an ok from the module's author to proceed with a pull request. The first thing I did, as I had with the modules referenced by Devel::StackTrace::WithLexicals
, is to write an example for myself so I could see how it worked. Working from the synopsis, I had a difficult time writing a working piece of code. It occurred to me that this was the very place I could start with a Pull Request.
MetaCPAN Welcomes Panopta as a Sponsor
As you may know MetaCPAN as a project has no budget. We rarely solicit funds because we rarely need to pay for anything. This has allowed us to focus on the project itself rather than the administrative issues that arise whenever money changes hands. Because these relationships allow us the freedom to do what we need to do, we think it's important to thank our sponsors publicly.
And with that introduction I'd like to thank Panopta, the latest sponsor in the MetaCPAN world.
A while back I put out a call on Twitter to see about getting someone to sponsor a monitoring solution. Less than 30 minutes later, I got a response directly from Panopta. I started an email conversation and we had a sponsored account in no time.
Awesome Perl
An interesting list of awesome-perl.
The sad story of pseudohash criticism
I just had to endure MJD’s horrible pseudohash explanation at the Pittsburgh Workshop. “A new, never-before-seen talk on Perl’s catastrophic experiment with “pseudohashes”, which wasted everyone’s time for nine years between 1998 and 2007”
https://www.youtube.com/watch?v=-HlGQtAuZuY
Watch it, you can fast forward through it. I honestly had higher opinions on Marc-Jason.
So let’s see what’s wrong with the popular and uninformed pseudohash critic:
Their main points are that storing a hash in the array slot 0 for run-time lookup is too complicated, the exists and delete ops need to check for arrays / pseudohashes now also, and all the pseudohash checks slowed down general hash usage by 15%. Which basically levelled the advantage of faster compile-time accelerated array lookup on those pseudo hashes, which was ~15%.
Test-Simple, Test-More, and Test-Builder. What is breaking? Should I be scared?
Whats breaking? Much less than you might expect, but more than I had hoped.
Should I be scared? If you do not test your things now, and file reports for me to fix bugs, then yes, you should be VERY scared.
That about sums it up! (Just kidding.) But in all seriousness, PLEASE TEST YOUR CODE!. Please install the trial releases of Test-Simple, try building your dependency chains against it! Please also try your non-cpan code against it. There has been plenty of warning, and you still have almost 3 months to file bug reports.
What breaks?
Code that does any of the following is no longer supported:
- Replacing the $Test::Builder::Test singleton
- Monkey-patching Test::Builder (Note: Exceptions for some commonly monkey-patched subs)
- Directly modifying values in the Test::Builder instance hash
There are a few monkey-patching exceptions, if your code wrapped 'ok', 'diag', 'done_testing' or a couple other common ones, some fancy hackery has been done to allow them to keep working.
A survery of gettext and I18N resources
I'm collecting notes on Perl modules, including articles, which impinge on this huge issue.
I'd be delighted if someone has beaten me to it, but if not, please comment freely...
Downloading Criminal podcast episodes
On my quest for downloading more podcasts, I decided to tackle another podcast I started listening to, Criminal.
This posed a set of new problems, and I'm going to go over the code for solving it, since I'm actually somewhat proud of it.
2015 CPAN Pull request Challenge - collected links
As a minor contribution to the challenge, I've started to collect the links
about the CPAN PRC If something is missing, please send a pull request. (No, that pull request won't count as being part of the challenge :)
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.