in reply to CORE::GLOBAL::* for auditing which files are read and written?

I know of no Perl solution, but in general you can (ab)use strace on most Unix systems, DTrace on Solaris, FreeBSD and MacOS X and FileMon on Windows.

There's a DTrace patch for perl floating around somewhere (you'll find a link to it in the p5p archives) that enables dtracing perl code (and not just the perl interpreter), I don't know if that's needed for the dtrace approach.

  • Comment on Re: CORE::GLOBAL::* for auditing which files are read and written?

Replies are listed 'Best First'.
Re^2: CORE::GLOBAL::* for auditing which files are read and written?
by Fletch (Bishop) on Nov 06, 2008 at 20:14 UTC

    Shouldn't; I believe that was for letting dtrace see into what perl is doing (so you'd be able to monitor sub entry/exit and what not at the perl level similar to how you can watch system calls at the kernel level). This snippet from a dtrace FAQ might even be enough:

    dtrace -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(ar +g0)); }'

    I think last I looked there were some good dtrace intros at opensolaris.org if you want to extend or tweak that to show different stuff.

    Update: And as to the original question Devel::Trace might also be of use (although for serious programs it'd be a boatload of output).

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.