Dancer for Python programmers slides fixed on Slideshare
Thanks to Shlomi Fish who noticed the slides of the talk weren't imported very well on Slideshare. This is now fixed and you can find the slides at the same location working without a hitch.
I've also been enlightened that Slideshare only allows you to download slides if you're registered so we've added a section to Dancer's website to accommodate for slides of talks given about Dancer.
This is where you'll be able to view it (embedded) or download it in PDF form at your leisure.
Heretical Perl: Writing Catalyst Apps with no ORM
SF.pm X-President Quinn Weaver will be speaking at Mother Jones on October 26th for our October SF.pm meeting.
Catalyst is the leading web MVC framework for Perl. Normally, Catalyst apps use an ORM to communicate with the database. While ORMs can be convenient, they can also hurt performance, tie your app to one database schema, and make complex queries difficult.
But this is Perl, and TMTOWTDI applies: There’s More Than One Way To Do It.
In this talk, Quinn take you through the code of a working Catalyst app that uses stored procedures rather than ORM queries as its interface to PostgreSQL. Along the way, Quinn will touch on a number of useful modules and pragmas such as DBIx::Connector, aliased, Template::Declare, and Test::XPath.
Credits: this talk is based on an app Quinn wrote with David Wheeler as a side project at PostgreSQL Experts. Thanks to David for coming up with the methodology, and writing the (IMO) greater share of of the code, including DBIx::Connector and Test::XPath.
Announcement posted via App::PM::Announce
The CPAN client version-less dependency problem
An interesting topic came up on #distzilla
. Most modules depend on other modules, but some don't depend on an explicit version. So if you use the module with an ancient version of one of its dependencies it'll break, because the author never tested that version.
We've probably all run into problems as a result of this and grudgingly upgraded the dependencies as a result, but could CPAN clients handle this better?
Technically they're doing the right thing already. The CPAN clients are unable to distinguish between "explicit 0", "any version will do" and "author didn't say".
- Some don't specify versions at all. I mostly fall into this camp.
- Even if you specify a version for every dependency it's really hard to get it right. You might accidentally use some API feature in a dependency that doesn't match the feature set of your declared version.
- Even if you get it 100% right it's all for naught if one of your dependencies isn't as careful about its dependencies.
So what would be a better heuristic? Some suggestions:
Perl & Parsing: A Metapost
This series of blog posts on "Perl and Parsing", which is evolving into a mini-history of parsing theory, started as an offshoot of my own attempt at a contribution to parsing. I wanted to do a couple of blog posts aimed at those trying to decide whether it was better to take a chance with my new parser (Marpa), or to stick with the terrors of the known. There's a large literature on parsing, but much of it is difficult or dryasdust, and I thought I could contribute a helpful overview. "An informed consumer is our best customer" and all that.
Like other offshoots of the Marpa project before it, while the "Perl & Parsing" was originally intended to draw attention to Marpa, it's been better at drawing attention to itself. I've received some positive comments, and some helpful criticism. I'm grateful for both, and I plan to continue the series.
San Diego Perl Mongers Present Damian Conway
The San Diego Perl Mongers present Damian Conway. One night only, Monday, October 11, 7 PM at the offices of Knobbe Martens, 12790 El Camino Real, San Diego, CA 92130.
Come and enjoy Damian Conway, Perl luminary and all around great guy, as he presents his seminar, The Missing Link. The topic will be focused on Perl, but should be entertaining to all programmers.
Perl, Selenium, and ASP.NET
I've done a lot of web scraping with Perl over the years, but I hadn't experienced anything quite like the "Next page" link that ASP.NET threw at me this week. The opposite of REST, ASP.NET's ctlPagePlaceHolder
makes the simplest navigation beyond the reach of WWW::Mechanize as far as I can tell. Luckily Selenium came to my rescue.
If you haven't experienced Selenium automation, it's quite impressive. From a normal shell window (OS X Terminal.app in my case) you launch a Java server
selenium-remote-control-1.0.3/selenium-server-1.0.3
$ java -jar selenium-server.jar
and then use WWW::Selenium in your Perl program. As your Perl program runs it launches Firefox on your local workstation and performs whatever commands you issue. In my case this was simply "click 'Next Page'". :)
The Selenium IDE Firefox plugin is great for quickly mocking up what commands you need. Once it's working, drop those commands into your program to get the job done.
CPAN Testers Summary - September 2010 - Frequency
Many subtle changes have been happening to the CPAN Testers family of websites. Several have had some slight alterations to allow the additional Metabase link to appear. The website family is growing and I hope to have another added to the list before the end of the year. The codebase behind the scenes has also been upgrade for several sites to the latest version of Labyrinth, which is the version that is currently being managed for Open Source release. Once Labyrinth has been released, the remaining code for the Reports, Blog, Wiki and Preferences sites will also be released. Anyone then wishing to submit patches will be able to do so much more easily.
Presenting Perl Dancer to Python programmers
Last Monday I was at a PyWeb IL meeting and gave a lecture on Dancer, the Perl web micro-framework.
I've put the slides I had up on Slideshare and you can view them here.
You might notice the it says "for Python programmers" - that's right. I've made the slides more attractive to Pythoners. This was done by comparison to Flask (the Pythonese Sinatra) and it's interesting to see very clearly that in this case, Python had some really hairy syntax and ugly code to provide something that two lines of Perl provided more clearly.
It was a lot of fun and I enjoyed attending the other lectures (which weren't all about Python). The people were very nice and even though I was ready for snickering and mini-insults on Perl, I didn't get any. Perhaps one or two that were clearly humor and were outdone by the positive energy of people there.
Catalyst::Model::REST
So, I was looking for a Cat model to access REST services the other day. I couldn't find one so I decided to write it. With the latest release it should be pretty usable.
If you need to access a REST service from your Catalyst Application, perhaps you could give Catalyst::Model::REST a try.
It's simple, really, You can specify which server you want to talk to, and which serializer you want to use. for example
<Model Name>
server http://localhost:3000
type application/json
</Model>
UPDATE The type attribute changed to the same as content_type in version 0.08. I updated the example to show the new style.
Testing on demand on IRIX
I have this module that is failing tests on IRIX only. I do not have any knowledge of IRIX, I do not own an IRIX machine, and I do not want to create new releases of the module printing debug information on tests, so that I can analyze what is going on. This would be kind of tiresome. I needed to create a new release, upload to CPAN and wait for it to be picked by those specific CPAN testers that own an IRIX platform.
What I need is one of two things:
- Someone that help me testing the module (and hopefully helping me to understand what's wrong on IRIX)
- Get some CPAN testers on demand, where I can submit a tarball, choose a specific platform and wait for the test results.
Code help: Add bookmarks to the existing PDF
Hi all,
I am in need for code snippet to add bookmarks to the existing PDF could someone please help me?
Regards,
Thirilog
test
something should be here
Why the Lacuna Expanse is good for Perl
There have been a number of blog entries, tweets, reddits, diggs, and everything else in the Perl community over the past couple of days about The Lacuna Expanse. It's super cool to see the excitement level; it wasn't something I expected.
I figured it was about time that I made a bit of a post about it. So here I am, hoping to answer some of the questions I've seen posted, and talk a little bit about how the project came together and what that means for the Perl community. Whew! Seems like a lot for one post. =)
A few of my favourite things.... Set::Object
One module I discovered a few years ago, and seem to end up using for many things, is Set::Object by Sam Vilain.
Although this initially looks like a degraded hash - it holds a number of scalars and references - it comes with a whole batch of set operations (union, intersection, differences etc), and its fast.
Its also been consistently and carefully maintained, and Sam is a responsive maintainer.
Set::Object has been far more useful to me than I first expected, has preserved me from a ton of code mangling hashes to do the same operations, and is a really useful part of my toolkit.
The only downside is I mostly use it when working on billing related code at work - an occupation that does not fill me with joy :-/
Optimizing my freenode IRC
I wrote this obtuse little function to display six different IRC channels on freenode at once.
The Lacuna Expanse
Another obligatory Lacuna Expanse post. JT Smith announced the creation of Lacuna Expanse, a free online game with the backend written in Perl. Most free online games are rather dull (I've tried a few), but this one shows promise.
What if sv_utf8_upgrade() used heuristic encoding?
Heuristic: decode as native unless is well-formed UTF-X:
sub heuristic_utf8_upgrade {
utf8::upgrade($_[0])
unless utf8::decode($_[0]);
return !!0;
}
Here is some code to play with:
Perlbal moved to Github
While on news (and starting posts with the word "while"), Perlbal has moved to Github.
I have a lot of issues revolving Perlbal. I wish there was more development on it, I wish it catered to more generic situations (I've found myself needing a few good hacks for it and abandoning ideas because of it), I wish there were more hooks, there was more DOCUMENTATION and a decent website. I wish, I wish, I wish.
I have been trying to do several of these but my tuits have run out (expect a post relating to this).
Hopefully with the move to Github, it will be able to accept changes from the community more easily and perhaps fuel more development into it.
Good luck to it!
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.