September 2020 Archives


Today I released Zydeco::Lite, a re-implementation of Zydeco but just using standard Perl syntax. So for example, class { ... } becomes class(sub { ...});.

This has the advantage of much faster compile time, similar run time speed, fewer dependencies, and compatibility with older versions of Perl before the keyword API was introduced. Of course, in some circumstances these aren't important concerns, so the nicer syntax of the full Zydeco will be preferred.

Zydeco and Zydeco::Lite are both based on MooX::Press which itself is based on Moo, Type::Tiny, and other modules. I've taken the synopsis example from the Zydeco documentation and rewritten it using the different layers of abstraction.

Web Scraping with Zydeco

So I like to keep local copies of my blog posts as Atom entries, but noticed yesterday that I had a few gaps in my collection. The Atom feeds offered by only have the most recent articles though, so I decided to write a quick script to scrape the posts. Luckily, I managed to get a table containing the URLs for each post I needed, so I didn't need to bother with following links to find the pages; I just needed to grab the content from them.

I thought some people might find the code interesting especially for its use of lazy attributes. This is one of those "it only needs to be used once, so making the code maintainable isn't important" kinds of projects, do bear that in mind. I've cleaned up the whitespace and added comments for this blog post, but other than that, it's just a quickly hacked together script.

About Toby Inkster

user-pic I'm tobyink on CPAN, IRC and PerlMonks.