NYTProf 2.09 – now handles modules using AutoLoader, like POSIX and Storable

I’ve uploaded Devel::NYTProf 2.09 to CPAN.

If you’re using VMS the big news is that Peter (Stig) Edwards has contributed patches that enable NYTProf to work on VMS. Yeah! Thanks Peter.

For the rest of us there’s only one significant new feature in this release: NYTProf now includes a heuristic (that’s geek for “it’ll be wrong sometimes”) to handle modules using AutoLoader. The most common of which are Storable and POSIX. You may have encountered a warning like this when running nytprofhtml:

Unable to open '/../../lib/Storable.pm' for reading: No such file or directory

It’s a symptom of a deeper problem caused by AutoSplit, the companion to AutoLoader. The details of the cause, effect, and fix aren’t worth going into now. If you’re interested you can read my summary to the mailing list.

The upshot is that NYTProf now reports times for autoloaded subs as if the sub was part of the parent module. Just what you want. Time spent in the AUTOLOAD’er sub is also reported, naturally.

There is a small chance that the heuristic will pick the wrong ‘parent’ module file for the autoloaded subroutine file. That can happen if there are other modules that use the same name for the last portion of the package name (e.g., Bar::Foo and Baz::Foo). If it ever happens to you, please let me know. Ideally with a small test case.

The list of changes can be found here (or here if you’re a detail fanatic).

One other particularly notable item is that the savesrc option wasn’t working reliably. Thanks to Andy Grundman providing a good test case, that’s now been fixed.

Enjoy!

Retreat

I usually get a cold around January. Nothing major, gone in a week or so. This year I excelled myself by succumbing to the ’flu and following it up with assorted complications. January was mostly a write-off, February was better but still a struggle (what with jet lag and unexpected surprises). Fortunately my Functional Biochemistry practitioner has pinpointed the underlying cause for the slow recovery and I’m fast returning to my usual good health.

My wife suggested I take some time-out for myself. After the rough few weeks I needed a boost, so I did…

I’m just back from a wonderful two day retreat organized by Timothy and Eva from the Kalyana Centre for Mindfulness in Co. Kerry.

The retreat was held in silence, practising Kum Nye, a Tibetan Buddhist movement practice. It was lead by Matthias Steurich — a rare opportunity to practice with him in Ireland. It was wonderful. Just what I needed.

The location was beautiful. A large house overlooking Inch Strand in County Kerry in the West of Ireland. I took this photo on my iPhone on one of my walks along the beach:

IMG_0303.JPG