"Tom Phoenix" <[EMAIL PROTECTED]> writes:

> On Jan 24, 2008 12:34 PM,  <[EMAIL PROTECTED]> wrote:
>
>> Can anyone provide a real example of using File::Monitor?
>
> Aren't the examples in the docs and the t/ directory "real" enough for
> you? There's even a file in the examples/ directory; it looks pretty
> real to me. Does it work for you?
>
>     http://search.cpan.org/src/ANDYA/File-Monitor-0.10/examples/monitor.pl

Well there is a hard and very public lesson learned.  I guess I'm
ashamed to say I never thought to look in there.  I installed with cpan
and unless I have trouble installing something I never do go into the
build.. 

Yeah, that looks like exactly the example I was after.  And yes it
works.

> How do you know that the file was altered "during the sleep"? For
> example, it could be that you tried to change a file, but your change
> was still in an output buffer, and not yet flushed to disk, when the
> second scan occurred.

There is something else I guess I hadn't thought of.  
I just did `echo something >> test' repeatedly during the sleep.

But I think Jays' observation on that is the problem:

Jay wrote:
> Without the recurse option, this just watches the directory, not the
> files in it. So unless you're adding or deleting files...

> Did the module pass all tests before you installed it?

I don't know that either.  I didn't see any errors

> Hope this helps!

Somewhat embarrassing but yes it has.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to