Wily version 0.01
=================


This module provides an interface to the Wily text editor. For
information about the Wily text editor see:

http://www.cs.yorku.ca/~oz/wily/

A very low level interface is provided in Wily::Message and Wily::Connect,
equivalent to the msg.h interface that comes with wily. A higher level
wrapper around those in the form of Wily::RPC is also provided, and is
equivalent to the rpc.h interface that comes with wily.

Finally, in Wily.pm an even higher level wrapper around Wily::RPC is
provided.

A quick example of using the module is implementing $EDITOR, ie. a program
that opens the file specified on the command line in wily and waits for the
user to close that wily window before exiting:

#!/usr/bin/perl 
use warnings;
use strict;
use Cwd 'abs_path';

use Wily;
use Wily::Message;

die "Usage: $0 filename\n" unless @ARGV;

# connect to wily
my $wily = Wily->new();

# open the file in a window and activate the dirty indicator and backups
my $win = $wily->win(abs_path($ARGV[0]), 1);

# set a callback to exit if we the window is destroyed
$win->set_callback(Wily::Message::WEdestroy, sub {exit(0)});

# register to receive notification if the window is destroyed
$win->attach(Wily::Message::WEdestroy);

# loop waiting for a destroy notification (or for wily to drop out connection)
$wily->event_loop();

INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install

DEPENDENCIES

This module requires these other modules and libraries:

  Requires perl 5.8 or above and the Encode module (which
  comes with such versions of perl).

COPYRIGHT AND LICENCE

Copyright (C) 2004 by Sam Holden

This module is free software; you can redistribute it and/or modify it
under the terms of either:

a) the GNU General Public License as published by the Free Software
Foundation; either version 1, or (at your option) any later version,

or

b) the "Artistic License" which comes with this module.

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.  See either
the GNU General Public License or the Artistic License for more details.

You should have received a copy of the Artistic License with this
module, in the file ARTISTIC.  If not, I'll be glad to provide one.

You should also have received a copy of the GNU General Public License
along with this program in the file named "Copying". If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307, USA or visit their web page on the internet at
http://www.gnu.org/copyleft/gpl.html.