DESCRIPTION
Methods used to provide some feedback from Devel::CoverReport::* modules.
WARNING
Consider this module to be an early ALPHA. It does the job for me, so it's here.
This is my first CPAN module, so I expect that some things may be a bit rough around edges.
The plan is, to fix both those issues, and remove this warning in next immediate release.
API
- new
-
Constructor for
Devel::CoverReport::Feedback
.Note: setting quiet AND verbose does not have much sense... but - surprize! - will work :) In such configuration, all usual things that are printed will NOT be printed, and those that ususally are not printed - WILL.
- note
-
Print a note, unless running in 'quiet' mode.
- info
-
Print informative text, when in 'verbose' mode.
- at_file
-
Print indication, that specific file is being processed.
- file_off
-
Indicate, that file processing has finished. This means, that either this was the last file, or we are about to go to the next one.
- error_at_file
-
Report any errors, that are related to file being currently processed. Always printed.
If file path was not printed, it will be, just before the error.
- warning_at_file
-
Report any warnings, that are related to file being currently processed. Always printed.
If file path was not printed, it will be, just before the warning.
- progress_open
-
Open progress indicator.
- progress_tick
-
Indicate, that a step in the process has been made.
- progress_close
-
Close (end) progress indicator.
- enable_buffer
-
Turn ON built-in output buffering. Since this function is used, any feedback will be stored in memory. To get that feedback out, You should use
dump_buffer
.Primary use of the buffer is to hold child's output, and pass it to parent, which prints it. This way output of one child is not interrupted by other child.
There is no
disable_buffer
, since it was needed. I will add it, once there will be a need for it (see? I'm not THAT lazy ;). - dump_buffer
-
Dump serialized contents of the output buffer.
To print this data, use
pass_buffer
.After contents of the buffer are returned, the buffer itself is cleared.
Impotant: make sure, You do not pass it using a Feedback object that has buffering enabled! That would not make much sense.
- pass_buffer
-
Print serialized output buffer contents.
See notes in
dump_buffer
too. - _print
-
This is the thing, that actually prints stuff out, so It's easy to silence/inspect the feedback in tests.
It can be overwritten in child classes, so they can log to file, or what ever You would need/like.
Private. Do not use from outside of the module!
LICENCE
Copyright 2009-2011, Bartłomiej Syguła (perl@bs502.pl)
This is free software. It is licensed, and can be distributed under the same terms as Perl itself.
For more, see my website: http://bs502.pl/