Mark-Jason Dominus, Chief Programmer, Plover Systems Co.
Date: Monday, July 24
Time: 1:30pm - 5:00pm
Location: Portland 255
The first section concerns the technique of dynamically replacing functions with facades. Without changing a function's code, we can add caching behavior to it, or have it enforce an interface contract, or automatically track its own performance.
The second section concerns iterators, which are functions for generating data a little bit at a time. For files, provides filehandles, but the technique is more generally applicable. As with filehandles, the technique is suitable when the total amount of data is too large to use all at once. This section ends by implementing an improved version of Perl's standard File::Find module. Unlike the usual implementation, the improved version can be stopped in the middle and resumed later as often as desired. Multiple searches can be active simultaneously, making it possible to recursively compare two separate directory structures.The final section concerns parsing. Perl's built-in utilities make it easy to parse simple inputs, but for more complex data a modular approach is more effective. A basic parser is a trivial function that transforms a simple input into a value. By writing functions that build more complex parsers from simple, interchangeable parts, we can easily built up a parser for any kind of input.