Just installed the CPAN Auto Link Generator WordPress plugin, which automatically matches module names and provides links to the module’s documentation on CPAN. Very helpful for anyone blogging about Perl, so thought I’d give it a link here.
Dancer::Plugin::SimpleCRUD 0.10 released
I’ve just released version 0.10 of Dancer::Plugin::SimpleCRUD, incorporating a new display_columns option to control which columns should be visible when listing records, kindly provided by saberworks in PR-9. Also included is a documentation fix for the editable_columns option, and implementing the not_editable_columns option, courtesy of Alberto Simões (ambs) – thanks!
Welcome to the Blogosphere, James Ronan
Just a quick post to welcome my friend James Ronan to blogging – after many years of intending to build himself a site and failing, he’s finally given in and set up WordPress to just get blogging.
Much easier, isn’t it? Laziness++
Sheep on drugs – headfuck time
WTF.
Thief fail, Marines win
reCAPTCHA becoming unusable – decent alternatives?
I use reCAPTCHA to help prevent spam comments. It used to be very good, and had the added bonus that it’s helping to digitise books at at same time, rather than wasting effort.
However, it seems to be giving worse and worse CAPTCHAs lately, providing words that are almost impossible to read, and often words that are clearly not even English.
For instance:
What’s that?
I don’t want to put off real visitors from leaving comments by making them decipher things that are too close to nonsense, so I think I’m going to have to replace reCAPTCHA with something more suitable. Suggestions welcome.
Cuteness overload (kitten hugs)
HTML::Table::FromDatabase 1.00 released with row_callbacks feature
I just released version 1.00 of HTML::Table::FromDatabase, with a new row_callbacks feature.
You could already declare callbacks on a cell-level basis, so you could say, format monetary values appropriately, round numeric columns, turn URLs into clickable links etc. Now, you can also declare a callback which receives an entire row as a hashref, which it can modify as needed.
An (admittedly somewhat contrived) example from the documentation:
my $table = HTML::Table::FromDatabase->new(
-sth => $sth,
-row_callbacks => [
sub {
my $row = shift;
if ($row->{name} eq 'Bob') {
# Hide this row
$row = undef;
} elsif ($row->{name} eq 'John') {
# John likes to be called Jean these days:
$row->{name} = 'Jean';
}
},
],
);
I decided to bump the version to 1.00 for the sake of anyone who considers 0.x versions to be unready for production use; this module has been about since 2008 and is working well in production use for me.
The Dancer release that will get you hooked!
Sawyer X wrote up a good post on version 1.3050 of the Dancer Perl web framework being released – "The Dancer release that will get you hooked!".
The addition of extra hooks, along with support for plugins to create hooks, heralds additional flexibility and power for your Dancer apps.
Dancer itself now provides various new hooks you can use to customise its behaviour, including before_deserializer, before_file_render, before_error_render, before_template_render, before_layout_render, before_serialization
– see the Dancer::hook() documentation for the full list. Plugins can register their own hooks, which your code can then make use of.
Props go to Franck Cuny for the implementation, and JT Smith of Plain Black for pushing for this feature and working with the Dancer team in designing the implementation.
Dancer 1.3050 also includes various bug fixes and improvements – see the CHANGES file for a full list.
Dancer::Plugin::TimeRequests
Today I knocked up a quick plugin for the Dancer Perl web framework to log the time taken by requests to help look for bottlenecks – enter Dancer::Plugin::TimeRequests.
At the moment it’s very simple, and simply logs the time taken to execute every request; in the future, I may extend it to support capturing statistics and adding a route handler to display stats (e.g. average request time, which routes take the longest to execute, etc.)
Suggestions / patches welcome – the code is on GitHub as usual.