Trampoline objects provide stand-ins for other objects, delaying
construction of the 'real' object until a method is called. This
saves both the overhead and errors of initializing unnecessary or
large objects until they are used and if-logic to perpetually check
if the initialization has happened. They can be used for any objects,
but are most helpful for bulky or slow initialization that will
unnecessarly inhibit process startup.
This talk looks at implementing a Trampoline in Perl, how to use them,
and a few issues with using them.
As an exercsise: See how many 'rules' in Perl Best Prectices this
breaks, or how you might successfully implement these in any another
language.