NAME

App::Codit::Macro - Little applets for line to line text tasks.

SYNOPSIS

my $macro = $app->mdi->macroInit($docname, 'macroname', ['Some method', $obj]);
$macro->start;

DESCRIPTION

App::Codit::Macro creates a task that calls the callback on a line to line basis. It comes in handy for scanning and or modifying a document.

The callback receives the document textmanagers object and the line number as parameters.

The extension CoditMDI uses it for showing tabs and spaces, removing trailing spaces and fix indentation.

METHODS

busy

Returns true when the macro is running.

interval(?$cycles?)

Default value 1. It specifies the interval duration for the Daemons extension.

last(?$line?)

Default value undef. Specifies the last line to be handled. If you leave it unset the last line will be the last line of the document.

line(?$line?)

Holds the line number that will be processed in the next cycle. Default value before the call to start is 1.

start

Starts the macro.

stop

Stops the macro. It is called after the last line is processed. However, you may call it to interrupt the macro.

remain(?$flag?)

Default value false. If you set it the macro will not be removed from memory after it finishes.

LICENSE

Same as Perl.

AUTHOR

Hans Jeuken (hanje at cpan dot org)

BUGS AND CAVEATS

If you find any bugs, please contact the author.

SEE ALSO

Tk::AppWindow::BaseClasses::Callback
Tk::AppWindow::Ext::Daemons
App::Codit::Exit::CoditMDI