Apache::Wyrd::Bot 0.93 review

Download
by rbytes.net on

Apache::Wyrd::Bot provides a class of objects which operate in the background and independent of the apache process, while being moni

License: Perl Artistic License
File size: 126K
Developer: Barry King
0 stars award from rbytes.net

Apache::Wyrd::Bot provides a class of objects which operate in the background and independent of the apache process, while being monitored in a browser window. This is useful for showing updates to a time-consuming process, such as building an index or converting a file between different formats.

Because it uses HTML http-equivalent metadata to trigger the browser reload, it should always be the outermost Wyrd on an HTML page.

Bot uses the default UNIX shell and the machine filesystem to communicate with the apache process. If another instance of the 'bot is launched, this will be detected, and the browser will continue to follow the previous instance.

Unlike other Wyrds, 'Bots have two methods of being invoked. One is via the shell, using /path/to/perl -MBOTCLASSNAME -ego. This ultimately invokes the _work method. The other is via the traditional Wyrd route, and creates the reloading page.

HTML ATTRIBUTES

basefile

(Required, absolute path) The "base" file location for the 'bot to store it's process ID, output, and error log. These will be files with this base name plus .pid, .out, and .err respectively. They must be readable and writeable by the apache process. Note that they do not need to be in a browser accessible place on the filesystem.

pidfile, errfile, outfile

Absolute pathnames for the files normally derived from basefile can be specified, if necessary.

refresh

How many seconds between browser refreshes. Default is 2.

expire

If the user does not wait for the 'bot to complete and instead closes the browser window, the previous instance will not have it's results automatically removed. This parameter defines how old the results should be before a completely new instance is invoked. The default is 30 seconds, but it shouldn't be much less than this.

perl

Absolute path to the perl executeable. Bot will attempt to determine this itself, but it is best if it is explicitly declared.

Flags

raw

Use when output is not HTML. Causes the Wyrd to use to enclose the output of the 'Bot.

reverse

Display the lines of the output file in reverse.

Requirements:
Perl

Apache::Wyrd::Bot 0.93 keywords