NAME
Device::Leap - Perl interface to the Leap Motion Controller
SYNOPSIS
use Device::Leap;
while(1) {
$d=&Leap();
next unless(ref $d); # no new data
print $d->{hands}->[0]->{sphereRadius} . "\n"; # print some
}
DESCRIPTION
This module provides an interface to query a Leap Motion controller. The controller exposes rapid and accurate hand motion data over a localhost websocket. This script uses native non-blocking sockets to return that data, thus should be compatible on Windows, Mac, and Linux machines without needing compilers or related SDK overhead.
The Leap Motion controller senses your individual hand and finger movements so you can interact directly with your computer.
EXPORT
Leap # one sub which returns you your data
DEPENDENCIES
This module requires these other modules and libraries:
Socket (already part of perl itself)
JSON
SEE ALSO
See the Leap Motion web site: https://leapmotion.com/ for links to the developer forums etc.
AUTHOR
Chris Drake, <cdrake@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2013 by Chris Drake
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.
BUGS
This code impliments WebSockets inline, because existing CPAN ws modules all have heavy overhead requirments needing compilers and development build infrastruture delployed at the client. This was considered both unnecessary and overly limiting. If the Leap Motion websocket spec changes in future and breaks this module, a new CPAN release (update) will be made available.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 154:
Unknown directive: =HEAD2