Submit a Talk for YAPC::NA 2012!

Submit a talk for YAPC::NA 2012. We’re especially interested in talks on real-world Perl apps and quintessential Perl 101 talks, but we’re open to any ideas you have. 

[From the YAPC::NA Blog.]

DBD::mysql 4.019 and 4.020 are broken on Win32, here's how to downgrade

Edit:

ActivePerl's Jan Dubois has kindly applied a patch to DBD-mysql 4.020 on their servers, so you can just do this:


Original post:

This a warning to Win32 perl devs using DBD-mysql.

The versions 4.019 and 4.020 are broken in a rather subtle way: All SQL errors are silently ignored and in fact not even triggered, no matter what RaiseError is set to or what kind of error happens. As an example, this code will run without a complaint:

Various messages have been sent to the maintainers of DBD-mysql, including a proposal for a fix. However, implementation of a fix and release of a new version will likely take some time.

In the meantime downgrading is the only viable option, but sadly the ppm client does not make that kind of thing very easy. As such, this is the command you will need to execute to downgrade your DBD-mysql:

Note that is compiled for Perl 5.12. By changing the Perl version part of the url you can also get it for 5.8 and 5.10. For 5.14 there is no ppm available though, so if you're using that you will have to downgrade your entire Perl or try your luck with the 5.12 one.

A Glimpse Of YAPC::Asia Tokyo 2011

tl;dr> YAPC::Asia Tokyo 2011 was a great success. Check out our photos, our videos, and check out the talk slides.

So as I previously announced, YAPC::Asia Tokyo 2011 is now over. Apparently we had more attendees in this single YAPC than all of North American Perl events combined for year 2011:

22:44 r: I just read that 672 attendees number on blogs.perl.
22:46 p: yeah that's easily 30% larger than all of the NA events combined.
22:49 r: yapc 244 + PPW 78 + frozen perl 46 + perl oasis 34 = 402 NA for 2011

Yippeee!

Using XML::Compile to output XSD compliant XML

As part of a recent project I was given an XSD file (xml schema definition) and asked to output compliant XML. CPAN to the rescue. I found XML::Compile::Schema which is a cool module that allowed me to do this with very little fuss. The documentation is really good but I think a tutorial-style post might be helpful.

To do this you’ll need to install XML::Compile and XML::LibXML.

You can use XML::Compile::Schema to read in your xsd file and output a perl hash template. Then you can use that example template to construct a hash of real data and then have XML::Compile::Schema output a valid XML file.

For this tutorial, download a sample .xsd file from here. Then write a perl script like so to dump a perl hash template.

Keep Those Ideas Coming

A while ago we put up the YAPC idea collector. You’ve given us a lot of great feedback so far, but keep those ideas for YAPC::NA 2012 coming, and keep voting on the existing ideas. 

[From the YAPC::NA Blog.]

German Perl Workshop day 1

Today, the german perl workshop 2011 started. Today's keynote was done by Heiner Kuhlmann, who talked about software architectures and refactoring. The interesting point was the parallelism between data structures and software structure. All the time I was comparing his talk with Robert C. Martin's book "Clean Code" which mentioned refactoring a couple of times. The common denominator is that refactoring without intensive testing cannot be successful.

Renée Bäcker demonstrated the use of Role::Basic for non-Moose environments. Looks very useful.

Rolf Langsdorf talked about possibilities to extend Perl's syntax using syntactic sugar and function prototypes. He tries to avoid source-filters and parsers in order to avoid breakage of external tools.

Uwe Voelker talked about HTML5::Sanitizer, a module he wrote to clean uploaded HTML code.

Max Maischein demonstrated Web Scraping techniques using FireFox to allow scraping websites that depend on JavaScript.

Looking forward to tomorrow's talks :-)

Asynchronous MySQL Queries in Perl Using DBD::mysql and AnyEvent

A lot of people use MySQL, and these days, asynchronous-style programming has really taken off. If you're involved in both of these camps, you may be wondering
how to send a query to MySQL and have it inform your event loop when it's ready with the results of that query. A common solution is to use a thread or child process
for each connection, and exchange data using IPC. However, if you're using Perl and DBD-mysql 4.019 or better, you have an alternative: the new asynchronous interface.

Using the new async flag that you can provide to the prepare method, along with the new mysql_fd method, it's fairly easy to have MySQL play nice with AnyEvent.
Here's a simple example:

I'm back

I don't think I've been seen since use Perl; went on indefinite hiatus. I am still programming Java for my day job, but still using Perl to make my life easier. A few months ago I did some investigation into Rose, and these days I am doing some investigation into Moose. DateTime::* modules also continue to hold fascination for me.

I will probably blog about my difficulties and interesting things I see. In the past I've often tended to post about things that don't work the way I would expect them to. I've sometimes been chastised for not filing bug reports, but I don't always want to file a bug report. Sometimes I just want to yak about it.

Anyway, hi, guys!

Dynamic HTML 5 using jQuery for Perl Programmers

Pete Krawczyk will be giving a talk at YAPC::NA 2012 that he describes as:

This talk is intended for audiences who are familiar with Perl and have some experience with HTML and CSS, but little or no JavaScript/jQuery experience. Source code will be provided before the talk; attendees are encouraged to download and follow along.

We’ll migrate a to-do list app that allows adding, deleting and rearranging of tasks.We’ll start with a pure Perl/CGI/HTML4 implementation and migrate it to a dynamic Perl/jQuery application using HTML5. Along the way, we’ll discuss JavaScript, JSON and XML, event-based programming, AJAX and asynchronous requests.

[From the YAPC::NA Blog.]

A free Perl talk Oct. 22nd in Columbus Ohio

The 2011 Code Camp Columbus is nearly upon us. It is all day the 22nd and it is free to all attendees.

I will be giving a talk about building Perl applications to solve everyday problems culminating in a WWW:Mechanize application that shows most of the previous examples working together. At previous conferences and events when I talk about Perl it is the context of using it to automate install tasks and is more about finished applications versus Perl development so this is somewhat new to me.

I plan to put the slides and other material up before the conference for community perusal
and commentary. I usually over plan the amount of material I need for one of these presentations.

Here is the full speaker schedule, there is a wide variety of non-Perl topics as well.

Perl traps for Ruby Programmers

To list in the next Camel the gotchas Ruby programmers might have run into with Perl, I've really had to dust off my Ruby skills, few as they are. I got a lot of good feedback for my Perl traps for Python Programmers, both public and private, so I'm doing it again for Ruby.

I'm only interested in the practical aspects of a person used to Ruby moving to Perl and the things they might try to do based on their Ruby experience. Also, since we already covered some things in the Python section, I'm not going to repeat some of the items.

Several Perl people have good Ruby experience, so please check my work and suggest what I've left out.

Announcing Alien::GSL 0.03_01

I have now released a dev version 0.03_01. If any interested parties can spare a few moments, please try installing it and let me know if it behaves for you.

For Linux users:

- If GSL is installed, it should find it and install should complete quickly
- If not, it should download the source
---- if installed as root, it should install system-wide
---- if not root, it should install in a File::ShareDir

For Windows users:
it should download a precompiled version (GSL 1.15) from my work server (hopefully not the final location for this download) and again use File::ShareDir to keep it.

Mac:
The wild west of default behavior. It should build from source (assuming it builds correctly) and use File::ShareDir (I think).

It is still not ready for production, and I expect that my Math::GSLx::ODEIV2 will be the first thing to do so eventually.

Comments would be great!

Joel

Lightning Talks

I’m very pleased to announce the Geoff Avery will be reprising his role as Lightning Talk MC for YAPC::NA 2012. Geoff does a great job organizing the Lightning Talk sessions at YAPC, and we’re so glad to have him come to Madison.

If you’ve got ideas for lightning talks, please feel free to submit them in advance.  

[From the YAPC::NA Blog.]

Perl dropped and Go adopted due to concurrency issues in baconbird

A little part of my Perl soul died the other day when I read a tweet by Mark Jason Dominus:

Perl didn't work for this guy, here's why. It was a really good article, should be required reading for #perl folks: synflood.at/blog/index.php...

When Andreas Krennmair announced a new Twitter client called baconbird in late 2010 he sounded very enthusiastic about Perl, saying

The code itself is about 850 SLOCs of Perl code, the user interface is based on STFL, the Twitter backend uses Net::Twitter, and all the OO glue code in between uses the Moose object system. All in all it took me less than 2 weeks of my free time to develop the first version of it.

[UPDATED] Beginning Perl For Bioinformatics

One of my favorite tweeps asked for some up-to-date resources to help her teach Perl to her university's Biology students. "Biology students?", you ask. Yes! If you've mostly used Perl for Web development and systems support, you might be surprised to learn that Perl is huge in the bioinformatics domain. Hell, perlgeeks played a crucial role in cracking the human genome. SCIENCE!

Anyway, since I'm neither all-knowing nor all-seeing (shocking, right?) I figured I'd put the list of resources up here so others could chime in.

Spreadsheet::WriteExcel is dead. Long live Excel::Writer::XLSX.

Last week I released a new version of Excel::Writer::XLSX to CPAN that was 100% API compatible with Spreadsheet::WriteExcel. This marked a milestone as I am now able to move past WriteExcel's feature set and move on to new features that I wasn't able to support previously.

This was achieved with 30 CPAN releases in almost exactly a year. By comparison, WriteExcel took almost 10 years. This gives a fair indication of the disparity of effort required to implement a feature in the pre-Excel 2007 binary xls format as opposed to the new XML based xlsx format.

So, from now on, all new features will go into Excel::Writer::XLSX and Spreadsheet::WriteExcel will be in maintenance mode only.

The first of the new features, conditional formatting, was added yesterday. For a long time has been the most frequently requested feature for WriteExcel but it was always too big a feature to implement in the available time that I had.

Reading QR Codes with Perl

Reading QR Codes with Perl :

As a response to our post on QR Codes at YAPC::NA 2012, oylenshpeegul came up with a way to read QR Codes with Perl.

[From the YAPC::NA Blog.]

Perl traps for Python Programmers

I'm updating the Camel. Chapter 24 has short sections for people moving from one language to the next. Right now I'm working on the Python section. My Python is rusty. If you started in Python and moved to Perl, I'd like to hear about the gotchas that you didn't expect.

This is absolutely not a platform for bashing another language. I don't care about any of that. I don't care why the readers want to use Perl or why they want to use Python. I care about people who are used to doing something one way in Python and might be surprised why that's not obvious or apparent in Perl.

Here's some things I have so far, which I just cut from our own pseudopod:

Announcing acme.cpanauthors.org and cpants.charsbar.org

I'm happy to announce that I've launched a website for Acme::CPANAuthors modules. You can see which group is supposed to have the largest community, or have contributed to the CPAN most, or who is the most prolific author in a community or the author of the highest kwalitee. Of course these are based on unofficial user-defined lists, and these lists don't cover all of the CPAN authors yet (as of this writing, about quarter of CPAN authors (or half of active authors) are covered). So we shouldn't take them seriously, but anyway, have fun, and feedbacks are welcome.

http://acme.cpanauthors.org/

I also announce that I've unofficially set up a Module::CPANTS::* based site (http://cpants.charsbar.org/) to provide kwalitee data for acme.cpanauthors.org. As I found I would need significant changes at the first try (because the latest Module::CPANTS::Analyse doesn't correspond well with other Module::CPANTS modules, and they use old and deprecated ways of writing of Catalyst/DBIC), I tentatively set up a local repository and committed all the necessary changes there so as to hide all the dirty trial and errors. I'll move on to the public github repository when ready. So please be patient.

AutoCRUD revamped

For a couple of years I’ve been planning to rip apart and put back together the guts of Catalyst::Plugin::AutoCRUD, to address limitations in the initial implementation. After changing job and moving house I’m pleased this finally came to the top of my hacking stack.

Nothing was going to happen however before I could work out how to do one thing: achieve independence from DBIx::Class as a “storage engine”. I love DBIx::Class, but it would be much more cool to support any data storage system able to represent a table+column paradigm (even things like CSV, as a test case).

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.