Introduction to writing Perl Documentation

Mark A. Stratman will give a talk at YAPC::NA 2012 described as:

This talk will help get you in the mindset necessary to write effective documentation.

We will briefly touch on POD (Plain Old Documentation) syntax, but due to its elegant simplicity we can quickly move on to examine the bigger picture, and explore the decisions we face when writing documentation.

Some key points will include:

- Conventions and expectations

- APIs, Tutorials, Manuals, and Cookbooks… and how and when to use them.

- Writing POD to take full advantage of formatters (e.g. Pod::LaTeX, Pod::HTML)

- Inviting community contributions

[From the YAPC::NA Blog.]

Paris.pm january technical meeting

Cross posted from my github blog post

Developing parsers incrementally with Marpa

Marpa::XS is a general context-free parser. What does that mean? For a grammar writer, it means that he doesn't need to worry that the next rule he adds to the grammar is the one that makes it hit the invisible wall that most other parser generators set up. If you can write it in BNF, Marpa will parse it. Which makes Marpa::XS good at incremental development.

As you develop your Marpa grammar, you can track the tradeoffs you are making between features and efficiency. Chances are, if your grammar is unambiguous or lightly ambiguous, there are no tradeoffs -- you're getting everything you want in linear time. Marpa is linear for every class of grammar currently in practical use.

Marpa is also linear with many ambiguous grammars and, in the worst case, Marpa's time complexity is what is accepted as optimal in practice. Whatever the time complexity that you're seeing with Marpa, it's probably as good or better than you're going to get from another parser generator.

One way to start the semantics

ASUS EPU-6 utility hacked with Win32::GuiTest

Some time ago I've bought a windows desktop with ASUS EPU6 because I wanted my desktop to be extra quiet. It is quiet indeed, but it's done by a special GUI utility, where one should compromise first between noise and CPU speed. That utility runs on startup, remembers its last setting, and hides itself, so theoretically there's nothing wrong with it. Except that often the setting are not remembered/recovered, and the desktop begins to makes noise until I run and setup that utility manually.

Here's the culprit, ASUS EPU-6 utility. By the looks of it I guessed that there'll be no commandline access to the motherboard setup, and indeed googling for API didn't help, and I'm not going to write to ASUS about it. Instead, I hacked a little script using Win32::GuiTest that simulates mouse clicks to the selected buttons.

Normally, I wouldn't even bother to publish such small piece of code, but if someone is (or will be) like me, royally annoyed by this gui dumbness crafted by ASUS, hopefully it helps.

HTML forms with FormHandler

Gerda Shank will give a talk at YAPC::NA 2012 described as:

Using FormHandler forms from basic to complex. Organizing your form library. Different rendering options; rendering themes; rendering for Twitter Boostrap and similar frameworks. Automatic database integration; handling your own database updates. Customizing form behavior. Testing forms.

[From the YAPC::NA Blog.]

Cpan Module not installing properly

Hi all i installed the strawberry Perl but when i am installing Cpan module it gives the error

Fetching with LWP:
http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 (t
imeout)]
Warning: no success downloading 'C:\Strawberry\cpan\sources\authors\01mailrc.txt
.gz.tmp1460'. Giving up on it.
Fetching with LWP:
http://www.cpan.org/authors/01mailrc.txt.gz
LWP failed with code[500] message[Can't connect to www.cpan.org:80 (timeout)]
Warning: no success downloading 'C:\Strawberry\cpan\sources\authors\01mailrc.txt
.gz.tmp1460'. Giving up on it.
Warning: no success downloading 'C:\Strawberry\cpan\sources\authors\01mailrc.txt
.gz.tmp1460'. Giving up on it.

s/ZeroMQ.pm/ZMQ.pm/g

So I've been doing this and that with ZeroMQ.pm, the Perl binding to http://zero.mq, and a little while ago there was a request from the zmq community to align all the language binding names as "*zmq".

Well, since libzmq 3.1.x has many API incompatibilities, I thought it's a good timing for a rename. So there: topic/libzmq3 branch is now libzmq 3.1.x compatible, and the module namespace is now ZMQ instead of ZeroMQ.

I must say I haven't tested this code much, so if you're interested, please take it for a test, and file issues and/or send me pullreqs on github!

Perl is more viable for web development than ever!

Today on StackOverflow, an old thread popped up that prompted me to answer. That answer became a slightly longer compendium of recent developments in Perl and Perl-for-web.

I will copy the text here, but I am asking you to vote it up so that it will show for future viewers. So that I will not be getting undue points, I have made it community wiki (also means you can amend if you want).

Vote here: http://stackoverflow.com/a/8828209/468327

== Post Content ==

This is an old question, but I thought I should update the readers. I am happy to report that in my opinion Perl is more viable for web development than ever! Along with old friends Catalyst and (recently revamped) Mason, there are some great new entries Mojolicious (or visit mojolicio.us) and Dancer. I’m sure there are others too.

Perhaps the biggest improvement is PSGI/Plack (or visit http://plackperl.org/).

The Essential Perl Hacker's Toolkit

Stephen Scaffidi will give a talk at YAPC::NA 2012 described as:

MetaCPAN Logo

very often, when I see a logo drawn by somebody else, I highly appreciate his or her work. Many logos are simple but very easy to remember and recognize. Graphics is not my business. Maybe I just made more than 1000 graphical mistakes. However, my father-in-law when he was some 80 years old always used to say 'I am young and still can learn'. Here is my first graphical try (click to enlarge):

wolfgang_kinkeldei_de-metacpan-16-120111.png

Improved version:

meta_cpan_kerned.png

I hope it is not too bad. Otherwise I will have to wait until I reach a reasonable age :-)

The Case of the Overloaded Curlys

When I entered our rooms in Paris after a day on the boulevards, I found C. Auguste Dupin at his desk contemplating a scrap of paper. "A problem?" I asked.

"A death. And a rather gruesome one, n'est-ce pas?" he replied, handing me the paper. On it I saw:

$ perl -e '%h = map { "-$_" => 1 } qw{ foo bar };'
Not enough arguments for map at -e line 1, near "} qw{ foo bar }"
syntax error at -e line 1, near "} qw{ foo bar }"
Execution of -e aborted due to compilation errors.

Well, a map takes either a block or an expression followed by a comma, and either must be followed by a list. The block was there, and so was the list. Clearly a neophite had been playing with bleadperl, and paid the price. With a rueful shake of my head, I silently passed the paper back to the detective.

"No, this was a production release of Perl, mon ami."

"But how --" I expostulated.

CPAN and undef versions (again)

Some time ago I complained that some modules that had a version ended doing it. The problem? I use a lot the 'r' command in the CPAN client to check for outdated modules. Now, I get a lot of failures that are not really failures:

Package namespace         installed    latest  in CPAN file
HTML::Mason::Apache::Request     undef         0  DROLSKY/HTML-Mason-1.47.tar.gz
JSON::PP::Boolean             undef   2.27200  MAKAMAKA/JSON-PP-2.27200.tar.gz
JSON::XS::Boolean             undef      2.32  MLEHMANN/JSON-XS-2.32.tar.gz
JSON::backportPP::Boolean     undef   2.27200  MAKAMAKA/JSON-2.53.tar.gz
Net::Stomp::Frame             undef         0  JTANG/Net-Stomp-0.44.tar.gz
SVN::Core                        ..    1.6.12  MSCHWERN/Alien-SVN-v1.6.12.1.tar.
Text::MicroTemplate::EncodedString     undef      0.18  KAZUHO/Text-MicroTemplate-0.18.tar.gz
So, what are my versions for these modules?

Booking is now a YAPC::NA 2012 sponsor!  Booking.com is...



Booking is now a YAPC::NA 2012 sponsor! 

Booking.com is part of Priceline.com and is World’s #1 Online Hotel Reservations Company, offering over 200,000 hotels worldwide.

Due to the growth of our IT department we are now hiring Perl devs!

We use Perl, Apache, mod_perl, MySQL, Memcache, Mason, JavaScript, Git, Linux & more!

Our software development basis is SCRUM.

If you want to work in an international, result driven, fun & dynamic environment, join our team in Amsterdam, the Netherlands!

[From the YAPC::NA Blog.]

App::TimeTracker 2.016

Read more about App::TimeTracker 2.016 and how Test::MockTime can help you testing stuff that depends on time (an inherent fluid "thing" that's rather annoying test) in the latest App::TimeTracker blog post

Exploit Git Hub tags!

If you put your Perl code on Git Hub, I'd like to encourage you to use a a feature that isn't (at all) intuitive: tags.

Basic tags in git are a human friendly label that point to a certain commit. Basic tags don't have a git object associated with them so they're mostly for use on your local repository.

It is also possible to create "annotated tags" which are first class git objects and point to a specific commit (as the top of a tree of commits.) Because annotated git tags are first class objects, it is possible to share them across repositories. It is these tags that I would encourage you to make if you use Git Hub.

Working on GraphViz2::Marpa

Hi Folks

I've started work on GraphViz2::Marpa, which will use Marpa::XS to parse GraphViz-style 'dot' files.

This is mainly to exercise my Marpa skills. However, I'm hopeful the result might/will lead to an on-line editor for dot files, with 2 panels, a dot editor in one and a result of the server rendering the output from dot (or whatever) in the other, all in Perl. We'll see.

Web Security 101

Michael Peters will be giving a talk at YAPC::NA 2012 described as:

Security is important in any programming environment but programming for the web has some unique possibilities and hazards. Most web programmers have little to no training in security and lots of web development is done by people who don’t wear a full-time developer hat. Add to this the fact that bad security on a web project can have very public, very embarassing, and sometimes legal consequences.

This talk will walk through the basics of web security without focussing too much on the particular tools that you choose. The concepts are universal, although most examples will be in Perl. We’ll also look at various attack vectors (SQL Injection, XSS, CSRF, and more) and see how you can avoid them. Whether you’re an experienced web developer (we all need reminding) or just starting out, this talk can help avoid being the next easy harvest of The Bad Guys.

[From the YAPC::NA Blog.]

More Marpa Madness

For the past year or so, I've been following the posts on Marpa with interest, but I never got around to writing anything with it, because honestly, the docs seemed a little bit opaque and incomplete to me.

Then, the other day, I saw Jeffrey's post about lexing with Marpa and I took it as a challenge. You see, I've never written a lexer. I've written grammars using "lexer-free" parser builders like Parse::RecDescent and [Regexp::Grammars](https://metacpan.org/module/Regexp::Grammars], and hand-written recursive-descent parsers with the help of Parser::MGC, but when it came to writing anything that required a lexer, I was paralyzed. It seemed to me that lexing was frequently ambiguous, and dealing with that ambiguity was a black art that I couldn't understand.

CPAN Testers Summary - December 2011 - Blood on the Tracks

Happy New Year to all. Last year had its ups and downs, so here's hoping that 2012 sees a much more settled year :)

2011 ended on a rather sour note, with our previous hosting company, Hetzner, causing us no small amount of stress and infuriation last year. I could recount all the problems, but suffice to say I would never recommend them to anyone ever again.

Stepping Up


This week I became co-maintainer of a second module: Test::File.  I now have the privelege of being co-maintainer on modules by two of our most prolific Perl authors (i.e. schwern and brian d foy).  And, as you may have gathered from my blogs thus far, I’m certainly no one special.  What did I do to receive such honors?

Nothing, really.

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.