The Perl Hardware Store
(Tools You Didn't Know You Needed)
Length: 45 minutes
Description
Six useful Perl tools that you probably didn't know you needed.
Complete Slides
- The Perl Hardware Store
- Teflon Tape
- Schwartzian Transform
- Schwartzian Transform
- @names = readdir D;
- Short Version
- Schwartzian Transform
- Manual Exporting
- Simple Example
- Simple Example
- A Module That Exports a Function
- A Module That Exports a Function
- Constants
- Exporting Variables
- Exporting Variables II
- What does this do?
- Clone the Exporter
- Adding a new Method to a Package
- Adding a new Method to a Package
- Semaphore Files
- if (something()) {
- $FILE = '/data/hitcounter';
- Memoizing
- o Pure functions get faster when you _memoize_ them.
- Highly Recursive Functions
- Automatic Memoization
- Functions that Take a Long Time to Compute
- Execution Profiling
- o Suppose you think that f is a likely candidate for optimization
- `Orcish Maneuver'
- o Suppose you have a list of 1,000 strings
- o Another solution: Memoize date-to-number conversion function:
- o You often want to speed up sort comparators
- { my %cache;
- Dynamic Programming
- Partition Problem
- o Recursive function gets a list of numbers and a target sum and solves problem:
- o T([8,2,7,3,10], 15) does indeed return (2,3,10)
- Ouch
Complete Notes
HTML
POD
TeX
PostScript
Related Talks
NYLUG version of this talk
Return to the Perl Hardware Store
DC.pm version of The Perl Hardware Store
Return to:
Universe of Discourse main page |
Perl Paraphernalia |
Other Classes and Talks
mjd-perl-yak+@plover.com