Mon May 23 04:10:06 2011: Request 68388 was acted upon. Transaction: Correspondence added by CJM Queue: Win32-IPC Subject: problem with process.pm and changenotify.pm Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: msl20...@btinternet.com Status: new Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=68388 >
Both Win32::ChangeNotify and Win32::Process export the constant INFINITE by default. Constants in Perl are implemented as subroutines that return a constant value, which is why you get a warning about "subroutine main::INFINITE redefined". The prototype warning arises because Win32::ChangeNotify creates constants with an empty prototype, and Win32::Process creates constants with no prototype. Since both modules get the value of INFINITE from the Windows headers, it doesn't really matter which one you use. You just have to pick one. To avoid the warnings, use an import list with at least one of the modules to import only the subroutines you need. Without seeing your code, I can't tell what subs you're using, but many programs using Win32::ChangeNotify don't actually use any of the constants it exports. So it might look like this: use Win32::Process; use Win32::ChangeNotify (); The empty parens after Win32::ChangeNotify tell it not to export anything.