Astonishingly enough, I have a module which needs to distinguish between sysread() and read() for a tied filehandle. This arises because the semantics for sysread() (block until a packet of data arrives on a socket) and read() (block until the desired length of data arrives) are slightly different, which complicates life immeasurably for those expecting the wrong behavior.
To make a long story short, printing a stack trace from the READ() method in the tied filehandle class does not allow one to tell whether the programmer did read(FOO...) or sysread(FOO...). I also can't use any hackish solutions like inserting a wrapper for sysread() in the programmer's namespace...this has to be a respectable module. Are there any clever solutions to this problem, or should I just request that a SYSREAD() method be added for tied filehandles in Perl 5.10?