Alien::Base Grant Report November

This month featured lots of work in the latter parts of Alien::Base. These improve library detection logic, pkg-config functionality and packlist support.

I was especially pleased to get a bug report filed by bpo regular Toby Inkster. He is writing a provisional Alien::LibXML based on Alien::Base. He noticed some odd behaviors that we are still trying to work out. This feedback led to more improvements than just his, so please keep the bug reports coming!

This month I released three dev versions, the latest being released this evening. I also released Acme::Ford::Prefect again, this time the tests shouldn’t fail on CPANtesters computers who don’t actually install the dependent modules for the one that they are testing. This module is one of the “downstream” modules that are part of the test system for Alien::Base (along with Acme::Alien::DontPanic). These are needed since some of the magic happens during the final installation so tests have to occur AFTER installation of the module in question.

How to use SOAP::Transport::HTTP::Plack

I needed to port a little cgi-script that implements a simple SOAP-server to Plack. After a little searching, I came across SOAP::Transport::HTTP::Plack.

Unfortunately, the documentation of this module is ... not really helpful.

Here's my (slightly modified) cgi-script:

#!/usr/bin/perl

use SOAP::Transport::HTTP;

SOAP::Transport::HTTP::CGI
    ->dispatch_to(
        '/some/directory', 
        'Some::SOAP::Module1', 
        'Some::SOAP::Module2',
    )->handle;

Simple enough.

De Morgan's laws in Perl

We've been simplifying some ugly code recently, and De Morgan's laws have come up more than once. A developer on the team complained the Wikipedia entry obscured - from a developer's perspective - the simplicity of these quite useful transformation rules, so, expressed in Perl:

Given $p and $q as truth values:

(! ( $p && $q ) ) == ( (! $p) || (! $q) )
(! ( $p || $q ) ) == ( (! $p) && (! $q) )

OR:

NOT( p AND q ) is equivalent to (NOT p) OR  (NOT q)
NOT( p OR  q ) is equivalent to (NOT p) AND (NOT q)

So for example, say you come across a beauty like:

foo() unless (! $bar) or $baz;

You can use De Morgan's to translate it to:

foo() if $bar and (! $baz);

Wikipedia entry: De Morgan's laws

A font just for sarcasm - gotta love it

Hi

Yes, it's true:

Click to behold.

Cheers

Open source motivation survey

Hi!

Please fill this Perl community motivation survey.

It's short and shouldn't take more than 2-3 minutes of your time.
If you ever shared your software, commited a patch, reported a bug or wrote a blog post on Perl, your opinion matters.

The reasoning behind this survey:
For the Play Perl project to succeed, I need to figure out if there's a demand for this product, and which features will be more important. I've already spent a considerable amount of time thinking about it, and I'll share my ideas about why I'm doing what I'm doing after the survey will be over.

Of course I'm also going to share the aggregated results of this survey for everyone to meditate on.

By the way, Wufoo doesn't allow free accounts for users from my country, so I spent $15 on it. I guess I'm motivated enough :)
So I hope we'll get enough answers, and PLZ RT.

Using Perl's Catalyst/HTML::FormHandler integration with Bootstrap and JQuery

dpetrov (Dimitar Petrov) has forked, improved and now hosted the HTML::FormHandler demo/example app on dotcloud, and it looks rather nice!

You can explore the demo at http://formhandler-perl.dotcloud.com/ and see the sourcecode behind it at https://github.com/dpetrov/formhandler-example

Fun things he's added are some table ordering, labelling required fields, and integrating jquery validation (via my plugin for HTML::FormHandler)

Writing State Monads in Ocaml

One of my projects for quite a while is to understand Monads. I have been working on this, off and on, for an embarrassing amount of time. Yes, I could have just learned Haskell and that would have done it but I wanted to be a pain in the arse. Also, I had a horrible experience attempting to learn Haskell a long time ago. Thus, I decided as I use Ocaml for most things then I should be able to do it. First, I read this article a few times and this which is really good and helps hugely in my understanding. Anyway, I will take a step by step approach to showing how to write a State Monad for Ocaml.

A Look at Recursion

I created a blog about Perl over on Blogger and I have just posted an new article on recursion.

Categorizing CPAN modules

Warning: no polished content ahead (as if my writing is polished?) It's all brain dump.

CPAN has categories, but it has long been unmaintained and not very deep/specific: http://www.cpan.org/modules/by-category/

Should there be a new category/dmoz-like-directory project?

Creating tasks like Task::Topic::DataValidation or Task::{BeLike::SHARYANTO,}::Topic::{DataValidation,Logging,...}? Cute? Maintenance nightmare? Pointless? Probably all of them.

Should CPAN META contain tags, to let authors categorize themselves? Since nowadays the trend is using cute Ruby/Python/npm style for modules, and thus the module name themselves are not indicative of the modules' nature.

Should metacpan or other project let people crowdsource this? People can already comment/rate modules and star/favorite them. Adding tags is just one more "social stuff" to do.

Selenium WebDriver with automated Basic Auth credentials

Selenium is a marvelous library for automating browsers. Perl has an interface via Selenium::Remote::Driver. A short script looks like:


use Selenium::Remote::Driver;

my $driver = new Selenium::Remote::Driver;
$driver->get(‘http://www.google.com’);
print $driver->get_title();

$driver->quit();

Under the assumption that a selenium server is found, this will launch google and print the title. It works very well for a lot of scenarios. One scenario where it has trouble is with Basic Auth and credentials. The browser usually outputs a popup requiring user-input.

Google Refine + Perl

(repost from http://sysd.org/google-refine-perl-english/; it's more contextual here)

Google Refine is awesome. If you're unaware of what it is, access their official page and watch at least the first screencast. You'll see it can be helpful for several ETL-related tasks.

Currently, I use it a lot, specially for simple (but boring) tasks, like loading a CSV, trimming out some outliers and saving as JSON to be imported into MongoDB. Nothing a Perl one-liner couldn't do.

However, the opposite is not true: Perl one-liners are a lot more flexible than Google Refine. Now, what if we could merge both?

YAPC::Europe 2013 in Kiev, week minus 38. In Kiev as a tourist

Not too many news about the conference today, although I made a visit to Kiev as a bare tourist (well, actually, as a fan of one of the actors) and this note is about that.

Marpa::R2 is now in full release

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

Announcing Marpa::R2

Marpa::R2 is now in full, official release. For those new to this blog, Marpa::R2 is an efficient, practical general BNF parser, targeted at applications too complex for regular expressions. Marpa::R2 is based on the Marpa parsing algorithm. New, but squarely based on the published literature, the Marpa algorithm parses every class of grammar in practical use today in linear time.

Marpa::R2 is the successor to Marpa::XS and

  • installs and runs on Windows.

  • has better error reporting.

  • is faster.

  • has a cleaner, simpler interface.

Marpa::XS remains available and, since changes to it are now on a "bug fix only" basis, should be quite stable. While Marpa::R2's interface will have a familiar look to users of Marpa::XS, it is not fully compatible: changes are documented here.

The next Galileo will allow database upgrades

I wrote Galileo partially as a reason to learn DBIx::Class. For those of you who may not know, Galileo is my CMS, designed to be completely installable from CPAN.

As a scientist I’m not very proficient as a database admin. Part of what I love about DBIx::Class is that I didn’t have to learn database administration or SQL, it does that for me. Perhaps I had gotten a little overconfident.

Play Perl project

I want to launch a new website for the Perl community.
I'd say it's a social network, but the main purpose and the main measure of its success is getting stuff done.
I'd say it's a todo-list, but I want the list of tasks to be public and people-oriented, not project-oriented.
Oh, and it's also going to be gamified.

It's not ready yet. I have some code and a pretty consistent development pace, and I think it's a doable project, and I think I need co-developers and early adopters to succeed.

But first, a bit of the backstory...

Friday Time Waster: Watch the world go by in ASCII with Reuters' API

I've recently released WebService::ReutersConnect. It's a Perl modules that interfaces with the ReutersConnect's API in OO style. To demonstrate it and hopefully entertain you on this Friday, here's how to use it to watch the world go by in glorious ASCII and from the comfort of your command line. To put it shorter: The perfect Friday Time Waster.

Read more here.

Cool things you can do with Perl 5.14

Perl 5.12.0 introduced pluggable keywords. This feature lets a module author extend Perl by defining custom keywords, at least as long as that module author knows XS and how to construct OP trees manually.

Perl 5.14.0 added many functions to the API that make custom keywords worthwhile (especially the ability to invoke the Perl parser recursively in order to parse a custom syntax with embedded Perl fragments).

So what can this be used for? In the following, I'm going to show you three modules I've written that make heavy use of custom keywords.

Perl in msysgit : call for help

The port of Git on Win32, msysgit, has Perl bundled with it. This means that most Git users on Windows have a perl installed somewhere. This is an important opportunity to bring developer tools written in Perl to a larger audience. My own github-keygen tool is one of them.

Unfortunately, that perl has some quirks:

  • this is an old 5.8.8, with a huge patch
  • it is built on msys, which a quite uncommon environment for Win32 perl developers (from the Perl developer it more like Unix : forward slashes, PATH separator is ':'...)
  • some core modules are missing. I noticed in particular the whole Pod:: tree

I tried to work on the Perl upgrade, but this is a too tough task for me.

So please help to bring a modern Perl to the Windows world!

Publicly accessible archive of perl security advisories?

There seems to be no announcement/read-only public mailing list archive related to perl security issues, unlike freebsd-announce@freebsd for example. Is there a publicly accessible URL where past (perl security) advisories issued are collected?

A search that failed to produce the desired result: Google: perl security advisories (various issues listed at many places; no one archive)

(I had posted this as a comment elsewhere which may or may not be approved by post owner.)

Perl 5 Porters Weekly: November 5-November 11, 2012

Welcome to Perl 5 Porters Weekly, a summary of the email traffic of the perl5-porters email list.

This week's topics are:

  • Perl 5.12.5 is now available
  • no easy link to quick hacking recipe?
  • -DNO_TAINT_SUPPORT in blead

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.