AnyEvent-I3
view release on metacpan or search on metacpan
* Implement GET_MARKS request
* The synopsis mentioned ->workspaces, but itâs ->get_workspaces
0.07 2010-11-21
* Implement GET_TREE request
0.06 2010-06-16
* Add check to Makefile to abort in a Windows environment (neither i3 nor
unix sockets available)
0.05 2010-06-09
* use getpwuid() to resolve ~ in socket paths instead of glob()
0.04 2010-03-27
* use new default ipc-socket path, glob() path, bump version
0.03 2010-03-26
Makefile.PL view on Meta::CPAN
use strict;
use warnings;
use 5.006;
use ExtUtils::MakeMaker;
if ( $^O eq 'MSWin32' ) {
die "AnyEvent::I3 cannot be used on win32 (unix sockets are missing)";
}
my %meta = (
name => 'AnyEvent-I3',
author => 'Michael Stapelberg, C<< <michael at i3wm.org> >>',
license => ['perl'],
'meta-spec' => { version => 2 },
resources => {
repository => {
url => 'git://github.com/i3/i3',
lib/AnyEvent/I3.pm view on Meta::CPAN
if ($i3->connect->recv) {
say "Connected to i3";
}
=cut
sub connect {
my ($self) = @_;
my $cv = AnyEvent->condvar;
tcp_connect "unix/", $self->{path}, sub {
my ($fh) = @_;
return $cv->send(0) unless $fh;
$self->{ipchdl} = AnyEvent::Handle->new(
fh => $fh,
on_read => sub { my ($hdl) = @_; $self->_data_available($hdl) },
on_error => sub {
my ($hdl, $fatal, $msg) = @_;
delete $self->{ipchdl};
( run in 1.851 second using v1.01-cache-2.11-cpan-39bf76dae61 )