OGATA Tetsuji > AnyEvent-Mac-Pasteboard-0.01 > AnyEvent::Mac::Pasteboard

Download:
AnyEvent-Mac-Pasteboard-0.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source   Latest Release: AnyEvent-Mac-Pasteboard-0.03

NAME ^

AnyEvent::Mac::Pasteboard - observation and hook pasteboard changing.

SYNOPSIS ^

  use AnyEvent;
  use AnyEvent::Mac::Pasteboard;
  
  my $cv = AnyEvent->condvar;
  
  my $pb_watcher = AnyEvent::Mac::Pasteboard->new(
    interval => [1, 1, 2, 3, 5], # see following key specify description.
    on_change => sub {
      my $pb_content = shift;
      print "change pasteboard content: $pb_content\n";
    },
    on_unchange => sub {
      # ...some code...
    },
    on_error => sub {
       my $error = shift;
       print "Error occured.";
       die $error;
    },
  );
  
  $cv->recv;

DESCRIPTION ^

This module is observation and hook Mac OS X pasteboard changing.

METHODS ^

AnyEvent::Mac::Pasteboard->new( ... )

 my $pb_watcher = AnyEvent::Mac::Pasteboard->new( ... );

This object runs at recv'ing AnyEvent->condver.

new gives key value pairs as argument.

SEE ALSO ^

Mac::Pasteboard,

man 1 pbpaste

AUTHOR ^

OGATA Tetsuji, <ogata {at} gmail.com>

COPYRIGHT AND LICENSE ^

Copyright (C) 2013 by OGATA Tetsuji

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

syntax highlighting: