Menu

#8 notify_exec_X command execution is not platform independent

open
nobody
None
5
2003-07-16
2003-07-16
Anonymous
No

In penemo.pm, subroutine exec(), the following lines:

if (-f "$dir_exec/$func") {
print `echo "@msg" | /$dir_exec/$func`;
}

depend on a properly working version of 'echo'. This is
likely on *NIX systems, however, a higher degree of
portability to Win32 can easily be achieved in this case,
as follows:

if (-f "$dir_exec/$func")
{
open(EXEC, "| $dir_exec/$func")
or die "Can't spawn $dir_exec/$func : $!\n";
print EXEC @msg;
close EXEC;
}

Note, however, that this does not appear to work
correctly if you specify something like a PERL script,
even if the '.pl' extension is registered. The Win32 user
would have to call a batch file or an executable.
However, with these changes, it *will* work in those
cases.

Thanks,
dpmott@sep.com

Discussion


Log in to post a comment.