STOLEN SECRETS OF THE WIZARDS OF THE IVORY TOWER Length: 3 hours Who should attend: Intermediate to advanced Perl programmers with experience working on large projects. What you will learn: It's well-known that Perl resembles languages used in the Unix sysadmin community, such as C, Bourne shell, awk, and sed. People programmers tend to come from that community, or to have been trained by people who did. Perhaps you've heard the joke that a dedicated Fortran programmer can write Fortran programs in any language. But Perl programmers have been writing C programs in Perl for years without realizing it. This class will show you how to effectively use some of Perl's most powerful features to do organize your programs more powerfully and effectively. I've raided the techniques of the Lisp and functional programming communities and come back with all the loot I can carry, techniques for increasing modularity and interoperability on large projects. We'll take recursion to the next level and see how to build powerful recursive functions for managing hierarchical data. We'll see how callbacks, usually relegated to GUI programming, can be used to increase modularity in your library functions, so that they can be used in ways you didn't expect, by programmers years later, without anyone having to change or even look at your code. We'll look in detail at how to provide 'function factories' that manufacture, on demand, the library functions that the user needs. We'll see how objects based on anonymous functions can be used to get around some of the limitations of Perl's built in OOP system. We'll see how to make your own filehandle-like objects that generate data on demand. Recursion Using Callbacks to increase modularity Anonymous Functions User Parameters Return Values Emulating 'du' Caching: Making functions faster What is Caching Caching Example Caching Fixes Recursion Memoization Adding Caching Code is Too Much Work Memoization: Getting Perl to rewrite your function Closures Memoization Caveats More uses of memoization Caching for benchmarking and profiling Iterators What and why are Iterators? Iterator Example Iterative File Tree Walker Iterator Operations More Generic Iterators More Applications of Iterators Objects Anonymous Subroutines as Objects Benefits of subroutine-based objects Syntactic sugar Iterator objects for numerical computations Infinite Lists Streams Stream Implementation Promises Simple Example map and grep for infinite lists More applications Merge Factory Dispatch Tables State Machines Implementing State Machines in Perl State Machine For NNTP State Machines Are Very Easy to Read! Caution; This tutorial is substantially the same as last year's "Advanced Programming Techniques" class. People who took that class last year whould not take this one. Bio: Mark-Jason Dominus has been programming in Perl since 1993. He is the managing editor of www.perl.com, a moderator of the comp.lang.perl.misc newsgroup, an occasional contributor of Perl core patches, and the author of the 'perlreftut' manual page. He is noted for his articles in the Perl Journal, his classes and tutorials at past Perl conferences, and his 'Memoize', 'Text::Template', and 'Algorithm::Diff' modules.