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