The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

progress-any-eg-progressbar-06-reusing-task - Reusing the same task to track progress of two activities

VERSION

This document describes version 0.005 of progress-any-eg-progressbar-06-reusing-task (from Perl distribution Progress-Any-Examples), released on 2020-07-09.

SYNOPSIS

% progress-any-eg-progressbar-06-reusing-task [file_size1=10000] [file_size2=30000]

DESCRIPTION

This example script shows the progress of simulated downloading of two files (the file sizes can be set via argument). The progress of each download will be tracked with the same task: download.

After the downloading of the first file is complete, we perform a reset() (a.k.a. update(pos => 0)) to the task to change its state from finished to started again.

Also notice the use of force_update argument in the update() to refresh the progress bar with a "Downloaded xxx" message.

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Progress-Any-Examples.

SOURCE

Source repository is at https://github.com/perlancar/perl-Progress-Any-Examples.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Progress-Any-Examples

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2020 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.