Breaking users of old versions of a module

Suppose that for some reason you really, really need to introduce a silent, backward-incompatible change for a module. For example, in 0.03 and earlier foo() accepts ($a, $b) as arguments but you need to change it to ($b, $a). After releasing v0.04, you probably also want to break code that says any of the following:

use MyModule; # no version specified
use MyModule 0.01;
use MyModule 0.02;
use MyModule 0.03;

by, e.g., croaking with a message like "Order of arguments of foo() changed in 0.04, please use older version or update your code. Program aborted."

Reading up on "perldoc -f use" and browsing on CPAN, I found version::Limit which does almost that. You can put something like this in MyModule.pm:

Anyone using HTML::WikiConverter? If not, what else?

David Iberri has kindly let me take co-maint of HTML::WikiConverter.

I haven't actually started work (I'm not completely stupid!), but I'd like to know if there is any interest in these modules being given some TLC. In this case I think a re-write is appropriate.

I did not trace the pre-reqs, but since I would be using Marpa::R2::HTML to rectify the HTML tags before starting the conversion proper, a C compiler will be needed. A pure Perl solution is out of the question.

For supported dialects I have not decided exactly how to code that, but I have an idea to - perhaps - use a Marpa grammar - an SLIF-DSL (Scanless DSL) in Marpa terminology - to unify them.

So, I'd like to hear from interested parties, both for perceived need, and perhaps for testing.

Also, if anyone's using an alternative, please mention that too in the comments.

Lastly I selected this from Neil's list of modules-needing-care.

Notes on porting to p5-mop

Just a follow-up to Stevan Little's On porting a Moose module (thanks Stevan, BTW for this software! :) I read Damien Krotkine's p5-mop: a gentle introduction yesterday, so I took p5-mop out for a spin and started porting my Hashids module to it; Hashids itself is a port of the JavaScript hashids.js library from Ivan Akimov, and provides an easy way of creating "hashes" of alphanumeric strings similar to the ones used in YouTube.

Here are a few things I observed while doing the port, which I'm glad to say, was a very easy and worthwhile thing to do (if at least to help me think about improving my own use of Perl:)

Wikipedia linking to CPAN

Recently I checked the number of links form the English version of Wikipedia to search.cpan.org and to MetaCPAN.

I even posted it to Reddit that got quite a mixed reaction (18 upvotes 11 downvotes) but many of the links were updated.

Of course there is more to Wikipedia than the English version, so I checked the numbers for the 10 languages listed at the top of Wikipedia and these are the numbers:

On porting a Moose module

I have been meaning to write this post for a while, but between $work and getting sick I have not really had the brain capacity to do it. Being that I am still a little sick and $work is still busy, I am making no promises about the quality of this post.

In a previous blog post I mentioned that I was going to port my module Bread::Board to p5-mop which I managed to finish up about three weeks ago and then promised to write a post about my experience. Well better late then never, here is that post.

NOTE: if all the Bread::Board terminology gets tedious, skip down to the TL;DR at the end to read my conclusions.

Email::Postman - Yet another email sending package

I know I know, there is Email::Sender, and Mail::Sendmail, the 'send' method of MIME::Lite, Mail::Mailer and probably other ones I don't know about on the CPAN and also the good old pipe to /bin/sendmail trick.

Each of them have their advantages, but none of them actually does what I wanted.

Email::Postman does all the following:

- It can send anything that's compatible with Email::Abstract (MIME::Entity, Email::Simple, rfc822 String, etc..)

- It will manage multiple To, multiple Cc and multiple Bcc nicely.

- It will report on each of the recipients individually.

Read the full post here.

Poor Mans Jobqueue for Catalyst Apps

Handling long-running or heavy tasks inside a a requests is something you should avoid.

  • It blocks the available processes for other requests.
  • browser request timeout
  • ...

Instead of using one of the job queue implementations available for perl

  • Resque
  • ActiveMQ
  • ZeroMQ
  • Gearman
  • TheSchwartz
  • ...

i decided to reuse/abuse my database.

Add a 'job' table

Introducing Firebase

I’m pleased to announce Firebase, a client wrapper around Firebase.com. This is a joint effort with Kiran Kumar

Firebase is a real-time message queue and data store. It’s ideal for building real-time applications or adding some real-time functionality to your existing applications. 

It’s available on CPAN now, so fire up cpanm and check it out.

[From my blog.]

Perl sites - Perl news, developers, information

I record Perl site in this topic when I find new Perl site.

# where we turn Perl inside out

p5-mop, a gentle introduction

I guess that you've heard about p5-mop by now.

If not, in a nutshell, p5-mop is an attempt to implement a subset of Moose into the core of Perl. Moose provides a Meta Object Protocol (MOP) to Perl. So does p5-mop, however p5-mop is implemented in a way that it can be properly included in the Perl core.

Keep in mind that p5-mop goal is to implement a subset of Moose. As Stevan Little says:

We are not putting "Moose into the core" because Moose is too opinionated, instead we want to put a minimal and less opinionated MOP in the core that is capable of hosting something like Moose

Helios 2.61 Released

Helios 2.61 has been released. This is a bugfix release; if you are using Helios and experiencing problems due to one of the (previously) outstanding bugs in the Helios RT, you should upgrade to this version.

For more information about the Helios distributed job processing system, check out the Helios website or our Helios project on GitHub!

formats added to perlito5

perlito5 is a Perl compiler written in Perl.

The format statement was required in the grammar for completeness. The 'format' command is not supported at the emitter side - it compiles, but it doesn't run yet.

Some other features are still marked as TODO and are simple to implement:

- dot-decimal strings (without the 'v'),
- "'" meaning "::",
- using 'CORE::' in odd places - 'CORE::if' in place of 'if' and 'CORE::and' in place of 'and'.

With these in place, the grammar will be "100% complete" - the tests will eventually tell if we got there or not.

I translate "Manipulate Array and Hash Freely" from Japanese to English

I translate "Manipulate Array and Hash Freely" from Japanese to English.

Manipulate Array and Hash Freely

You can master Perl array and hash, and complex data structures, such as array of arrays, array of hashes, hash of arrays, hash of hashes. You master to loop the complex data structures.

If you can manipulate complex data structure, you can do many things in programming. Let's master array and hash.

Is This a Hashref Which I See Before Me? (no, wait, it's an arrayref ...)

As you may know, Perl 5.14 (and up) will allow you to use references for container functions (by which they mean functions such as push or keys that operate directly on arrays or hashes).  I’d never thought much about this feature, except to think that it was, in general, a nice way to save three keystrokes on constructs such as (to steal an example from perldelta):

keys %{$hoh->{genres}{artists}}
Now, saving three keystrokes doesn’t mean much if it makes your code harder to read.  But, in this case
keys $hoh->{genres}{artists}
is actually easier to read, so I call that a win-win.

SimpleDB::Client 1.0600

I’ve released SimpleDB::Client 1.0600 to CPAN. SimpleDB::Client is used to connect to Amazon SimpleDB. The only new thing in this release is a command line app called “simpledb” contributed by Andrew Solomon. 

[From my blog.]

Promoting perl outside the echo chamber

A few weeks ago, to the encouragement of Jeffrey Thalhammer,
I contacted the Chief editor of The ChangeLog and offered to write Perl-related articles. He agreed, and since then I managed to post 3 articles. They were about GitPrep, Questhub, and Sqitch.

For now my main focus is to show applications written in Perl that can be used by anyone, even if they are not programmers. Tools that solve problems even non-Perl programmers can have.

I mostly work off my list of Perl based Open source products, but I'll be happy to add other products as well.

So if you have a product, even in early stage, that could use some publicity outside the Perl echo-chamber, please let me know.


Oh, and if you like the stuff I do for promoting Perl, please consider supporting me by subscribing to the Perl Maven Pro.

German Perl Workshop 2014 - lots of paperwork - T-194 days

Another quick update. We're in the middle of communicating to our (possible) sponsors. Lots of paperwork to do :)

As I already wrote on Hannover.pm gathering v21 (German) we're planing to announce the approximate ticket price within the next weeks. The final ticket price will be available in January 2014 at the latest.

DE: http://www.perl-community.de/bat/poard/message/170142

First p2 milestone passed: parse 50% of perl5

This week I spent some time to fix the remaining p2 parser problems. I set my first goal to parse 50% of perl5 syntax by summer 2013. I want to show some real code and benchmarks at the upcoming YAPC::Asia in Tokyo.

After the YAPC::EU in Kiev I first spent some time fixing B::C for 5.16, 5.18 and blead (PADLIST, COW and bytecode compiler regressions). In the meantime my partner in crime goccy in Tokyo made progress with his parser, compiler and the new llvm backend. His parser is hand-written and I'm still fighting with greg, but my code is still much smaller and more elegant.

Ouch 0.0406

Thanks to some pointers by MidLifeXis and Ether it turns out I didn’t need to bump the requirements of Ouch to 5.12 to use overload and parent. Thanks! So this release just goes back to letting you use 5.8 (but you really should upgrade!)

[From my blog.]

UAV::Pilot Presentation

Last night, I gave a presentation for the Madison Perl Mongers group on UAV::Pilot. The video is now up:

This is also the announcement for the WumpusUAV Indiegogo project, which aims to create a new, cheap, hackable UAV platform. More information is on WumpusUAV.com.

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.