I must be missing something here, this one is a bit confusing.
lock is a perl built-in function, but perlfunc states that this is so only if perl is compiled with support for threads and if you 'use Threads;', and goes on to say that if thread support is not included, perl should call a user-defined subroutine with that name, but perl still seems to be calling the built-in and enforcing its prototype ($).
The solution would seem to be:
This will ensure that your subroutine is called and that perl won't complain about the number of arguments. This gets rid of the error message with regard to the numer of arguments, but either I'm missing other important details, or there's an error in perl with regard to calls to lock when threading is not compiled in.use subs qw/ lock /;
conv
Update: moving the definition of &lock above the call to it gets rid of the error, as does adding a declaration with empty prototype. I still don't understand why perl seems to be enforcing the built-in's prototype.
In reply to Re: error stating flock requires more args
by converter
in thread error stating flock requires more args
by c
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |