| 1 |
TTYtter intro tackon: |
| 2 |
|
| 3 |
This is Term::ReadLine::TTYtter. It is a modified version of T::RL::Perl with |
| 4 |
several new nonstandard features specific to TTYtter, but may be useful for |
| 5 |
other applications. |
| 6 |
|
| 7 |
It also allows UTF-8 characters to be entered without crashing, and adds a |
| 8 |
counter so you can see how many characters you've entered (which is a big |
| 9 |
deal for Twitter and other microblogging platforms). |
| 10 |
|
| 11 |
These methods are additionally defined, which are non-standard: |
| 12 |
|
| 13 |
removereadline method: erases the current prompt from the screen |
| 14 |
redisplay method: repaints the current prompt on the screen |
| 15 |
hook_background_control method: connects the interactive readline |
| 16 |
prompt to a PID specified by $main::child. The PID is then |
| 17 |
sent signal SIGUSR1 when a character is beginning processing |
| 18 |
(i.e., the process needs to NOT write to the screen), and |
| 19 |
SIGUSR2 when done (i.e., the process can write again). |
| 20 |
hook_use_ansi: same, but connects to $main::ansi (1 = use ANSI, |
| 21 |
0 = don't). thus, unlike T:RL:Perl, T:RL:TTYtter defaults to |
| 22 |
ANSI *off*. |
| 23 |
hook_no_counter: same, but connects to $main::dont_use_counter (1 = |
| 24 |
disable counter). Useful for prompts where this is |
| 25 |
irrelevant. |
| 26 |
hook_no_tco: this is Twitter specific. See code. |
| 27 |
|
| 28 |
(The use of hooks into $main:: was so that the calling convention of |
| 29 |
&readline would not have to be disturbed to pass additional options.) |
| 30 |
|
| 31 |
Like T::RL::Perl, this is free software offered under the Perl Artistic |
| 32 |
License (see below). Because of dueling licenses, it must be distributed |
| 33 |
separately from TTYtter (which is Floodgap Free Software License), and it |
| 34 |
can be used 100% separately from TTYtter as an entirely independent driver. |
| 35 |
|
| 36 |
Changes for T::RL::TTYtter (C)2012 Cameron Kaiser and Contributors. All |
| 37 |
rights reserved. Send me your comments at [email protected] |
| 38 |
|
| 39 |
LEGALESE |
| 40 |
~~~~~~~~ |
| 41 |
Copyright (c) 1995 Ilya Zakharevich. All rights reserved. |
| 42 |
This program is free software; you can redistribute it and/or |
| 43 |
modify it under the same terms as Perl itself. |
| 44 |
|
| 45 |
You should have received a copy of the Perl license along with |
| 46 |
Perl; see the file README in Perl distribution. |
| 47 |
|
| 48 |
You should have received a copy of the GNU General Public License |
| 49 |
along with Perl; see the file Copying. If not, write to |
| 50 |
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 51 |
|
| 52 |
You should have received a copy of the Artistic License |
| 53 |
along with Perl; see the file Artistic. |
| 54 |
|
| 55 |
|
| 56 |
Author of this software makes no claim whatsoever about suitability, |
| 57 |
reliability, edability, editability or usability of this product, and |
| 58 |
should not be kept liable for any damage resulting from the use of |
| 59 |
it. If you can use it, you are in luck, if not, I should not be kept |
| 60 |
responsible. Keep a handy copy of your backup tape at hand. |
| 61 |
|
| 62 |
WHAT |
| 63 |
~~~~ |
| 64 |
|
| 65 |
This is a quick implementation of the minimal interface to Readline |
| 66 |
libraries. The implementation is made in Perl (mostly) by Jeffrey |
| 67 |
Friedl. The only thing this library does is to make it conformant (and |
| 68 |
add some minimal changes, like using Term::ReadKey if present, and |
| 69 |
correct work under xterm). |
| 70 |
|
| 71 |
(In fact this is an understatement now, a lot of additions are made, |
| 72 |
see CHANGES...) |
| 73 |
|
| 74 |
INSTALL |
| 75 |
~~~~~~~ |
| 76 |
|
| 77 |
To install this module type |
| 78 |
|
| 79 |
perl Makefile.PL |
| 80 |
make |
| 81 |
make test |
| 82 |
or (with newer makemaker) |
| 83 |
make test_dynamic |
| 84 |
(Check whether you are satisfied with the results. Try |
| 85 |
to redirect stdin and/or stdout.) |
| 86 |
make install |
| 87 |
|
| 88 |
You may need to install Term::ReadKey first if your system is new (Solaris |
| 89 |
is ;-(). (Available in standard places, checked with 1.98.) |
| 90 |
|
| 91 |
If you see something like |
| 92 |
|
| 93 |
Can't ioctl TIOCGETP: Invalid argument at ... |
| 94 |
|
| 95 |
this means you need ReadKey. |
| 96 |
|
| 97 |
Note that as of 0.95 Term/ReadLine.pm is unbundled to make CPAN.pm happier. |
| 98 |
On the other hand, if you get newer Term/ReadLine.pm (say, by installing |
| 99 |
newer Perl) you may get more features enabled. |
| 100 |
|
| 101 |
For most features of T::R::P one needs to look in the CHANGES file, and the |
| 102 |
comments at the start of of readline/readline.pm. Volunteers to make the |
| 103 |
corresponding OO interface into POD are welcome (wrappers are available in |
| 104 |
Term::ReadLine::Perl; see perl5db.pl for a sample usage of hairier features, |
| 105 |
such as accessing Readline variables and methods). |
| 106 |
|
| 107 |
AUTHOR BUGS |
| 108 |
~~~~~~~~~~~ |
| 109 |
Ilya Zakharevich |
| 110 |
[email protected] |
| 111 |
|
| 112 |
Std dstribution site: http://www.ilyaz.org/software/perl/modules |