NAME - A graphical multi-line shell for Perl using Tk.


 This is a window-based multi-line shell for Perl using Tk. It intends to
 mimic the Smalltalk Workspace as well as the Lisp SMILE system.


Multiline Shell

 Type one or more lines of Perl code into the main window and click "Do it" to
 execute that code. If the code produces some output, this output is shown. The
 grey background color indicates output mode where no commands can be entered.
 Clicking on the "Edit" / "Output" button switches between edit and output mode.

Run Perl Code from an external editor

Key Bindings

Executes the ``Do It'' command if in edit mode.

Switches between ``Edit'' and ``Output'' mode.

Alt-[Cursor up]
One step back in the command history.

Alt-[Cursor down]
One step forward in the command history.

Show a list with all loaded files (modules).

Clears the edit window if in edit mode.

Selects the entire text.



Displays this help message.



Executes the Perl code displayed in the edit window. If this code produces some output, the display switches to output mode and shows the output.

If an error occurs the error messages gets displayed in the status line at the bottom of the window.

If the code was successfully executed but no output has been generated, the status line displays the hint 'Command executed'.


Presents some welcome message.


Watches the system clipboard for a magic command. If this magic command is present in the system clipboard, the content of the clipboard gets executed.

Useful for seamless communication with text editors.

_ws_save_history CMD

Appends the command CMD to the history array. A maximum of MAX_HISTORY entries are saved.

_ws_load_history FILE

Loads the history from FILE.


Toggles between edit and output mode.

_ws_show_mode MODE

Displays the window in the indicated mode.
mode == 0Output View
mode == 1Command View


One step back in the command history.


One step forward in the command history.

_ws_show_cmd CMD

Displays the command CMD in the edit window and set $_ws_code to CMD. (only in edit mode)


Does some cleaning work just before the application is terminated.


Show what files where loaded. (inspired by Devel::Loaded)

_ws_display_status TEXT

Displays TEXT in the status line.


Displays a help text.


rename variables to reduce the chance of conflicts
communication with text editors
 exchanging code snippets (like Lisp / SLIME)
 idea 1: via a special file for which is loooking every 200ms
 idea 2: using the system clipboard and a helper program, that siganls the
                        presence of a command to execute in the clipboard
graphical browser for the command history
Smalltalk-like source image
 A 'sub' can be checked into an image via Alt-i. An image is basically
 a Hash-of-Arrays, where the keys are the name of the subs. The array
 holds several versions of a sub.
intelligent history logging
 e.g. for a redefined sub just save the last definition


 This script requires several modules:
 C<Tk>, C<Tk::CodeText>, C<Storable>, C<Tie::IxHash>, C<Data::Dumper>


Stefan Fischerlaender stefanATfischerlaenderDOTde


Copyright (c) 2006 Stefan Fischerländer. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Modified versions must be clearly indicated.


Version 0.40 - 11 Jul 2006

CHANGES - 11 Jul 2006
first public release