Skip Menu |

This queue is for tickets about the AlarmCall CPAN distribution.

Report information
The Basics
Id: 21902
Status: new
Priority: 0/
Queue: AlarmCall

People
Owner: Nobody in particular
Requestors: mjhweb-cpan-bugs [...] liminaflux.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.1
Fixed in: (no value)



Subject: Sys::AlarmCall 1.1 - bug for member functions
Sys::AlarmCall seemed to be exactly what I needed, but I ran into the following problem: Trying to use alarm_call() with the object method form fails. alarm_call( 100, '->func', $obj); Throws "Can't call method "func" without a package or object reference". Removing the unshift from } elsif ($sub =~ m/^->/) { unshift(@_,$sub); $sub = 'shift(@_)' . $sub . '(@_);'; } ... solves the problem. Looking at the code, I couldn't work out why the unshift was there in this case as the function is explicitly built into the eval string so passing it in again as an argument results in the above behaviour. The eval line becomes "->func->func()".