in reply to detecting changes in a localised variable

Try this:
perl -MO=Lint,dollar-underscore script.pl
Boris

Replies are listed 'Best First'.
Re^2: detecting changes in a localised variable
by thor (Priest) on Feb 19, 2005 at 00:15 UTC
    One caveat that I saw in the perldoc for B::Lint:
    This module doesn't work correctly on thread-enabled perls.

    thor

    Feel the white light, the light within
    Be your own disciple, fan the sparks of will
    For all of us waiting, your kingdom will come

Re^2: detecting changes in a localised variable
by Tanktalus (Canon) on Feb 19, 2005 at 00:24 UTC

    I looked at all the B::Lint documentation which O uses... and they look interesting and useful, just not for this. The dollar-underscore option doesn't handle writes to $_, while the implicit-write will complain about all writes to $_ - which, given that I want to write to $_ (without affecting the caller), will give me many false positives. Thanks, though - it's still quite interesting and informative.