Lazyness is a Virtue -- especially for data loading.
By Steven Lembark from Stlouis.pm
Date: Tuesday, 28 June 2011 10:00
Duration: 20 minutes
Target audience: Intermediate
Language:
You can find more information on the speaker's site:
Accessing a database at process startup for static information is common, but can be hard on the database in a production environment. Another bad alternative is re-checking the data status every time it is used. An AUTOLOAD can handle the issue by lazily installing the sub, but makes it impossible to use can.
Lexical variables and a one-shot subtrouine to load them offer a nice, clean, private way to handle lazy data acquisition: put the permanent handler and data structure in lexical variables, and have the subroutine replace itself after the first call.
- James E Keenan (kid51)
- Mike Weisenborn
- James Mastros (theorbtwo)
- Daniel Sterling (Dan)
- Matt Reinhart
- Stephen Scaffidi (hercynium)
- Christoph Otto (cotto)
- Mike Burns (lungching)
- Chas. Owens (cowens)
- Robert Threet
- Greg Estep
- Jon Gentle (atrodo)
- Charles Phillips (Chuck)
- Leanan
- Link McGaughey
- Steve Smale
- Tommy Petty













