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.
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:
Апрель выдался богатым на события в 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
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:
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.
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 PerlDancer 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 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.
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.
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.
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.
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. :)
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.
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.
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 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. :)
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:
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.