February 2011 Archives

Duplicating blog posts between blogs.perl.org and own blog?

I have my own blog, on which I post about Perl-related stuff along with other things. I also have a blog here on blogs.perl.org (obviously, as I'm posting on it now).

When I post something Perl-related, I'd like to post to both, as blogs.perl.org makes it more likely to be seen by the Perl community, many of whom probably don't follow my own blog, but I don't like the idea of manually posting it to both really. It's also a bit of a pain for any comments to be split between the two.

Solutions that come to mind:

  • Automatically copying posts in the Perl category on my own blog to this blog somehow; or a script that posts a summary along with a link to the original post on my blog
  • The above but in reverse; post here and have a summary & link posted to my blog
  • Not use this blog, and attempt to get the feed for the Perl category on my own blog listed on planet.perl.org, and hope that helps make those posts visible to the Perl community

I can't be the only one who has their own blog but also wants their content on blogs.perl.org for better visibility within the Perl community - anyone have any suggestions?

Dancer::Plugin::Database 1.10 - bugfixes and quick_select()

Over the weekend I released Dancer::Plugin::Database 1.10, incorporating a couple of bug fixes thanks to Christian Sanchez, Michael Stiller and crayon.

I've also added a quick_select feature; it seemed odd to not have it since quick_insert, quick_update and quick_delete were all provided.

It lets you do simple queries very quickly:

# In scalar context, returns first matching row as a hashref:
my $user = database->quick_select('users', { id => $user_id });
return "Hello there, " . $user->{first_name};

# In list context, returns all matching rows as hashrefs:
my @users = database->quick_select('users', { category => 'admin' });

It's intended for simple queries, so if you need to retrieve only certain columns, sort results, do joins etc; since the database keyword gives you a normal DBI handle, you can just do it however you like. For simple queries, you might enjoy the simplicity, though.

Dancer::Plugin::SMS - easy SMS text messaging for Dancer apps

Over the weekend I threw together Dancer::Plugin::SMS, which uses Adam Kennedy's SMS::Send to easily send SMS messages.

Using it from an app can be as easy as:

sms $destination, $message
# or with named params:
sms(to => $destination, message => $message);

Configuration for which SMS::Send driver to use, login details etc are all read from your Dancer app's config, so if you decide to change provider, you need only update your content, and you're done. There are SMS::Send drivers for a whole host of online SMS text messaging providers so you'll likely find one for whatever service you plan to use; if not, writing one is pretty trivial. There's even ones for using a phone connected to your machine, if that's what you plan to do.

About David Precious

user-pic Professional Perl developer, Dancer core team member, beer drinker. See http://www.preshweb.co.uk/about for more :)