Only one month...

... until the conference starts. Are you prepared? Have you registered? Have you booked your flight and hotel?

We really look forward to an interesting event. Lots of people to meet, great talks and much more.

Data::Format::Pretty::Console just got a bit prettier - dates

One of the small annoyances I have when displaying data is with dates (timestamps), which some APIs produce.

$ perl -MData::Format::Pretty::Console=format_pretty \
  -e'print format_pretty([map {{msg=>"msg$_", send_date=>1342610186+$_*12345}} 1..3])'
.-------------------.
| msg  | send_date  |
+------+------------+
| msg1 | 1342622531 |
| msg2 | 1342634876 |
| msg3 | 1342647221 |
'------+------------'

Often I have to copy paste the timestamp to irb and do something like 'Time.at(X)'.

No more. The latest release of Data::Format::Pretty::Console detects column names and automatically format the dates for you.

Comparing two major releases

I did two major releases over this weekend. The big cygwin switch from perl 5.10 to 5.14 (~1 year work) and the next supported ("stable") parrot release 4.6.0 (exactly 1 month work). This deserves a blog post to compare the two efforts.

The cygwin perl packages are using self-written bash scripts to automate the build and release process. They support also self-compiled variants with different features (debugging, non-threaded, different cflags, Policy.sh, ...) and those perl's can be used in parallel to the officially supported one.

It should also be noted that perl in cygwin does not package every single perl module out there, it rather leaves the installation and dependency game to CPAN or cpanm. Official cygwin packages depending on certain perl modules can just use a cygport three-liner to create this package and install it into vendor_perl. cpan installation go into site_perl. debian and fedora e.g. package every single module into their own package format.

One tricky thing when using local::lib - RESOLVED! :)

I love local::lib. You should be using local::lib.

The only thing that bugs me is when I want to run something that has to be under a privileged user (for example listening on ports under 1024), the privileged user is unaware of whatever was installed under local::lib. This includes both modules and scripts it installs. The "scripts" are usually actual applications that are installed via CPAN.

So I have to either reinstall these under the privileged user (which creates a problem because now I have two copies of the same thing) or run it under the privileged user while including the libraries of my private user.

Tricky, annoying.

I'm open to any and all advices...

UPDATE: within 30 seconds daxim has already provided with a solution: sudo -E. Thank you! :)

A famous camel visits Frankfurt

Do you know the most famous camel in the Perl world? The camel's name is "Meeltje". The camel already went to many conferences like FOSDEM and other Perl workshops. Meeltje was also mentioned in the 152nd edition of FLOSS Weekly.

We are happy to have such a famous guest in Frankfurt...

You can see some photos on Gabors blog.

How to set up visitor analyzis on blogs.perl.org

Update

Apparently the admins of blogs.perl.org managed to close the JavaScript related security issue, which also disabled this solutions. I leave the article here for now but we cannot see the number of visitors this way. I hope a better solution will be implemented soon.

How to set up visitor analyzis on blogs.perl.org

On Saturday I posted a question How many people read your blog?
and included a GetClicky (affiliate) counter in the post. It showed me, about 150 people visited that page.

That was actually quite impressive. It was on a week-end when my other sites usually drop to 30-40% of their regular week-day traffic.

I think I'll experiment a bit with posts on blogs.perl.org but I'd like to get back to the subject in case you too would like to know how many people read your writings.

Which visitor analyzis system to use?

Welcome all scientists and friends to perl4science.github.com

This week has been an exciting week for the small but dedicated group of scientists in the Perl community. This is because this week we saw the roll-out of two science related Perl sites:

As gizmo_mathboy has already announced his group, I though I should make my site official too!

I wish we could say we had a big roll-out plan, but not so. We had discussed these things, decided we liked both ideas, and should keep them both, and somehow, this week, they both went live.

cygwin perl updated from 5.10 to 5.14

I switched perl and all its dependencies on cygwin from 5.10 to 5.14 today.
Thanks to all involved maintainers and authors!

This was my announcement mail:

perl has now been updated from 5.10.1-5 to 5.14.2-3.
Most of the dependant official cygwin perl packages containing XS code
have also been updated.
All other packages containing or referencing perl code should just
work, except ming and postgresql.
See below for updating your self-compiled XS modules.

I've got practical and conceptual problems with perl 5.16,
so 5.14 it will be stable for the time being, at least until 5.16.1
will come out.
But it looks like only 5.18 will have inherent security problems with binary
names in 5.16 fixed. I consider using 5.16 too risky. (not only on windows).
No CVE's yet.

Changes
------------

Signals demystified

Leon Timmermans will give a talk at YAPC::Europe 2012 described as

Some things seem easy but turn out to be hard; signals are one of those things. My shortest summary of signals would be «signals are like threads without locking».

In this talk, I'll explain the origin and development of signals, and how perl deals with them, and how you can (or sometimes can't) write signal safe programs.

Golfing for Gotchas

I’ve been building a little stand alone command line tool lately, which led to me looking at using App::FatPacker to make a standalone, single-script download. This was going well until I tried to load Digest::Perl::MD5, which caused fatpacker to mysteriously crash with an undefined value. The reason for this is interesting…

When fatpacker goes to analyze a module list, it at one stage runs require on all of them, like so:

require $_ for @packages;

Then later on it uses @packages and discovers that one of the elements has is now undef. How did this happen?

Well, if the module you require fiddles with $_ without localizing it first, that will ultimately result in modifying @packages. How did Digest::Perl::MD5 do this?

while (<DATA>) {

Every Day Is Exactly The Same

Recently Mark Keating of the Enlightened Perl Organisation created a new Google Calendar for Perl community events, particularly for Perl Monger group meetings. As I haven't been updating the other calendars I have access to for some time, it gave me the push needed to clean-up my script, and post all the forthcoming events to the calendars.

I've now updated the Birmingham.pm events page, to display the new calendar, as well as the West Midlands Tech Events calendar.

If you have access to any similar calendars, you can now update them with Perl (if you weren't already), with the aid of my helpful script. Feel free to use and abuse as you wish. Note that you will need to have a login to Google Calendars, and have access to the calendars you are submitting to.

How many people read your blog?

I was just wondering if authors on blogs.perl.org know how how many people read their posts? I looked around the options inside Movable Type but could not locate anything.

If there is a way, could anyone explain please?

I have a solution ...

Authentication and Authorization in Mojolicious

John Scoles will give a talk at YAPC::Europe 2012 described as

Using two new CPAN modules I will demonstrate how to implement

1) Authentication with a DB backend

and

2) Authorization with a DB backend

This will be a live tutorial demonstrating all the code involved

Session affinity (sticky sessions) for Perlbal

Following the concept of "if you haven't blogged about it, it doesn't exist", I'd like to let you know of a new Perlbal plugin, which you might find useful: Perlbal::Plugin::SessionAffinity.

Session affinity (also known as sticky sessions) is the ability to provide a user with a consistent backend from a reverse proxy, such as Perlbal. This is useful in case you cannot share the session data between backends, but do not want to lose the session.

Mind you, although Perlbal doesn't support session affinity in core, there is a plugin available on CPAN, but while trying to get it working, I've found a few major problems with it. It requires patches, it's outdated, and most importantly: it doesn't seem to work.

Since StickySessions was already taken, I've decided to take the SessionAffinity namespace and start using that term instead, in order to divert from the previous plugin.

Comparing YUI - Dojo - Ext JS - jQuery

Hi Folks

After spending a lot of fragmented time over the last 7-8 weeks, I've finally finished my 2nd comparison of JS libs. I can no longer find the first on the old blogs site, but by now I don't think it matters.

This one is in HTML because the original is in POD, and that gives me a much easier time of it in the proof-reading phase.

Cheers
Ron

Vim highlighting question

Dear lazyweb, is there a highlighting scheme for vim which makes method calls more readable?
Compare:

How can I highlight either method calls or arrows between them?

Also, shouldn't we patch the standard color scheme for perl now that direct access to accessors is generally discouraged and lots of object-oriented code looks so monotonously blue?

Perl benchmarking is boring

Steffen Schwigon will give a talk at YAPC::Europe 2012 described as

In contrast to all my past talks about benchmarking Perl I now actually have a running benchmarking infrastructure and actual results.

I this talk I will

- summarize again what I do at all
- present some obvious or non-obvious conclusions
that can be derived from the results
(depending on your and my prior knowledge) and
- tell what's missing

All that from my core-outsider's point of view.

How does your module's abstract fare?

I've seen lots of bad module abstracts in CPAN uploads. So today I thought let's make a module to evaluate that (dzil plugin coming "soon"). A proof of concept: CPAN::Critic::Module::Abstract. It's modelled after Perl::Critic, with policies/profiles/themes/severity and all that (albeit simpler and not everything is configurable yet). Sample output:

New version of Dancer::Plugin::Email

Naveed Massjouni has recently released a new version of his Dancer::Plugin::Email. If you're using Dancer and emails, you probably found this plugin very useful.

Guess what? It's now even more useful!

Naveed has rewritten a major part of it in order to use Email::Sender instead of Email::Stuff (which uses the deprecated Email::Send).

The interface stayed pretty much the same (ironcamel++), but the configuration has changed, so you need to update it. Naveed has set up a development version not to break your production code, but you should advise it and update your configurations because it becomes stable.

Enjoy.

Architecture testing

Yes, I was architect for more than 10 years, but here I'm writing about testing computer architectures.

The most heard complaints on perl or parrot testing is about certain unknown architectures and platforms. If it's Windows, 64bit, little-endian, sparc, hpux, AIX, solaris, arm and so on.

So why not test out all those OS and architectures by our own?

On Windows you only got VMWare, VirtualBox and Hyper-V, but on debian you can simulate everything easily with qemu-kvm. On MacOSX I was not so happy with virtualization.

I suppose you have an amd64/x86_64 system and linux, with more than 4GB RAM. 16GB was good enough for me to run 8 images and compile bigger programs. With kvm you got fast native support for i386 and x86_64, and the rest can be simulated with qemu.

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.