Skip Menu |

This queue is for tickets about the Net-GPSD CPAN distribution.

Report information
The Basics
Id: 38406
Status: resolved
Worked: 20 min
Priority: 0/
Queue: Net-GPSD

People
Owner: MRDVT [...] cpan.org
Requestors: noodles [...] earth.li
Cc:
AdminCc:

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



Subject: Caching socket over calls to ->open
Date: Mon, 11 Aug 2008 16:43:47 -0300
To: bug-Net-GPSD [...] rt.cpan.org
From: Jonathan McDowell <noodles [...] earth.li>
I've had a look at Net::GPSD for a simple project I'm working on, where I want to be able to get the current GPS position at various points. However I found that my repeated calls to $gps->get would always return the same time/point. Looking into it I saw that a new socket was opened to GPSD for each call, rather than a single socket being reused. I knocked up the attached patch to cache the socket over calls and it fixed the problem for me. J. -- I am afraid of the dark.

Message body is not shown because sender requested not to inline it.

Fixed in Net-GPSD-0.37 2009-01-18