The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Event::ScreenSaver - Provides the ability to hook functions to the starting and stopping of the screen saver (Linux only at the moment)

VERSION

This documentation refers to Event::ScreenSaver version 0.0.6.

SYNOPSIS

   use Event::ScreenSaver;

   # create the screen saver object
   my $ss = Event::ScreenSaver->new();

   # add functions to events
   $ss->start( sub {print "The screen saver started\n" } );
   $ss->stop( sub { print "The screen saver stopped\n" } );

   # run the event handler
   $ss->run();

   # or more simply
   Event::ScreenSaver->new(
       start => sub {say "Screen saver started"},
       stop  => sub {say "Screen saver stopped"},
   )->run;

DESCRIPTION

This module will try to load the most appropriate class for monitoring the starting and stopping of the screen saver. Currently that means the Unix module os it probably wont work that broadly.

Extending

The recommended method of implementing this for other operating systems is to extend Event::ScreenSaver::Unix and over write the run method with an OS specific version.

SUBROUTINES/METHODS

run ()

Starts the event loop monitoring the screen saver.

Note that this will never return you will need to implement some other exit strategy (like Ctrl-C).

start ( [$sub] )

Gets/Sets the start handler code.

stop ( [$sub] )

Gets/Sets the stop handler code.

DIAGNOSTICS

CONFIGURATION AND ENVIRONMENT

DEPENDENCIES

INCOMPATIBILITIES

BUGS AND LIMITATIONS

This module is currently only tested on a Ubuntu Linux system it will probably work on other Desktop Linuxes and may work on other Unix systems but will probably not work on other operating systems.

See Event::ScreenSaver for its bugs and limitations.

Please report problems to Ivan Wills (ivan.wills@gmail.com).

Patches are welcome (Particularly for other operating systems).

Code can be found at http://github.com/ivanwills/Event-ScreenSaver/tree/master

AUTHOR

Ivan Wills - (ivan.wills@gmail.com)

LICENSE AND COPYRIGHT

Copyright (c) 2009 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.