Looking for a Movable Type hacker

blogs.perl.org is awesome but it has a few issues. Anyone out there to fix them?

For example there is no "previous articles" link on the front page but there are
82 other open issues as well.

I am sure there are some people in he Perl community who know or want to learn how to fix issues with Movable Type. You can fork the code on Github and make many Perl bloggers happy.

I am especially looking at you who endlessly complained about use.perl.org and that you could not fix issues with it.

WWW::Mechanize::Firefox 0.45 released

I've just pushed out a new release of WWW::Mechanize::Firefox , my favourite interactive web scraping module. The changes in this version are:
  • ->eval_in_page() raises errors from perspective of the caller instead of raising errors in Firefox.pm.

    This was an especially annoying error, as it always pointed to somewhere deep within Firefox.pm when I tried to access an non-existing Javascript variable or had Javascript disabled in Firefox.

  • Added ->by_id() method and { id => $id } option for conveniently finding elements with names that ->selector interprets as CSS selectors.

    As the main application I am automating at $work uses fancy names and ids in forms and values, like _id1:foo , I found myself constantly selecting elements through ->click( { xpath => q{//*[@id="_id1:foo"]}, which is not only unsightly but also does not respect the value ->current_form(). This change introduces `id`, which is a shortcut for Just That. I also added more tests testing those names.

One . Improved tests checking fields with fancy:names or fancy:ids

FOSDEM, second report - the talks!

THIS POST INCLUDES PICTURES!

At the second day of FOSDEM, the Dancer core crew pretty time took over the Perl dev room! We are 4 developers, and we gave 5 talks: SPORE (by Franck Cuny), "Code, release, market" (by Alexis Sukrieh), Curses::Toolkit (by Damien Krotkine), Moose (Sawyer X) and Dancer (Sawyer X). Somehow, all those talks mentioned Dancer, whether it was by the speaker noting the projects he works on, or by using it as an example in the talk (like Alexis did). The amount of noise and buzz we created around Dancer was very positive!

There were a lot of good talks in the Perl dev room (such as DTrace, XML::Compile, Packaging Perl), but I'll try to cover just a few:

mod_perl 2.0.5 has arrived!

Here's the link to the email announcement.

Thanks to the many, many contributors to this version. Please see the
summary of changes below, along with a special dedication for this
release to Randy Kobes.

You can get mod_perl 2.0.5 at one of the following urls, including the CPAN:

http://perl.apache.org/download/index.html

http://apache.org/dist/perl/mod_perl-2.0.5.tar.gz
http://apache.org/dist/perl/mod_perl-2.0.5.tar.gz.asc (pgp sig)

md5: 03d01d135a122bd8cebd0cd5b185d674

---------------------------------------------------

The mod_perl PMC dedicates this release of mod_perl to Randy Kobes, who
passed away in September 2010. Randy was a member of the mod_perl project
management committee and a co-author of the mod_perl Developer's Cookbook.
His work helped many Windows mod_perl users. His work with ppm files, and
Win32 perl users will be sorely missed. He was kind, bright, and always
willing to lend a hand on the mod_perl user's list.

Prepare modperl for the upcoming perl 5.14 [Torsten Foertsch]

Emacs frames are no more evil !

I'm an Emacs user for years now. I never used frames because "frames are evil".
Last week I discovered "framemove.el".

Framemove is easy to install. Get it from the emacswiki site and add following lines in .emacs :

(require 'framemove)
(framemove-default-keybindings)


Now you can switch frames with Meta+arrows. Works like a charm on macosx !

There's another kind of library like this called "windowmove", which does the same to windows as "framemove" does to frames. Both can be integrated (look inside the framemove.el file for configuration).

Today I even have Emacs start with 2 frames by default ! Tell me about changing opinions ;)

The coming bloated Perl apps?

A few weeks ago, I got annoyed by the fact that one of our command line applications was getting slower and slower to start up (the delay was getting more and more noticable), so I thought I'd do some refactoring, e.g. split large files into smaller ones and delay loading modules until necessary.

Sure enough, one of the main causes of the slow start up was preloading too many modules. Over the years I had been blindly sticking 'use' statements into our kitchen sink $Proj::Utils module, which was used by almost all scripts in the project. Loading $Proj::Utils alone pulled in over 60k lines from around 150 files!

After I split things up, it became clearer which modules are particularly heavy. This one stood out:

% time perl -MFile::ChangeNotify -e1
real 0m0.972s

% perl -MDevel::EndStats -e1
# Total number of module files loaded: 129
# Total number of modules lines loaded: 46385

CPAN Testers Summary - January 2011 - Wish You Were Here

Over the past few of months, various fixes and improvements have been made to the Builder process, which builds the pages and support files on the CPAN Testers Reports website. As mentioned in the last summary, this has made a noticeable improvement in the performance of the server. However, there were further fixes and enhancements planned.

Several updates ensued during January, not just for the Builder, but across several parts of the eco-system, both to speed up processing and to reduce the amount of file and database access. Previously several processes recreated their current view by reading the full result set from the database. As we now have over 10 million reports, this can take more time than is reasonable. With the use of the JSON files to record a snapshot, we can now start from a known point, thus meaning we only need to scan a few thousand records. This method has been utlised in other processes, even with smaller database tables and datasets, and the performance improvements have been significant.

Introduction to wirting readable and maintainable Perl

Hey all,

I just got back from FOSDEM 2011 last night and had an absolute blast, especially on Sunday when I spent the whole day in the Perl devroom. Thanks to everyone who came!

I gave a talk called Introduction to writing readable and maintainable Perl and I thought I'd share my slides here.

http://www.slideshare.net/kaokun/introduction-to-writing-readable-and-maintainable-perl

Unfortunately Google Docs => PDF => Slideshare isn't an entirely flawless reproduction, but most of the slides look ok.

I'm considering giving an updated version of the talk at YAPC::EU this year. If you have any feedback please leave a comment or send me an email :)

- Alex

Frozen Perl 2011: Parse::Stallion/Intro to Dancer/Hallway Track

I missed the Parse::Stallion and most of the Intro to Dancer talks because I spent it talking with olegm and perigrin.

I really would have liked to catch them but it is always interesting to talk with folks.

perigrin is a fellow player of Lacuna Expanse and it was good to meet him.

I then mostly listened to olegm and perigrin compare notes about putting on a workshop, relative costs...generally what perigrin was going to talk about after the Intro to Dancer talk. :-)

The most interesting comment was when perigrin said he would like to see a conference/workshop in each state in the US. It seems like every country in Europe has one so why not each state.

A very compelling idea, especially when you consider that Perl Oasis costs about $2,000 to put on an attracts around 40 attendees.

Easy DOM parsing with Mojo::DOM

Long ago, I used regex's to parse HTML.

They told me it was evil. They told me it was not maintainable. They were right.

But the alternatives were painful. They were clunky. They required me to change the way I approached HTML. They required me to abandon the hipness of css selectors I had embraced with javascript libraries, and ignore the many years spent perfecting my css-foo.

HTML::Parser, HTML::TreeBuilder, I'm sure you're brilliant in your own way. I'm sure you have conquered many lands, and for those who wanted to adapt to your mindset, you brought much happiness.

I wanted a simpler way. jQuery taught us that css selectors are that better way.

Fortunately, Mojo::DOM sprouted up out of the land of cookies and rainbows and unicorns.

Seriously, have you ever seen HTML retrieved, parsed, and processed so nicely in Perl?

Bringing Mojolicious to the dancefloor

Dancer's engines is really cool. You wanna know how cool? Here's an example.

If you like Mojolicious' templating system and you want to use it with Dancer, our interchangeable templating engines allow you to use a template engine of Mojolicious, if it exists.

And if it doesn't exist, you can write it. Oh wait, someone already did!

You can find it here!

Check out the source to find out how silly easy this is.

So, if there's another template engine you want with Dancer, try to write it! If you have issues, talk to us on IRC (#dancer on irc.perl.org) and check out other template engines.

QueryHunt my little experiment

For over a month I have been working on a little project called QueryHunt.
it is a questions and answers search engine powered by yahoo BOSS.

Why did I decide to use Perl for this project?

When I started working on this project I had just started to learn Perl, I was planning to write the site in PHP.
Perl had a lot of promising features that would make the development process easier in the long run
some of this features are

  • Easy XML parsing
  • Regex support (Vital to discard results that were neither a question or an answer.)
  • DBI (in case I decided to give PostgreSQL a try compatibility issues wouldn't be an obstacle)

so for obvious reasons I ended up using Perl, The site has now been running for about 2 months and I'm more than happy with it.

I'm not on vacations anymore so I don't get to work on it so much but I have a lot of ideas and I have started to work on a home-made crawler that I will be more than happy to share with Perl programmers.

I will keep updating this post to write about obstacles I face and other things that might help programmers that are working on similar projects.

Frozen Perl 2011: Parallel::Depend: designing a little language in Perl‎

Lembark's second talk is basically about designing a little language in Perl.

This module is a scheduler.

When designing a language it should be easy to edit, eyeball and parse.

It is a good idea to have line oriented and whitespace oriented tokens.

One should consider the primitives, basically what are the tasks you want to do.

Taking advantage of the overlooking ability of capturing split for grabbing tokens.

The given/when switch makes writing small languages much easier.

Once again a very good talk about an area that many people wouldn't have to do.

Dist::Zilla::PluginBundle::Author:: namespace

Following the lead of Mike Doherty (DOHERTY) I've moved my own Dist::Zilla Author PluginBundle into a new namespace:

Dist::Zilla::PluginBundle::Author::OLIVER

Having Author PluginBundles is a great system for saving me time and allowing others to build my modules with ease. However I had to agree to Mike's point that polluting the Dist::Zilla::PluginBundle:: namespace wasn't so cool. It also makes things more clear in the dist.ini file:

[@Author::OLIVER]

If you have an Author PluginBundle, please consider moving it into this new namespace. You can of course keep the old one around, in parallel, until code using it has moved off to the backpan.

Changing the changelog

Dave Rolsky has written a compelling post on how not to write a changes log. It's ironic (or is it? the meaning of "irony" is illusive) that while I have much criticism for the changes log of others (and have commented on them to people in the past), Dancer's changes log is not up to par with what I think it should be, nor what Dave thinks it should be (which is close to what I think).

Understanding Dancer's changes log

Dancer's changes log has two primary goals: mark down changes for Dancer users, and giving credit to the people who do it.

This means that in each version we have who did what change, and additional credit for whoever helped in any way.

While the current format of the changes log is not optimal, we cared more about maintaining the current state, and did not optimize it. Truth be told, it was a bad habit and none of us advocate the current style be remained.

A new path

The Floods Ate My Car, Literally

Hi Folks

Yes, it's true. Even though I live on the southern edge of the Australian mainland, the floods have hit here. I'm in Melbourne, the capital city of the state of Victoria.

Last night, about 9 pm, the floods from other parts of my suburb, Murrumbeena, backed up, and drowned my car to about halfway up the windscreen. The car was parked in the street, in front of the house.

Luckily, the house is on a slight slope down to the street, so the floodwaters stopped about the height of 1 (one!) brick below the floorboards.

This morning I was on the phone for about 10 minutes to roadside assistance (a commercial service) who say that since water got inside the car, it's an insurance matter. So, they transferred me to another department, and after another 25 minute wait I lodged a claim.

Since the car won't start, it's going to be towed to a local crash repair shop. I've been warned by the insurance company that there's no guarantee it'll be salvagable.

Frozen Perl 2011: ‎Perl Marketing and Evangelism‎

This is the first of two talks by oZ.

He likes Perl a lot, in the last few years there has been a fundamental change in Perl. Things like the modern Perl movement, chromatic's Modern Perl book, Moose, Catalyst and DBIx::Class changed how we can use Perl.

Even with all that Perl has an image problem.

What are the Perl companies we trot out: LiveJournal, Ticketmaster, Amazon and SixApart.

He noted that some of them are moving on to other languages for their new development and that some have written Perl in such a way that makes one not want to ever use Perl again.

Nick then presented some of the research he was done. Looking at sites like LangPop, doing searches in sites like Craigslist and sending out a survey to the many people and groups he knows.

He had lots of interesting quotes and such that I didn't put in my notes. I'm hoping he'll put the slides up on the Frozen Perl site. Looks of data to look at and ponder.

What's New in WebGUI 8.0 #3: Upgrade System

Following The Path

If you installed WebGUI 0.9.0 back in August of 2001 (the first public release), you've had a stable upgrade path through WebGUI 7.10.8 (January 2011) and beyond. Plainblack.com has been through every upgrade for the last 10 years, a shining bastion to our upgradability.

A WebGUI 7.10 user would not even recognize a WebGUI 6.0 database, much less the database used by the 1.x series, but slowly, gradually, our upgrade system brought new features to every WebGUI site that wanted them.

The Ancient Way

Our old upgrade system was quite simple:

docs/upgrade_2.9.0-3.0.0.pl
docs/upgrade_3.0.0-3.0.1.sql
docs/upgrade_3.0.0-3.0.1.pl

Our upgrade.pl script would check for docs/upgrade_*, compare version numbers, and then execute the .sql and .pl scripts in order until there were no more upgrades left.

Dancer FOSDEM mini-hackathon

I am honored to be sponsored by PEG, and I would like to thank them for it.

A team of Dancer core developers (Alexis Sukrieh, Franck Cuny, Damien Krotkine and myself) will be having a mini-hackathon this FOSDEM. This is made possible since we will all be staying together in the same apartment for the duration of the event.

We will focus our efforts on merging Github Pull Requests and closing as many tickets as possible. New features might be worked on, but it is not part of the official plan. We leave room for improvisation. :)

I want to thank everyone who pushed commits and changes into Dancer. I've been very surprised (yet thrilled) at some of the new faces we've been seeing on our IRC channel (#dancer on irc.perl.net) and in our pull requests. While some of these were merged on the spot, others were waiting longer in the queue. This is what we will try to focus on.

The next post will include another issue which will be worked on during the hackathon, which is the Dancer changelog.

If you're arriving at FOSDEM, we have a Perl room and a Perl booth. Feel free to stop by, say hi, catch a few interesting talks and jibber-jabber with us!

Dist::Zilla::Plugin::MetaResourcesFromGit

The CPAN META specification includes support for "resource" links to homepage, bug tracker, mail list, source code repository, and so on. These will appear on search.cpan.org if you ship a META.json with your distribution.

Dist::Zilla's MetaResources plugin allows you to set these links in the distribution config, but I wanted something a little more automagical. This can be done because I've set up my GitHub repositories with consistent naming and layout.

So my new plugin, Dist::Zilla::Plugin::MetaResourcesFromGit, is a drop-in replacement for the standard MetaResources plugin. It automatically generates four resource links based on the name of the distribution and the remote git repository settings. Simply use the plugin in your dist.ini file:

[MetaResourcesFromGit]

The default links are equivalent to:

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.