(*STORE,*TIESCALAR)=
map{eval"sub{$_}"}qw'map{print&&sleep$|}split//,pop bless\$|++';
tie$t,main;$t="Just another Perl hacker,\n"
I have been blogging for some time over at http://joelslinux.blogspot.com. It was and still will be a blog about Linux and the open source software that I use. I doubt it has many readers, in fact it was mostly for me to remember interesting tidbits should I need them again.
In the past few years I have become quite a Perl enthusiast, doing most of my day-to-day work in Perl and authoring several modules. To get a little deeper into the fray I decided to split my blogging, posting on Perl here in case it may be of use to anyone. I hope people find it informative and I hope to get feedback from those who do (or don’t for that matter).
It’s starting to get cold here in Wisconsin, and that got me to thinking that I’m glad YAPC is held in the summer. I love Wisconsin, but for many the winters are just too harsh. I found this old article that claims that during the worst Wisconsin winter lakes would add 9 to 11 inches of ice in just a couple days, and there were snow drifts as tall as 15 feet.
September has turned out to have been a very difficult and traumatic month for CPAN Testers. Our server problems have now been resolved, but it has meant more time than was intended has been devoted to rebuilding the website eco-system. It's still not complete, but we are getting there.
The first sites to be reinstated were the CPAN and BACKPAN mirrors. Soon after the Statistics site and Development sites were back online. The database rebuilds took considerably longer than expected, partly because the archive of the original NNTP reports had become corrupted at some point. The checks to ensure all interconnected parts of the databases were correctly referenced also took time. A full backup was then taken so we could start from a known point once all the moving parts were restarted. Just in case anything went wrong again!
Next time I upgrade DBIx::Class it will probably tell me I need to get a haircut.
DBIx::Class::Schema::connection(): You provided explicit AutoCommit => 0 in your connection_info. This is almost universally a bad idea (see the footnotes of DBIx::Class::Storage::DBI for more info). If you still want to do this you can set $ENV{DBIC_UNSAFE_AUTOCOMMIT_OK} to disable this warning. at lib/Territory/Model/TerritoryDB.pm line 23
If you're looking to break in to web development, and have a chance to work on some of the coolest web apps in the Perl world, Plain Black is hiring 2 developers. Here's the job description:
Plain Black is hiring and we’re looking for a geek like you. Not your average geek, but someone who wears GEEK as a badge. Someone who breathes Perl, and drinks Linux. A geek who knows that there’s more you can do with SSH than just open a terminal to a remote box. Someone who believes that Internet access is not just a human right, but that it’s as important as air, water, and shelter. If we’ve described you, then please apply.
During August this year, in Riga, Latvia, YAPC::Europe brought together 285 people to learn, discover and discuss Perl. As previous attendees know the YAPC conferences are a perfect opportunity to introduce yourself to the Perl community. YAPCs are now held all around the world and each is very different another. Each has their own charactistics, and they all get better and better thanks to the feedback from attendees old and new, which is why the YAPC Conference Surveys are well placed to concentrate that feedback for future organisers.
Some of these people would like to do away with needing Firefox to be running on the machine doing the automation. To look in that direction, and to gain some familiarity with nodejs, I started porting the proxy object backend MozRepl::RemoteObject to nodejs. I've uploaded the work in progress to Github as NodeJs::RemoteObject. There is a lot of copied and pasted code between the two ::RemoteObject modules, and likely, this will beget a third, shared incarnation of (Javascript) proxy object implementations.
The main thing that's still needed is to actually write a web "browser" implementing just enough to run most web applications, for nodejs. I think there already is something called "jsdom", which claims to be just enough of a browser to make this work.
The Perl Testing Workshop at YAPC::NA 2012, taught by Gabor, will be in Room 226 of the Pyle Center. We thought you might like a look at the room before the workshop. The workshop will be held for the 2 days before the conference (June 11 & 12).
So, I've been awfully quiet lately. There are a number of reasons for that, not the least of which is being the proud parent of a delightful little girl. Another reason has been simple: I'm writing a book.
A couple weeks ago I posted this introduction to DCI. I received a lot of feedback. Primarily I was told that I did not explain DCI concisely enough. In addition I received feedback that showed me I completely failed to convey the point of DCI. DCI does not replace OOP, it augments it and makes it easier to maintain.
After reviewing all feedback, and corresponding with many of those who provided it, I have written a new document. This document attempt to use simple language, to put DCI as simply as possible. Unfortunately the logical leap to grasping DCI is at least as large as the logical leap from Imperative to OOP, and cannot be consistently conveyed in a simple paragraph (at least not with my writing skills.)
In trying to learn 5.10 grammar-like regex features and wrote a program that, while matching simple Lisp-like constructs, builds up a data structure. This involves recursing into subpatterns, but I couldn't find a way to assemble the resulting tree from the bottom up. Therefore I used a stack.
Do you know of a better way of building the data structure with the given regex/grammar?
(I'm aware of Parse::RecDescent and Regexp::Grammars, but wanted to do this as simply as possible.)
I’d like to wish all of our sponsors a very Merry Christmas. Without you YAPC::NA 2012 wouldn’t be possible. And because of you, YAPC::NA 2012 is shaping up to be an absolutely amazing event.
tl;dr version: The design of require makes it all but impossible to use in a secure and correct fashion. To fix this, Perl needs two new ops: one which will only load files, and one which will only load modules. Both would only load from @INC.
The more I look into the problem, the more I'm convinced that there is no good way to load a module from a variable in Perl. None of the existing techniques or modules fully solve the problem. They all have security holes or limitations. This is kind of embarrassing, it's an easy thing and it should be easy. My investigation into how many ways the simple act of loading a module can go wrong has lead me to believe that the solution is a new op which just loads modules.
For those of you wondering, near as I can tell this is how you correctly and securely load a module from a variable...
Inspired by a recent blog post on patching cpanminus, I decided to spend a few minutes patching cpanm for a small itch I have: sometimes I want to download distribution tarballs only without building/installing. This patch adds a --download command to do just that.
To try it out for yourself:
$ git clone git://github.com/sharyanto/cpanminus.git
$ cd cpanminus
$ script/build.PL
$ perl Makefile.PL && make install
$ cpanm --download CGI Data::FormValidator