<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
All,<br>
<br>
I'm new to classes in perl and I've hit a roadblock using the
File::Monitor class. From the doc for&nbsp; File::Monitor <a
 href="http://search.cpan.org/search?mode=module&amp;query=File%3A%3AMonitor">http://search.cpan.org/~andya/File-Monitor-0.10/lib/File/Monitor/Object.pm</a>:<br>
The state of the monitored file or directory at the time of the last
scan can be queried. Before scan is called these methods will all
return undef. The following methods return the value of the
corresponding field from "stat" in perlfunc.
<br>
For example:<br>
<pre class="code"><div class="codeblock"><tt class="codetext"><font
 size="-1">my $modified  = $object-&gt;mtime;
</font></tt></div></pre>
Now I've instantiated my object as per the instructions:
<pre class="code"><div class="codeblock"><tt class="codetext"><font
 size="-1">use File::Monitor;
use File::Monitor::Object;
my $wFileMonitor = File::Monitor-&gt;new();
$wFileMonitor-&gt;watch($wFile);
$wFileMonitor-&gt;scan;
my $modified  = $wFileMonitor-&gt;mtime</font></tt></div></pre>
But I get the following error:<br>
Can't locate object method "mtime" via package "File::Monitor" at
/home/workspace/watchFile.pl line 65.<br>
<br>
I know it's getting lost in the reference to mtime, but I'm at a
loss on how to access it. The doc simply refers to $object-&gt;mtime
and my read of it says that $wFileMonitor should be $object.
<br>
thanks,<br>
<br>
<div class="moz-signature">-- <br>
Daniel B. Herrington<br>
Director of Field Services<br>
Robert Mark Technologies<br>
<a class="moz-txt-link-abbreviated" href="mailto:dherrington@robertmarktechnologies.com">dherrington@robertmarktechnologies.com</a><br>
o: 651-769-2574<br>
m: 503-358-8575<br>
</div>
<br>
</body>
</html>