in reply to Prototypes and hand-written MMD

Don't forget that closures created by using & prototypes can be dangerous. They leak memory under certain patterns of usage, and can generally be a PITA to debug.

Honestly, anything you could do in the past with the & prototype can probably be done cleaner and without closure-leakage issues using Source Filters (see perldoc perlfilter). The only reason to avoid that route is if you need to support pre-5.8 perls without installing optional modules or something.

Replies are listed 'Best First'.
Re^2: Prototypes and hand-written MMD
by ysth (Canon) on Jan 11, 2006 at 19:14 UTC
    Do you have any references to information on this leak?
        I'm seeing the code given there leak on 5.6.2 and 5.8.0, but not 5.8.1 and on.
Re^2: Prototypes and hand-written MMD
by diotalevi (Canon) on Jan 11, 2006 at 20:29 UTC

    Or you're sane and avoid source filters. Source filters are for plague bearers, silly!

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊