Template::Simple .04 is on CPAN

I have released Template::Simple .04 to CPAN. This is a major update
with the addition of compiled templates, a runnable cookbook script and
a benchmark script. Templates can be compiled and run much faster. The
benchmark shows nested templates rendering up to 34 times faster than
Template::Toolkit and faster than Template::Teeny. If you want to flame
about the speed issue, you are better off adding entries to the benchmark (it needs a
redesign as it was sent to me) and showing faster templating
examples. The cookbook is a runnable script showing many examples of how
to use T::S along with pod describing each example.

The design philosophy of T::S is total isolation of data logic from the
template itself. A template designer can work independently from a coder
who works on the data. Also this give more flexibility you can mix and
match different templates with different data trees without rewriting
either. All the common idioms are supported including nested data and
templates, include files, loops, conditionals, etc. You can also customize behavior with code callbacks in the data. The cookbook script
in extras/ will get you started with all of the idioms. And with the
compiled templates you now get the fastest rendering.

Have the appropriate amount of fun.

Dancer release codename "Yanick in Black"

Yesterday was May Day, also known as Labor Day. We finished a development release cycle successfully and it was about time to release a stable.

This release, as promised, is named after someone who has been in the Dancer community for a while and indeed deserved the recognition: Yanick Champoux. You can find the first commit by Yanick in the 4th development release of 1.2000 - wayyyy back. Since then he has also written quite a bit on Dancer as well, showing off how to use Dancer in production environments and having a lot of fun with it at the same time.

Yanick has made a major contribution to this release - the megasplat route ability allows for much more sophisticated chained actions. By using a double asterisk in the route syntax, you're able to get the remainder of the route path , already split, at your convenience. Then you can reroute using pass(). Here is an example from the documentation:

Resilience of the Internet Interconnection Ecosystem

Hi Folks

The title of this blog is a copy of the title of this article:
http://www.lightbluetouchpaper.org/2011/04/12/resilience-of-the-internet-interconnection-ecosystem/

On the hosting web site http://www.lightbluetouchpaper.org/ you'll find an on-going series of fascinating articles.

Cheers
Ron

Yet Another Perl Podcast #4: Анонс

Апрель выдался богатым на события в perl сообществе. Чего только стоит первый за три месяца релиз Rakudo Star (2011.04). Об этом и не только мы поговорим в очередном выпуске YAPP.
Если и у вас есть какие-то новости, которые кажутся вам интересными, присылайте ссылки на них и мы с удовольствием озвучим их.
Свои предложения Вы можете писать в
twitter: twitter.com/yapp_ru,
по почте: yapp_ru@gmail.com,
в jabber: yapp@demond.org
или в комментариях к данному анонсу на blogs.perl.org по адресу:
https://blogs.perl.org/users/perl_demon

ElasticSearch.pm v0.37 released, with a small breaking change

Just released ElasticSearch.pm v 0.37 which has a small breaking change.

In version 0.36, $scrolled_search->next() returned the next $size results. Now, by default it returns the next one result, which makes it easier to write:



     while ( my $result = $scroller->next ) {...}


Dancer is attending GSoC (Google Summer of Code)

By popular demand and after careful considerations, Dancer has been accepted to GSoC. Two proposals were submitted and one was accepted, so we will be happily participating.

The accepted proposal is by Carlos Ivan Sosa (gnusosa), you can read his blog post right here on his blog, which is powered by Dancer itself. :)

Carlos will be focusing on factoring out the stand-alone script into a module in core, and then inserting there all the logic of the scaffolded maintenance scripts, so upgrading will be easy as pie (or something else which is really easy).

The major point of reference for this is Catalyst, and it is probably of no coincidence that Catalyst has done such a cleanup of their own in a previous GSoC, so this is quite the circle closure!

Congratulations to Carlos are in order, and keep your eyes on his blog since he intends to update the community on his progress.

Dancing on a cloud made of pearls

Thanks to a post on Hacker News, I got access to the beta test for DotCloud. In this blog post, I show how I got started and successfully deployed a small Perl Dancer web app to the service.

I was extremely pleased with how easy it was to do the above, and wanted to share it!

Deploying a Perl App to DotCloud

Deploying a Perl Plack / PSGI application to DotCloud hosting is very easy.

Following the announcement that DotCloud are now supporting Perl I managed to get a test account and had a play.

I already had python installed on my Mac so the steps were...

  • sudo easy_install dotcloud
  • dotcloud create leotest
  • dotcloud deploy --type perl leotest.www
  • git://github.com/ranguard/plack-example.git
  • cd plack-example/multiple_roots/
  • dotcloud push leotest.www ./
  • open http://www.leotest.dotcloud.com/

My multiple_roots test is a slightly contrived configuration, using Plack::App::TemplateToolkit with multiple roots for static and dynamic content, this is configured in the app.psgi. I had put it together when I was developing Plack::App::TemplateToolkit so thought it was a good example to test.

The only issue I had was that the default configuration of DotCloud serves anything in ^static directly through nginx so I had to rename my directories to get it to work. Previously I didn't have a Makefile.PL as this had just been for testing, I created one, so the dependencies could be installed.

You can see the final (although visually dull!) result at http://www.leotest.dotcloud.com/.

I can see myself using this service a lot in the near future.

Three things I'd Change About Perl

Ovid asks about three things you'd change about Perl, which is similar to my standard interview question What are five things you hate about Perl?. I never really answered the question myself, although I did let go of one thing in my Frozen Perl 2011 Keynote: the connection between module names and filenames. Breaking that connection helps with my second thing.

I want first-class classes that I can store in a variable. I want to be able to load multiple and different versions of a distribution. As part of that, I'd want to load distributions, not particular modules. I'd get to the modules through the distribution. I haven't really thought about the syntax for this, though.

I would also be able to load things lexically:

Ch-ch-ch-ch-changes

Quickly now, without too much thought about it (unless you insist), reply with the top three things you would change about Perl (the language, not the community) if you could.

Graphical widgets in my text console? How perverse!

Things like this:

amethyst-buildconf-value-change.png

are now possible in Perl and Moose. Get from CPAN

python2.6 for dotcloud

Dotcloud now supports perl. Dotcloud command-line interface requires python 2.6. Here are the steps I used to install python2.6 on mac 10.5.8

wget http://python.org/ftp/python/2.6/Python-2.6.tgz
tar -xvf Python-2.6.tgz
cd Python-2.6
./configure --prefix=/usr/local/python2.6
make
sudo make install

#add /usr/local/python/bin to your ~/.bash_profile
wget http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg#md5=bfa92100bd772d5a213eedd356d64086

sudo su -
#make sure python -V is 2.6
sh setuptools-0.6c11-py2.6.egg

#now you can use the easy_install which is installed under /usr/local/python/bin/easy_install to install dotcloud
sudo easy_install dotcloud

Now follow the instructions Here on getting started with dotcloud.

I'm going to the Nordic Perl Workshop

The Nordic Perl Workshop is in Malmö on June 18-19. That's just across the bridge from Copenhagen and is quite a nice little city which I visited the last time I went to Copenhagen (or was it the time before that?).

I'm going to get there a little early though. I'm flying to Zurich so I can visit Liechtenstein the weekend before; I always want to visit but things get in the way. I'll be in Zurich on Sunday, June 12. I know a couple of Perl people must be there.

Once I do that, I'm flying up to Copenhagen on Monday, June 13. After that I have to find something to do with myself until the conference starts. Does anyone in the area need some CPAN-related work done. :)

Dancer release codename "Silence of the ambs" is...

...already out for a while now! :)

Dealing with personal issues this past month, I couldn't find the time nor motivation to blog. It's not that things aren't happening, they are, at a pretty serious pace. We've already released Dancer 1.3030 (codename "Silence of the ambs"), named after Alberto Simões, who has become a major force in the Dancer community. You can read the release notes here.

Yesterday I released RC1 for a new release, named after - you guessed it! - another member of the Dancer community. We haven't revealed who it is yet, but I can safely say that he has contributed to Dancer in various ways (code, articles, cleanups) and is always very pleasant and fun to work with. We have tremendous respect for him and always wanted to express it, and unfortunately naming the next release after him is the only way of which we could think! :)

Following this release (hopefully officially stable to be released this weekend), we will work on another release with a pretty huge change. While the release will be named after a Dancer core developer, credit should (and will also) go to JT Smith for relentlessly pushing the feature the release will carry.

Oh yeah, and you can now use Dancer on DotCloud.com!

Nordic Perl Workshop 2011

I just learned that Nordic Perl Workshop 2011 will take place in Malmö on June 18 and 19.

NPW 2011 page

As it's just across Øresund from Copenhagen, I'll definitely be there. I hope you will too!

Metabase back online

The Metabase is now back online, and accepting reports again. If you're running a metabase-relayd instance, you should be safe to turn it back into online mode. Many thanks to David Golden for working with the EC2 instance to get it all working again.

It may still take a few days for everything to get back to normal, so please bear with us. If you do spot any lingering problems, please post to the cpan-testers-discuss mailing list and let us know.

Cross-posted from the CPAN Testers Blog

Was it something I said?

This morning I re-tweeted a a post from @petdance where he says (or, moreover, I understood him to say) OpenSource developers can be surly. I agree.

Shortly thereafter, I read a post from @briandfoy_perl and discovered, much to my discomfort, that this is part of a larger conversation about the perl community specifically.

To summarize, the post of Andy's that I originally saw seemed to me fairly innocuous, to the tune of "open source developers have a responsibility to bat down the trolls for the good of their communities". Brian then responds in his own post (linked above) defending the Perl community specifically and saying Andy's position is perverted because Andy interactions with the Perl community are mostly via mailing lists and website forum comments and that these are among the most toxic forums.

The Perl Community is great

The Perl community is a great group of people. chromatic and Andy Lester don't think so because they limit their involvement to the most toxic things man has ever created: the mailing list thread and website comments. There's nothing surprising about bad behavior in either of those places and it has nothing to do with Perl. It happens everywhere you find a mailing list or a comment section.

Show up to a Perl event with real people and you'll find a much different reality. :)

NERDTree on Startup

If you use vim and you have haven't seen the excellent NERDTree plugin, you should really check it out.

I wanted NERDTree to automatically load if I start vim without arguments, so I added the following to my .vimrc:

function! StartUp()                                                                                                                                                                                         
    if 0 == argc()
        NERDTree
    end
endfunction

autocmd VimEnter * call StartUp()

Very handy. I expect I might be adding more to my StartUp function in the future.

As a side note, it installs via a Rakefile, but if you don't have Rake available, I hacked the Rakefile to make this installable via bog-standard Ruby:

You can solve any problem by adding another layer of indirection

During the Easter weekend, I've started to write code supporting Firefox 4 in WWW::Mechanize::Firefox. So far, only some ugly parts of the restructuring of Firefox have broken WWW::Mechanize::Firefox. As my main application for it still runs Firefox 3.x, I have to support both versions, and especially not break any functionality for 3.x. So far, I could put most of the differences between Firefox 3.x and Firefox 4 into two submodules, WWW::Mechanize::Firefox::API35 respectively WWW::Mechanize::Firefox::API40. The constructor of WWW::Mechanize::Firefox does return either of these subclasses, depending on the version. This proves that you can't solve the problem of too many indirections by adding another layer.

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.