AlignDB-Stopwatch
view release on metacpan or search on metacpan
lib/AlignDB/Stopwatch.pm view on Meta::CPAN
# record config
$stopwatch->record_conf($opt);
$stopwatch->start_message("Doing really bad things...");
$stopwatch->end_message;
=head1 ATTRIBUTES
=head2 program_name
program name
=head2 program_argv
program command line options
=head2 program_conf
program configurations
=head2 start_time
start time
=head2 div_char
Divider char used in output messages, default is [=]
=head2 div_length
Length of divider char, default is [30]
=head2 min_div_length
minimal single-side divider length, default is [5]
=head2 uuid
Use Data::UUID to generate a UUID that prevent inserting meta info more than
one time on multithreads mode
=head1 METHODS
=head2 record
Record $main::0 to program_name and [@main::ARGV] to program_argv.
Getopt::Long would manipulate @ARGV.
my $stopwatch = AlignDB::Stopwatch->new->record;
=head2 record_conf
Record a hashref or object to program_conf.
$stopwatch->record_conf( $opt );
=head2 block_message
Print a blocked message
$stopwatch->block_message( $message, $with_duration );
=head2 start_message
Print a starting message
$stopwatch->start_message( $message, $embed_in_divider );
=head2 end_message
Print a ending message
$stopwatch->end_message( $message );
=head1 AUTHOR
Qiang Wang <wang-q@outlook.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2008- by Qiang Wang.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
( run in 2.981 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )