Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to get the perl SGI::Fam module from cpan working. After correcting the Cwd::abs_path problem, I still can not get it to work properly. When a file is modified it reports 2 events "delete" and "Create" instead of a single "change" event.

What could be causing this? I haven't seen anything else on the internet suggesting that other people are having the same problem.

for testing I am using the monitor script that comes with the module.

Replies are listed 'Best First'.
Re: SGI::FAM
by grantm (Parson) on Jun 30, 2003 at 19:06 UTC
    When a file is modified it reports 2 events "delete" and "Create" instead of a single "change" event.

    What are you using to modify the file? Perhaps it really is doing a delete and a create. That strikes me as perfectly reasonable (although perhaps rename, create, delete might be safer). Maybe you could use strace or truss on the process to determine what system calls it's executing.

    Also, you could try something like the following, which I miagine should generate a change event:

    echo "hello world" >> target_file
Re: SGI::FAM
by Skeeve (Parson) on Jul 01, 2003 at 06:35 UTC
    I have absolutely no idea about SGI::FAM but this looks to me as if a file is moved from one filesystem to another. This should result in creation of a new and deletion of the old file.