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.