Tail::Tool::Plugin::Spacing - Prints spaces when there has been a pause in running.
This documentation refers to Tail::Tool::Plugin::Spacing version 0.4.8.
use Tail::Tool::Plugin::Spacing; # Brief but working code example(s) here showing the most common usage(s) # This section will be as far as many users bother reading, so make it as # educational and exemplary as possible. my $sp = Tail::Tool::Plugin::Spacing( times => [ 2, 5 ], lines => [ 2, 5 ], ); $sp->process("test\n"); # returns ("test\n"); ... # 2 seconds later $sp->process("test\n"); # returns ( "\n", "\n", "test\n" ); ... # another 5 seconds later $sp->process("test\n"); # returns ( "\n", "\n", "\n", "\n", "\n", "\n", "\n", "test\n" ); # ie 7 blank lines ( 2 lines + 5 lines )
new (%params)
Param: times - [int] - The minimum time (in seconds) for a pause to be considered to have occurred, resulting in the corresponding number of lines (in the lines argument) prepended to the found line.
times
lines
Param: lines - [int] - The number of lines to print when the corresponding period in times is reached.
Description: create a new object
process ()
Description: Prints spaces based on time between last call and this one and the settings.
summarise ()
Returns a string that summarise the current settings of the plugin instance
There are no known bugs in this module.
Please report problems to Ivan Wills (ivan.wills@gamil.com).
Patches are welcome.
Ivan Wills - (ivan.wills@gamil.com) <Author name(s)> (<contact address>)
Copyright (c) 2010 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW, Australia, 2077). All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. 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.
To install Tail::Tool, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tail::Tool
CPAN shell
perl -MCPAN -e shell install Tail::Tool
For more information on module installation, please visit the detailed CPAN module installation guide.