Pod::Perldoc at 3.19_01

One of the things that brian d foy worked pretty hard on for Perldoc inside of 5.16 was better UTF-8 support. We found that there are a huge number of variables for getting good Unicode support out of the "man" formatting pipeline. perldoc internally uses the "podulators" distribution to turn POD markup into man pages, HTML, XML, etc. But with the "man" formatting, the pipeline of operations looks something like this:

perldoc (a tiny little wrapper around the Pod::Perldoc module) finds the appropriate pod markup (either embedded in a .pm or a .pod), passes it to Pod::Man, takes the output from Pod::Man and then invokes the "nroff" implementation (which is usually groff) and sends it to your pager (less, more, etc) where it's displayed on your screen.

That's a lot of places where UTF-8 can go sideways. And it usually does.

Command history in the perl debugger

I’m always forgetting what pieces I need to make this happen, so I’m writing a note to my future self.

Ubuntu Packages

Install:

  • libncurses-dev
  • libreadline-dev

Perl Packages

Install:

  • Term::ReadLine::Gnu

Save a little time with puppet

Include these somewhere and run a puppet update

class libncurses-dev {
    package { libncurses-dev: ensure => latest }
}

class libreadline-dev {
    package { libreadline-dev: ensure => latest }
}

Save the history to a file

Add this to ~/.perldb

&parse_options("HistFile=$ENV{HOME}/.perldb.hist");

Alien::Base - progress and problems

After a busy Christmas season and being engrossed in my upcoming thesis defense I have found it hard to find too much time to focus on Perl projects. Still Alien::Base has been on my mind, and happily it has been on the minds of others too!

In this report I want to focus first on the high points. Far and away my high point has been that in my apparent absence others have taken up the mantle. I have gotten bug reports and pull requests from preaction, giatorta, amannb, mokko, tobyink and as always productive conversations with David Mertens. It helps in a tough project like this has been to see the excitement of other developers, waiting for me to finish this project.

Several bugs have been fixed, others have been identified. I hope to have another dev release out soon. Further I plan to release a version of Alien::GSL which depends on Alien::Base to CPAN not long after that.

FOSDEM 2013 call for papers

hi all, on behalf of wendy

https://nxadm.wordpress.com/2013/01/25/perlfosdem2013-a-very-late-call-for-papers/


------------------snip-------------------------------------------------------
Dear Perl Mongers,

I have to make this short and simple.
Therefore most of this email is copied from last year's
Call for Speakers.

What? Fosdem, Brussels, 2 & 3 february 2013
https://fosdem.org/2013/

Where? Free University Brussels, Campus Solbosh:
https://fosdem.org/2013/practical/transportation/

Why so late?
Because our dev-room request was denied at first.
They gave it to another programming language community.
Now another community could not fill their dev-room.
We are Perl, so we jumped in and we asked for this.
We got it. Now we have to fill it.

So be quick and send in your presentation proposal.

To:
Claudio Ramirez (nxadm, email: padre.claudio at apt-get.be)
and
Wendy van Dijk (email: nl.pm at wendy.org).

Thank you. Hope to meet you all in Brussels.

paging Andy Orr (PAUSEID:AORR)

Has anybody heard anything from Andy Orr (PAUSEID:AORR) in the last 18 months - He has a CPAN module (PDF::Report) with bugs untouched since 2009 and no cpan uploads since then.

Mailing his cpan mail has had no response, I'm hoping somebody who is still in touch with him could provide an up to date email address where I can reach him to talk about future development of this and the PDF::Report::Table module.

Cheers

YAPC::NA 2013 in Texas, June 3-5.

YAPC::NA 2013 will be held in the "Live Music Capital of the World", Austin, Texas, from June 3rd through June 5th. 

The conference theme is "25 Years of Perl". Come celebrate Perl's silver year with all your favorite members of the Perl community. 

http://www.yapcna.org 

Registration and talk submissions have been switched on. We'll be posting more about this very soon.

Talk to you soon,

YAPC::NA Team

Building Perl 5.16.2: Windows Madness!

I think it bears repeating -- on Windows with Cygwin, edit PATH to remove unfriendly characters like '(' (I'm looking at at you, C:\Windows\Program Files (x86)).

At least for me, this wasn't an obvious problem either...

Economics 101

Take a look at this graph of alternate browser adoption:

Firefox adoption dropped 20% in a year and a half on that chart. What does that tell you about Firefox? Nothing. That's the problem.

Profiling Dist::Zilla

Dist::Zilla is slooooowww!

This is in part because it uses Moose. In part because it has many features. In part because it uses App::Cmd that has a major design issue (it loads all command plugins on every run).

But this is also because most plugins are written without care for their compile time and run time cost especially when they are loaded but not used. For example the BeforeRelease plugins when you just run dzil test.

Despites this I'm using it every day at work (because it is powerful), but with much pain.

So here are some tips on how to contribute to improve that situation.

A funny thing happened on the way to the p5-mop...

So, I mentioned in my recent talk that the p5-mop project is currently stalled but did not really expand on that topic much. In this blog post, I'm going to explain what has happened over the past year or so with the project, discuss some issues we ran into while trying to implement the p5-mop, and lay out why I think we need to do some work in directions other than the p5-mop for a while in order to get back the p5-mop back on track.

First let me start out saying that p5-mop is not dead, and that I would very much still like to finish implementing the "on CPAN" version of it. I believe Jesse "doy" Luehrs, my co-conspirator, feels this way as well. My outlook on taking that "on CPAN" version and merging it into the p5 core is currently somewhat less optimistic for reasons I will explain.

The Current Problems

New Perl module: Action::Retry

cross-posted from dams blog

New Perl module: Action::Retry

I've just released a new module called Action::Retry.

Use it when you want to run some code until it succeeds, waiting between two retries.

A simple way to use it is :

use Action::Retry qw(retry);
retry { ... };

And the Object Oriented API:

Action::Retry->new( attempt_code => sub { ... } )->run();

The purpose of this module is similar to Retry, Sub::Retry, Attempt and AnyEvent::Retry. However, it's highly configurable, more flexible and has more features.

You can specify the code to try, but also a callback that will be executed to check the success or failure of the attempt. There is also a callback to execute code on failure.

The module also supports different sleep strategies ( Constant, Linear, Fibonacci...) and it's easy to build yours. Strategies can have their options as well.

deb.perl.it - bridging CPAN and Debian → step2

To make the Debian-Perl module look-up more useful, there are now install instructions included. That means that all non-packaged CPAN dependencies and also all packaged ones are listed and it's clear what can be installed from packages and what needs to be installed from CPAN. Here's an example for App::TimeTracker:

sudo apt-get install libexception-class-perl libclass-accessor-perl libmoosex-role-parameterized-perl libjson-perl libnamespace-autoclean-perl libtry-tiny-perl libtest-trap-perl libtest-most-perl libtest-file-perl librt-client-rest-perl libpath-class-perl libmoosex-types-path-class-perl libmoosex-storage-perl libmoosex-getopt-perl libmoose-perl libmodule-build-perl libtest-mock-lwp-perl libjson-xs-perl libio-capture-perl libhash-merge-perl libgit-repository-perl libfile-homedir-perl libfile-find-rule-perl r-base-core-ra perl-modules libdigest-sha1-perl libdatetime-format-iso8601-perl libdatetime-format-duration-perl libdatetime-perl perl perl-base

sudo cpan -i Iterator Path::Class::Iterator MooseX::Storage::Format::JSONpm App::TimeTracker

deb-perl-it-install-example.png

Just a note that this works fine for Debian stable+testing+unstable. Which is not so common. Most installations will be stable or testing+unstable. Once Debian Wheeze (7.0) will become stable (hopefully soon) I'll split that search to two - one for Debian stable and one for Debian testing+unstable.

(cross-posted)

Moose Mashing

Does Moose eliminate the sin of False Impatience* by making it so damn easy to just add a dash of OO to your script in order to avoid messing around with data structures? That's how I've started, so there's bound to be a few contusions as I find the corners of my own ignorance, digging out the notes from Dave Cross' most excellent Perl School on the subject. It's not pretty, but it gets the job done.

This is a story about how hacking away at a script taught me some things that I should have known.

German Perl-Workshop 2013 - Sponsor Delticom

We're glad to announce another sponsor for the German Perl Workshop 2013 in Berlin:
Delticom

Thanks!

We will enable registration with payment soon and post more information about the Social Event soon on our website.

Company description in German:
Delticom ist Europas führender Reifenhändler im Internet. Gegründet im
Jahr 1999 betreibt das Unternehmen aus Hannover heute in 42 Ländern
über 100 Onlineshops, darunter ReifenDirekt in Deutschland, der Schweiz
und Österreich, mytyres.co.uk in Großbritannien und 123pneus.fr in
Frankreich. Die breite Produktpalette für Privat- und Geschäftskunden
umfasst mehr als 100 Marken und über 25.000 Modelle von Reifen für
Pkw, Motorräder, Lkw und Busse, außerdem Kompletträder, Motoröl und
Pkw-Ersatzteile und -Zubehör.

Delticom-Kunden genießen alle Vorteile des modernen E-Commerce:
einfaches Bestellen von zu Hause, hohe Lieferfähigkeit und nicht zuletzt
attraktive Preise. Die Lieferung erfolgt in durchschnittlich zwei Werktagen
nach Hause oder an jede andere Wunschadresse. Alternativ können
Kunden ihre Reifen zu einem der weltweit über 30.000 Servicepartner
liefern lassen (allein 8.500 in Deutschland), die professionell und
kostengünstig die Reifen am Kundenfahrzeug montieren.

Subtle Template Toolkit bug / quiz

What does this produce:

    [%-
        SET foo = 0;
        foo = 1 IF 0;
        '--'; foo; '--';
    %]

(If you don't see the answer, click through to the page ;)

YAPC::Europe 2013 in Kiev, week minus 29. Call for speakers

Hi,

To make a great conference, we need great talks. Today I'd like to encourage everybody to submit a talk to YAPC::Europe 2013. It's easy, just fill in a form on the conference site: act.yapc.eu/ye2013/newtalk.

This year there will be three parallel talk tracks. We plan to start at 10 a.m. with a keynote (single-threaded) and finish at 6 p.m. with a lightning talk session (also single-threaded). The time in-between will be filled with talks, food and communication :-)

We offer four possible length of the talks: 20, 40, 60 and 120 minutes.

20 minutes are intended for introductory talks, where the speakers gives some basic information about the topic and assumes that the listeners would like to get an idea of a new technology, or some new usage pattern, or new ideas in some area.

40 minutes are for general purpose talks, and the speakers are expected to talk about a particular topic in detail.

Web Scraping with Modern Perl (Part 1)

tl;dr

Grab the gist with the complete, working source code.

I often hear the question: "so, you're Perl guy, could you show me how to make a web crawler/spider/scraper, then?" I hope this post series will become my ultimate answer :)

First of all, I compiled a small list of features that people expect of crawlers nowadays:

  1. capability of concurrent, persistent connections;
  2. usage of CSS selectors to process HTML;
  3. easily modifiable source instead of a flexible OOP inheritance structure;
  4. LESS DEPENDENCIES!

Viewing your weather forecast without a browser

PDL::Graphics::Prima is a Perl plotting library written using PDL and the Prima GUI toolkit. It is targeted at PDL users with the hope of one day becoming the standard plotting library for PDL. PDL::Graphics::Prima provides a complete plotting widget, but one of the great aspects of the library is that it also provides a very simple interface for building one-off plots called PDL::Graphics::Prima::Simple. In this post, I use Mojolicious to pull down some weather data and plot it using PDL::Graphics::Prima. For the initial pass, the initial plotting code is just 1 line. :-)

Perl 5.17.8’s release epigraph

Cross-posted from my other blog.

Yesterday I had the pleasure of releasing version 5.17.8 of Perl. Perl has had regular, time-boxed monthly development releases for about three years now. This great improvement on the previous situation has been accomplished partly by making the release process into something that can be done even by people who, like me, are far from being experts in Perl’s internals.

One of Perl’s long-standing traditions is that release announcements are accompanied by an epigraph, chosen by the release victim volunteer. Here are some notes about the epigraph I picked for 5.17.8.

Be Careful With state Variables

I use state variables a lot. They're great for creating a private cache in a method. However, I was recently asked about using them with Roles. What happens when the role methods are flattened into separate namespaces? I suspected that they would share their state, but I wasn't sure, so I wrote a quick check.

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.