I'm thinking of dropping the below in to the Devel:: namespace; feedback
(on that and on anything in the modules themselves).

The POD:

    http://slaysys.com:81/src/Devel-TraceCalls.txt
    http://slaysys.com:81/src/Devel-TraceSAX.txt

The code:

    http://slaysys.com:81/src/Devel-TraceCalls-0.001.tar.gz
    http://slaysys.com:81/src/Devel-TraceSAX-0.001.tar.gz

P.S. The sneak preview of TraceCalls:

NAME
    Devel::TraceCalls - Track calls to subs, classes and object instances

SYNOPSIS
      ## From the command line
        perl -d:TraceCalls=Subs,foo,bar script.pl

      ## Quick & dirty via use
        use Devel::TraceCalls { Package => "Foo" };

      ## Procedural
        use Devel::TraceCalls;

        trace_calls qw( foo bar Foo::bar ); ## Explicitly named subs

        trace_calls {
             Subs => [qw( foo bar Foo::bar )],
            ...options...
        };

        trace_calls {
            Package => "Foo",        ## All subs in this package
            ...options...
        };

        trace_calls {         ## Just these subs
            Package => "Foo",        ## Optional
            Subs    => qw( foo, bar ),
            ...options...
        };

        trace_calls $object;  ## Just track this instance

        trace_calls {
            Objects => [ $obj1, $obj2 ];  ## Just track these instances
            ...options...
        };

        ... time passes, sub calls happen ...

        my @calls = $t1->calls;  ## retrieve what happned

      ## Object orented
        my $t = Devel::TraceCalls->new( ...parameters... );

        undef $t;  ## disable tracing

DESCRIPTION
    ALPHA CODE ALERT. This module may change before "official" release".

    Devel::TraceCalls allows subroutine calls to be tracked on a
    per-subroutine, per-package, per-class, or per object instance basis.
    This can be quite useful when trying to figure out how some poor thing
    is being misused in a program you don't fully understand.

    The default action is to log the calls to STDERR. Passing in any of the
    Calls, PreCall, or PostCall options disables this default behavior (and
    passing in an TraceOutput option reenables it).

    Devel::TraceCalls works on subroutines and classes by installing wrapper
    subroutines and on objects by temporarily reblessing the objects in to
    specialized subclasses with "shim" methods. Such objects are reblessed
    back when the tracker is DESTROYed.

Reply via email to