Linux::Apple::Laptop::LED - Turn the front LED on Apple laptops on and off via ADB


NAME

Linux::Apple::Laptop::LED - Turn the front LED on Apple laptops on and off via ADB


SYNOPSIS

    use IO::Handle ();
    use Time::HiRes qw(usleep);
    use Linux::Apple::Laptop::LED qw(ON OFF);
    open my $fh, ">", "/dev/adb" or die $!;
    $fh->autoflush(1);
    my $nap = 100_000; # 0.1 seconds
    for (1 .. 10) {
        syswrite($fh => ON);
        usleep($nap / 2);
        syswrite($fh => OFF);
        usleep($nap / 2);
    }


DESCRIPTION

Provides an interface for turning the front LED on Apple laptops running Linux on and off. The user needs to open /dev/adb and print either ON or OFF to it to turn the led on and off, respectively.


EXPORTS

Can optionally export two constant subroutines, ON ond OFF, which return a string to be written to /dev/adb.


AUTHOR

Ævar Arnfjörð Bjarmason <avar@cpan.org>


LICENSE

Copyright 2007 Ævar Arnfjörð Bjarmason.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.