in reply to Shared variables between threads
From a quick look at the Net::Pcap source, the return value of open_live() isn't a 'object', at least not in the Perlish sense of a blessed reference. It is the value returned from a direct call to the pcap c-library function:
pcap_t * pcap_open_live(device, snaplen, promisc, to_ms, err) ... RETVAL = pcap_open_live(device, snaplen, promisc, to_ms, errbuf);
That looks like a c struct address to me. If that is the case, and that is what is ending up back in your Perl program, it ought to look like an unsigned integer to Perl. And if that were true, it is hard to see why Perl wouldn't let you assign it to a shared scalar.
Would you try assigning it to a non-shared variable, printing it and post the output here?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Shared variables between threads
by Saladino (Beadle) on Nov 05, 2007 at 09:40 UTC | |
by BrowserUk (Patriarch) on Nov 05, 2007 at 09:52 UTC | |
by Saladino (Beadle) on Nov 05, 2007 at 10:36 UTC | |
by BrowserUk (Patriarch) on Nov 05, 2007 at 11:00 UTC | |
by Saladino (Beadle) on Nov 05, 2007 at 11:19 UTC | |
|