Generate and Execute: A Paradigm for Perl Programs

Generate and Execute: A Paradigm for Perl Programs

By Wolfgang Laun
Date: Wednesday, 13 August 2008 13:30
Duration: 30 minutes

You can find more information on the speaker's site:

This paper outlines techniques that are highly useful for a class of programs, their common characteristic being that they process their input data while being driven by a set of commands, The general idea is, of course, to translate the set of commands into Perl code, and to use Perl's capability of extending a running program, at any time, with the eval function being the basic workhorse. This article reports some experiences and techniques in connection with this approach that were gained while implementing sed, cut, lex, m4 and od in Perl.

The main part of the paper deals with various programming techniques: managing alternatives, separating compile time and runtime variables, avoiding loops, etc.

The author's implementations of cut, od and sed are compared with the C versions on Linux. Are the C implementations always faster?

Attended by: Nicholas Clark, Paul-Christophe Varoutas, JJ Allen, Dagfinn Ilmari Mannsåker (‎ilmari‎), Casiano Rodriguez-Leon (‎casiano‎), Roberto Henríquez, Gertraud Unterreitmeier (‎Gertraud‎), Martin Schipany (‎ElCondor‎), Roman Baumer (‎rba‎), Sue Spence (‎virtualsue‎), Andreas Hetey, allan dystrup (‎ady‎), Henrik Christian Grove (‎grove‎), Peter Makholm (‎brother‎), Markus Förster, David Leadbeater (‎dg‎), Sebastian Willert, Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 (‎daxim‎), Lars Jorgensen, Steffen Mueller, Rasmus Hansen (‎rasmoo‎), Bart Lateur, Maciej Misiak (‎grizzley‎),