I've uploaded a major release of Constant::Export::Lazy

I created Constant::Export::Lazy a while ago to consolidate the main constant exporting module at work into something even better. I've just uploaded a major release which allows for adding all the features that I can reasonably think of being useful for a lazy constant exporting module.

It can now support something like Exporter.pm's %EXPORT_TAGS, along with numerous other improvements. I also toiled a bit at it with Devel::Cover and it has 100% test coverage now. In the progress of achieving that I found a few minor bugs that I fixed.

In implementing this module I tried to avoid adding narrow specific features (like %ENV overrides, or support for %EXPORT_TAGS), and instead added more general callbacks that make those features and others I haven't even thought of yet possible.

For why I needed to write the umpteenth constant creation module on the CPAN instead of using something that already exists see the rationale in the documentation.

This module's already been stable for a while and I see no reason why I'd introduce any breaking changes to it. If you'd like an easy-to-use constant defining module that you can use in multiple mutually incompatible environments give it a shot.

I would like to buy a Hailo

Myself and the other author of Hailo just got what looks to be very odd spam asking us whether someone could buy a copy of Hailo.

Here's an E-Mail that was sent to Hinrik:

I want to buy a Marklov pluggable engine, Where can i buy one, i am coming to
Iceland for a visit, can i come to your shop?

And, in another E-Mail sent to me:

I would like to buy a Hailo. Where can i get one and how much do they cost?
Thanks Julie

Clearly I should quit my dayjob and start selling copies of Hailo on CD in a dedicated store just for this purpose.

More seriously though, is anyone else getting similar spam these days about their CPAN distros? It seems odd to get a couple of these E-Mails within a few days.

We did have someone contact us a couple of years ago legitimately wanting to buy a license for of Hailo. It took quite a long E-Mail exchange to convince that person that yes, we were in fact giving it away for free.

My blogs.perl.org profile image is now some other dude

I just filed a bug about my profile image being replaced by that of some other user on the site. I wonder if anyone else had had this issue.

Tweaking what Moose does when a type constraint fails

Back when Curtis Poe was at Booking.com we were in the the first team to use Moose (actually Mouse at the time) for anything serious. While it saved us a lot of time overall that we'd otherwise have spend on writing boilerplate code we found the Moose support for type constraints to be fairly inflexible for our purposes.

Moose will simple die if you pass it a value that violates a type constraint, in an environment where you control the whole stack this is usually what you want, but when you're dealing with data from other people and user-supplied parameters you often want to handle the situation more gracefully.

Curtis pointed this out on the Moose mailing list, and quickly found that this was something covered in the Moose FAQ.

I hacked up something that would change the behavior globally, but of course this is something you want to do on a per-attribute level. Jesse Luehrs provided a basic implementation of it which I expanded on, and which I've now uploaded to the CPAN as MooseX::Attribute::TypeConstraint::CustomizeFatal

The module allows you to tweak what Moose does when a type constraint fails on a per-attribute level. The default is to die as Moose does by default, but you can also make it warn and accept the bad value, or warn and fall back on the default value, or just silently ignore the bad value and fall back on the default value.

qr/STRING/msixpodual or qr/STRING/mixuploads ?

I released perl 5.13.10 today. I might write more about that later. But one significant change in it is that Perl now has many more regex flags.

So I wrote a short one-off script to find out what words I cound construct from the flags.

Now it just gives you one word that contains as many of the flags as possible, and gives you the remainder. What would be more interesting would be to detect cases where multiple valid words can be made from the flags. E.g. "mix" and "uploads". It just detected that by accident.

I leave that as an exercise for the reader.