Cobalt-LCD
view release on metacpan or search on metacpan
lib/Cobalt/LCD.pm view on Meta::CPAN
$maxdown_time += time();
while ($self->buttonstate() != 0) {
usleep $self->{_USLEEP};
if ($maxdown_time <= time()) {
$self->{_DEBOUNCE} = time() + $self->{_DEBOUNCE_TIMEOUT};
return ([$button,time()-$start_time]);
}
};
return ([$button,time()-$start_time]);
}
sub getip ($$$) {
my ($self,$line_a,$ip) = @_;
my $iip = `$self->{_PROG_GETIP} -1 \"$line_a\" -i $ip`;
foreach (split(/\./,$iip,4)) {
if (($_ < 0) || ($_ > 255)) {
$iip = ''
}
}
return $iip;
}
1;
__END__
=head1 NAME
Cobalt::LCD - Perl extension for interacting with the sys-apps/cobalt-panel-utils on Gentoo
=head1 SYNOPSIS
use Cobalt::LCD;
my $lcd = Cobalt::LCD->new();
I'm not going to go in to detail at this time as the package is still very much in testing. If you want to play, read the source.
=head1 DESCRIPTION
Cobalt::LCD is used to work in a more friendly fashion with the Gentoo sys-apps/cobalt-panel-utils package.
=head2 EXPORT
Export? Do I have to pay taxes? I thought this sucker was duty free...
No exports, works better as an object due to certain bits of state information.
=head1 SEE ALSO
Provided you have the sys-apps/cobalt-panel-utils package installed, you can `man` the heck out of those utilities:
lcd-write
lcd-swrite
lcd-yesno
lcd-setcursor
lcd-getip
lcd-flash
readbutton
iflink
iflinkstatus
Also, checkout http://gentoo.404ster.com/ as that's where my projects are tracked.
=head1 AUTHOR
Jeff Walter <lt>jeffw@404ster.com<gt>
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2005 by Jeff Walter
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.4 or,
at your option, any later version of Perl 5 you may have available.
=cut
( run in 0.783 second using v1.01-cache-2.11-cpan-d8267643d1d )