My blog
Here are the latest blog posts I’ve written. My plan is to write entries more frequent in the future, but often actual hacking comes in the way.
Mojo::IOLoop likes running programs asynchronously
Want to be able to run programs and arbitrary Perl code asynchronously, while being able to read from STDOUT and STDERR, and also write to STDIN? Try out Mojo::Run3! When working with Mojo::IOLoop, you might find yourself in a situation where you want to run another program, but you also don’t want to block the …
Write and test Perl command line tools with ease
Writing command line tools often involves a lot of boilerplate and they can be hard to test. Getopt::App is a module that helps you structure your command line applications without getting in the way. I already have a competing module called Applify on CPAN. This module aims to solve the same problems as Getopt::App, but …
Browser testing is hard. Let’s go shopping
Tonight at the monthly Oslo.pm meetup, I gave a talk about how to test your web application in a real browser. This blog entry is a collection of the steps I went through while running live demos showcasing my module Test::Mojo::Role::Selenium. My module uses Selenium::Remote::Driver which is a library that communicates with desktop browsers, such …
Rewriting Mojolicious::Plugin::AssetPack
Update: I suggest checking out Mojolicious::Plugin::Webpack instead. AssetPack is a Mojolicious plugin which helps you process CSS and JavaScript assets. It can convert other formats, such as SASS, Less, CoffeScript (and many more) into a format the browser understands. This makes the development process a lot smoother. AssetPack also makes sure the assets are minified …
How I write web applications
This blog post is about the standard components I use when I develop and deploy my web applications. Server side components Mojolicious When I make a web page or web application I use Mojolicious. Mojolicious is this awesome realtime web framework, which makes web development a walk in the park. It has a lot of …
Testing with a real database
Writing tests against a database is a struggle. Maybe the best way is to not test against a database at all, but providing a mocked interface instead. Even if this could be true in many cases, you still need to write integration tests for your models against a real database. This post digs into various …
Convos revamped!
Convos is a chat application that runs in your browser. It allows you to be persistently connected to IRC servers, where you can leave the office and up the conversation on the bus without being disconnected. Convos was born in June 2012. It has been developed to scratch an itch that both myself and Marcus …
Reasons for choosing Mojolicious
This blog post is a response to http://perlmonks.org/?node_id=1133505. I tried to reply directly, but I got “access denied” for some reason, so I decided to write a blog post about it instead. The post on perlmonks was: Good day fellow monks, I am starting a new project, with a clean slate, this is a wonderful …
@swaggerapi and #Mojolicious – How to validate your input/output with a schema
OUTDATED This blog post is outdated. You might want to check out A RESTful API with OpenAPI instead. Mojolicious is an awesome web framework which allow you concentrate on the business logic, while the rest Just Works ™. Swagger is “The World’s Most Popular Framework for APIs”. Swagger is a language for specifying the input …
The Lenovo Thinkpad x240 is awful, but…
Worst x-series laptop The thinkpad has an awful touchpad. Or even worse: it’s a clickpad! A clickpad is a touchpad without physical buttons. This means that it seems like you only have one big super-sensitive button in Linux. You do actually have two buttons, but they are at the bottom of the clickpad, and not …