Progress-Any-Output-TermProgressBarColor-0.246/ 0000755 0001750 0001750 00000000000 13517624332 017070 5 ustar s1 s1 Progress-Any-Output-TermProgressBarColor-0.246/MANIFEST 0000644 0001750 0001750 00000000460 13517624332 020221 0 ustar s1 s1 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012.
Changes
LICENSE
MANIFEST
META.json
META.yml
Makefile.PL
README
dist.ini
lib/Progress/Any/Output/TermProgressBarColor.pm
t/00-compile.t
t/01-basic.t
t/author-critic.t
t/author-pod-coverage.t
t/author-pod-syntax.t
weaver.ini
Progress-Any-Output-TermProgressBarColor-0.246/weaver.ini 0000644 0001750 0001750 00000000025 13517624332 021057 0 ustar s1 s1 [@Author::PERLANCAR]
Progress-Any-Output-TermProgressBarColor-0.246/README 0000644 0001750 0001750 00000014173 13517624332 017756 0 ustar s1 s1 NAME
Progress::Any::Output::TermProgressBarColor - Output progress to
terminal as color bar
VERSION
This document describes version 0.246 of
Progress::Any::Output::TermProgressBarColor (from Perl distribution
Progress-Any-Output-TermProgressBarColor), released on 2019-07-30.
SYNOPSIS
use Progress::Any::Output;
# use default options
Progress::Any::Output->set('TermProgressBarColor');
# set options
Progress::Any::Output->set('TermProgressBarColor',
width=>50, fh=>\*STDERR, show_delay=>5);
DESCRIPTION
THIS IS AN EARLY RELEASE, SOME THINGS ARE NOT YET IMPLEMENTED E.G.
STYLES, COLOR THEMES.
Sample screenshots:
This output displays progress indicators as colored progress bar on
terminal. It produces output similar to that produced by
Term::ProgressBar, except that it uses the Progress::Any framework and
has additional features:
* colors and color themes
* template and styles
* displaying message text in addition to bar/percentage number
* wide character support
XXX option to cleanup when complete or not (like in Term::ProgressBar)
and should default to 1.
METHODS
new(%args) => OBJ
Instantiate. Usually called through
"Progress::Any::Output->set("TermProgressBarColor", %args)".
Known arguments:
* freq => num
Limit the frequency of output updating. 0 means no frequency
limiting (update output after every "update()").
A positive number means to update output when there has been that
amount of difference in position since last "update()". For example,
if "freq" is 10 and the last "update()" was at position 5, then the
next output update will be when position is at least 15.
A negative number means to update output when time has passed that
amount of absolute value (in seconds). For example, if "freq" is -3
and the last "update()" was 1 second ago, then the next output
update will not be until the next two seconds has passed.
By default undef, in which case Progress::Any will use the default
-0.5 (at most once every 0.5 seconds).
* wide => bool
If set to 1, enable wide character support (requires
Text::ANSI::WideUtil.
* width => INT
Width of progress bar. The default is to detect terminal width and
use the whole width.
* color_theme => STR
Not yet implemented.
Choose color theme. To see what color themes are available, use
"list_color_themes()".
* style => STR
Not yet implemented.
Choose style. To see what styles are available, use "list_styles()".
Styles determine the characters used for drawing the bar, alignment,
etc.
* template => str
See fill_template in Progress::Any's documentation. Aside from
conversions supported by Progress::Any, this output recognizes these
additional conversions: %b to display the progress bar (with width
using the rest of the available width), %B to display the progress
bar as well as the message inside it. You can also enclose parts of
text with "" ... "" to give color.
The default template is:
%p [%B]%e
* fh => handle (default: \*STDERR)
Instead of the default STDERR, you can direct the output to another
filehandle e.g. STDOUT.
* show_delay => int
If set, will delay showing the progress bar until the specified
number of seconds. This can be used to create, e.g. a CLI
application that is relatively not chatty but will display progress
after several seconds of seeming inactivity to indicate users that
the process is still going on.
keep_delay_showing()
Can be called to reset the timer that counts down to show progress bar
when "show_delay" is defined. For example, if "show_delay" is 5 seconds
and two seconds have passed, it should've been 3 seconds before progress
bar is shown in the next "update()". However, if you call this method,
it will be 5 seconds again before showing.
FAQ
How to update progress bar output more often?
Set "freq" to e.g. -0.1 or -0.05. The default "freq", when unset, is
-0.5 which means to update output at most once every 0.5 second.
ENVIRONMENT
NO_COLOR
Bool. Can be used to disable color. Consulted before NO_COLOR. See
Color::ANSI::Util.
COLOR
Bool. Can be used to force or disable color. See Color::ANSI::Util.
COLOR_DEPTH
Integer. Can be used to override color depth detection. See
Color::ANSI::Util.
COLUMNS
Integer. Can be used to override terminal width detection.
PROGRESS_TERM_BAR
Bool. Forces disabling or enabling progress output (just for this
output).
In the absence of PROGRESS_TERM_MESSAGE and PROGRESS, will default to 1
if filehandle is detected as interactive (using "-t").
PROGRESS
Bool. Forces disabling or enabling progress output (for all outputs).
HOMEPAGE
Please visit the project's homepage at
.
SOURCE
Source repository is at
.
BUGS
Please report any bugs or feature requests on the bugtracker website
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.
SEE ALSO
Progress::Any
Term::ProgressBar
Ruby library: ruby-progressbar,
AUTHOR
perlancar
COPYRIGHT AND LICENSE
This software is copyright (c) 2019, 2018, 2017, 2016, 2015, 2014, 2013
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.
Progress-Any-Output-TermProgressBarColor-0.246/META.json 0000644 0001750 0001750 00000052130 13517624332 020512 0 ustar s1 s1 {
"abstract" : "Output progress to terminal as color bar",
"author" : [
"perlancar "
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : 2
},
"name" : "Progress-Any-Output-TermProgressBarColor",
"prereqs" : {
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
}
},
"develop" : {
"requires" : {
"Pod::Coverage::TrustPod" : "0",
"Test::Perl::Critic" : "0",
"Test::Pod" : "1.41",
"Test::Pod::Coverage" : "1.08"
}
},
"runtime" : {
"recommends" : {
"Term::Size" : "0"
},
"requires" : {
"Color::ANSI::Util" : "0.161",
"Monkey::Patch::Action" : "0.060",
"Progress::Any" : "0.214",
"String::Elide::Parts" : "0.07",
"Text::ANSI::Util" : "0.22",
"perl" : "5.010001",
"strict" : "0",
"warnings" : "0"
},
"suggests" : {
"Text::ANSI::WideUtil" : "0"
}
},
"test" : {
"requires" : {
"Capture::Tiny" : "0",
"File::Spec" : "0",
"IO::Handle" : "0",
"IPC::Open3" : "0",
"Progress::Any::Output" : "0",
"Test::More" : "0.98"
}
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=Progress-Any-Output-TermProgressBarColor"
},
"homepage" : "https://metacpan.org/release/Progress-Any-Output-TermProgressBarColor",
"repository" : {
"type" : "git",
"url" : "git://github.com/perlancar/perl-Progress-Any-Output-TermProgressBarColor.git",
"web" : "https://github.com/perlancar/perl-Progress-Any-Output-TermProgressBarColor"
}
},
"version" : "0.246",
"x_Dist_Zilla" : {
"perl" : {
"version" : "5.028002"
},
"plugins" : [
{
"class" : "Dist::Zilla::Plugin::GatherDir",
"config" : {
"Dist::Zilla::Plugin::GatherDir" : {
"exclude_filename" : [],
"exclude_match" : [],
"follow_symlinks" : 0,
"include_dotfiles" : 0,
"prefix" : "",
"prune_directory" : [],
"root" : "."
}
},
"name" : "@Author::PERLANCAR/@Filter/GatherDir",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@Author::PERLANCAR/@Filter/PruneCruft",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@Author::PERLANCAR/@Filter/ManifestSkip",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@Author::PERLANCAR/@Filter/MetaYAML",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@Author::PERLANCAR/@Filter/License",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::PodCoverageTests",
"name" : "@Author::PERLANCAR/@Filter/PodCoverageTests",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@Author::PERLANCAR/@Filter/PodSyntaxTests",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::ExtraTests",
"name" : "@Author::PERLANCAR/@Filter/ExtraTests",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@Author::PERLANCAR/@Filter/ExecDir",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@Author::PERLANCAR/@Filter/ShareDir",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"config" : {
"Dist::Zilla::Role::TestRunner" : {
"default_jobs" : 1
}
},
"name" : "@Author::PERLANCAR/@Filter/MakeMaker",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@Author::PERLANCAR/@Filter/Manifest",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@Author::PERLANCAR/@Filter/ConfirmRelease",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@Author::PERLANCAR/ExecDir script",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::PERLANCAR::BeforeBuild",
"name" : "@Author::PERLANCAR/PERLANCAR::BeforeBuild",
"version" : "0.597"
},
{
"class" : "Dist::Zilla::Plugin::Rinci::AbstractFromMeta",
"name" : "@Author::PERLANCAR/Rinci::AbstractFromMeta",
"version" : "0.10"
},
{
"class" : "Dist::Zilla::Plugin::PodnameFromFilename",
"name" : "@Author::PERLANCAR/PodnameFromFilename",
"version" : "0.02"
},
{
"class" : "Dist::Zilla::Plugin::PERLANCAR::EnsurePrereqToSpec",
"name" : "@Author::PERLANCAR/PERLANCAR::EnsurePrereqToSpec",
"version" : "0.060"
},
{
"class" : "Dist::Zilla::Plugin::PERLANCAR::MetaResources",
"name" : "@Author::PERLANCAR/PERLANCAR::MetaResources",
"version" : "0.040"
},
{
"class" : "Dist::Zilla::Plugin::CheckChangeLog",
"name" : "@Author::PERLANCAR/CheckChangeLog",
"version" : "0.05"
},
{
"class" : "Dist::Zilla::Plugin::CheckMetaResources",
"name" : "@Author::PERLANCAR/CheckMetaResources",
"version" : "0.001"
},
{
"class" : "Dist::Zilla::Plugin::CheckSelfDependency",
"config" : {
"Dist::Zilla::Plugin::CheckSelfDependency" : {
"finder" : [
":InstallModules"
]
},
"Dist::Zilla::Role::ModuleMetadata" : {
"Module::Metadata" : "1.000033",
"version" : "0.006"
}
},
"name" : "@Author::PERLANCAR/CheckSelfDependency",
"version" : "0.011"
},
{
"class" : "Dist::Zilla::Plugin::CopyrightYearFromGit",
"name" : "@Author::PERLANCAR/CopyrightYearFromGit",
"version" : "0.003"
},
{
"class" : "Dist::Zilla::Plugin::IfBuilt",
"name" : "@Author::PERLANCAR/IfBuilt",
"version" : "0.02"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@Author::PERLANCAR/MetaJSON",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@Author::PERLANCAR/MetaConfig",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::Authority",
"name" : "@Author::PERLANCAR/Authority",
"version" : "1.009"
},
{
"class" : "Dist::Zilla::Plugin::OurDate",
"name" : "@Author::PERLANCAR/OurDate",
"version" : "0.03"
},
{
"class" : "Dist::Zilla::Plugin::OurDist",
"name" : "@Author::PERLANCAR/OurDist",
"version" : "0.02"
},
{
"class" : "Dist::Zilla::Plugin::OurPkgVersion",
"name" : "@Author::PERLANCAR/OurPkgVersion",
"version" : "0.15"
},
{
"class" : "Dist::Zilla::Plugin::PodWeaver",
"config" : {
"Dist::Zilla::Plugin::PodWeaver" : {
"finder" : [
":InstallModules",
":ExecFiles"
],
"plugins" : [
{
"class" : "Pod::Weaver::Plugin::EnsurePod5",
"name" : "@CorePrep/EnsurePod5",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Plugin::H1Nester",
"name" : "@CorePrep/H1Nester",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Name",
"name" : "@Author::PERLANCAR/Name",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Version",
"name" : "@Author::PERLANCAR/Version",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@Author::PERLANCAR/prelude",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "SYNOPSIS",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "DESCRIPTION",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "OVERVIEW",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "ATTRIBUTES",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "METHODS",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "FUNCTIONS",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Leftovers",
"name" : "@Author::PERLANCAR/Leftovers",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@Author::PERLANCAR/postlude",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Completion::GetoptLongComplete",
"name" : "@Author::PERLANCAR/Completion::GetoptLongComplete",
"version" : "0.08"
},
{
"class" : "Pod::Weaver::Section::Completion::GetoptLongSubcommand",
"name" : "@Author::PERLANCAR/Completion::GetoptLongSubcommand",
"version" : "0.04"
},
{
"class" : "Pod::Weaver::Section::Completion::GetoptLongMore",
"name" : "@Author::PERLANCAR/Completion::GetoptLongMore",
"version" : "0.001"
},
{
"class" : "Pod::Weaver::Section::Homepage::DefaultCPAN",
"name" : "@Author::PERLANCAR/Homepage::DefaultCPAN",
"version" : "0.05"
},
{
"class" : "Pod::Weaver::Section::Source::DefaultGitHub",
"name" : "@Author::PERLANCAR/Source::DefaultGitHub",
"version" : "0.07"
},
{
"class" : "Pod::Weaver::Section::Bugs::DefaultRT",
"name" : "@Author::PERLANCAR/Bugs::DefaultRT",
"version" : "0.06"
},
{
"class" : "Pod::Weaver::Section::Authors",
"name" : "@Author::PERLANCAR/Authors",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Legal",
"name" : "@Author::PERLANCAR/Legal",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Plugin::Rinci",
"name" : "@Author::PERLANCAR/Rinci",
"version" : "0.780"
},
{
"class" : "Pod::Weaver::Plugin::AppendPrepend",
"name" : "@Author::PERLANCAR/AppendPrepend",
"version" : "0.01"
},
{
"class" : "Pod::Weaver::Plugin::EnsureUniqueSections",
"name" : "@Author::PERLANCAR/EnsureUniqueSections",
"version" : "0.163250"
},
{
"class" : "Pod::Weaver::Plugin::SingleEncoding",
"name" : "@Author::PERLANCAR/SingleEncoding",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Plugin::PERLANCAR::SortSections",
"name" : "@Author::PERLANCAR/PERLANCAR::SortSections",
"version" : "0.06"
}
]
}
},
"name" : "@Author::PERLANCAR/PodWeaver",
"version" : "4.008"
},
{
"class" : "Dist::Zilla::Plugin::PruneFiles",
"name" : "@Author::PERLANCAR/PruneFiles",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::Pod2Readme",
"name" : "@Author::PERLANCAR/Pod2Readme",
"version" : "0.004"
},
{
"class" : "Dist::Zilla::Plugin::Rinci::AddPrereqs",
"name" : "@Author::PERLANCAR/Rinci::AddPrereqs",
"version" : "0.142"
},
{
"class" : "Dist::Zilla::Plugin::Rinci::AddToDb",
"name" : "@Author::PERLANCAR/Rinci::AddToDb",
"version" : "0.020"
},
{
"class" : "Dist::Zilla::Plugin::Rinci::EmbedValidator",
"name" : "@Author::PERLANCAR/Rinci::EmbedValidator",
"version" : "0.250"
},
{
"class" : "Dist::Zilla::Plugin::SetScriptShebang",
"name" : "@Author::PERLANCAR/SetScriptShebang",
"version" : "0.01"
},
{
"class" : "Dist::Zilla::Plugin::Test::Compile",
"config" : {
"Dist::Zilla::Plugin::Test::Compile" : {
"bail_out_on_fail" : 0,
"fail_on_warning" : "author",
"fake_home" : 0,
"filename" : "t/00-compile.t",
"module_finder" : [
":InstallModules"
],
"needs_display" : 0,
"phase" : "test",
"script_finder" : [
":PerlExecFiles"
],
"skips" : [],
"switch" : []
}
},
"name" : "@Author::PERLANCAR/Test::Compile",
"version" : "2.058"
},
{
"class" : "Dist::Zilla::Plugin::Test::Perl::Critic",
"name" : "@Author::PERLANCAR/Test::Perl::Critic",
"version" : "3.001"
},
{
"class" : "Dist::Zilla::Plugin::Test::Rinci",
"name" : "@Author::PERLANCAR/Test::Rinci",
"version" : "0.040"
},
{
"class" : "Dist::Zilla::Plugin::StaticInstall",
"config" : {
"Dist::Zilla::Plugin::StaticInstall" : {
"dry_run" : 0,
"mode" : "on"
}
},
"name" : "@Author::PERLANCAR/StaticInstall",
"version" : "0.012"
},
{
"class" : "Dist::Zilla::Plugin::EnsureSQLSchemaVersionedTest",
"name" : "@Author::PERLANCAR/EnsureSQLSchemaVersionedTest",
"version" : "0.03"
},
{
"class" : "Dist::Zilla::Plugin::Acme::CPANModules::Blacklist",
"name" : "@Author::PERLANCAR/Acme::CPANModules::Blacklist",
"version" : "0.001"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs::EnsureVersion",
"name" : "@Author::PERLANCAR/Prereqs::EnsureVersion",
"version" : "0.050"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs::CheckCircular",
"name" : "@Author::PERLANCAR/Prereqs::CheckCircular",
"version" : "0.006"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN::WWWPAUSESimple",
"name" : "@Author::PERLANCAR/UploadToCPAN::WWWPAUSESimple",
"version" : "0.04"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "test",
"type" : "requires"
}
},
"name" : "TestRequires",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "runtime",
"type" : "requires"
}
},
"name" : "Prereqs",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "runtime",
"type" : "suggests"
}
},
"name" : "RuntimeSuggests",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "runtime",
"type" : "recommends"
}
},
"name" : "RuntimeRecommends",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::Extras",
"name" : "lint-prereqs / assume-provided",
"version" : "0.03"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExtraTestFiles",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":PerlExecFiles",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":AllFiles",
"version" : "6.012"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":NoFiles",
"version" : "6.012"
}
],
"zilla" : {
"class" : "Dist::Zilla::Dist::Builder",
"config" : {
"is_trial" : 0
},
"version" : "6.012"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.28.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.11",
"x_static_install" : 1
}
Progress-Any-Output-TermProgressBarColor-0.246/Makefile.PL 0000644 0001750 0001750 00000003320 13517624332 021040 0 ustar s1 s1 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.012.
use strict;
use warnings;
use 5.010001;
use ExtUtils::MakeMaker;
my %WriteMakefileArgs = (
"ABSTRACT" => "Output progress to terminal as color bar",
"AUTHOR" => "perlancar ",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "Progress-Any-Output-TermProgressBarColor",
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.010001",
"NAME" => "Progress::Any::Output::TermProgressBarColor",
"PREREQ_PM" => {
"Color::ANSI::Util" => "0.161",
"Monkey::Patch::Action" => "0.060",
"Progress::Any" => "0.214",
"String::Elide::Parts" => "0.07",
"Text::ANSI::Util" => "0.22",
"strict" => 0,
"warnings" => 0
},
"TEST_REQUIRES" => {
"Capture::Tiny" => 0,
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Progress::Any::Output" => 0,
"Test::More" => "0.98"
},
"VERSION" => "0.246",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"Capture::Tiny" => 0,
"Color::ANSI::Util" => "0.161",
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Monkey::Patch::Action" => "0.060",
"Progress::Any" => "0.214",
"Progress::Any::Output" => 0,
"String::Elide::Parts" => "0.07",
"Test::More" => "0.98",
"Text::ANSI::Util" => "0.22",
"strict" => 0,
"warnings" => 0
);
unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
delete $WriteMakefileArgs{TEST_REQUIRES};
delete $WriteMakefileArgs{BUILD_REQUIRES};
$WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
WriteMakefile(%WriteMakefileArgs);
Progress-Any-Output-TermProgressBarColor-0.246/META.yml 0000644 0001750 0001750 00000033751 13517624332 020352 0 ustar s1 s1 ---
abstract: 'Output progress to terminal as color bar'
author:
- 'perlancar '
build_requires:
Capture::Tiny: '0'
File::Spec: '0'
IO::Handle: '0'
IPC::Open3: '0'
Progress::Any::Output: '0'
Test::More: '0.98'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Progress-Any-Output-TermProgressBarColor
recommends:
Term::Size: '0'
requires:
Color::ANSI::Util: '0.161'
Monkey::Patch::Action: '0.060'
Progress::Any: '0.214'
String::Elide::Parts: '0.07'
Text::ANSI::Util: '0.22'
perl: '5.010001'
strict: '0'
warnings: '0'
resources:
bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Progress-Any-Output-TermProgressBarColor
homepage: https://metacpan.org/release/Progress-Any-Output-TermProgressBarColor
repository: git://github.com/perlancar/perl-Progress-Any-Output-TermProgressBarColor.git
version: '0.246'
x_Dist_Zilla:
perl:
version: '5.028002'
plugins:
-
class: Dist::Zilla::Plugin::GatherDir
config:
Dist::Zilla::Plugin::GatherDir:
exclude_filename: []
exclude_match: []
follow_symlinks: 0
include_dotfiles: 0
prefix: ''
prune_directory: []
root: .
name: '@Author::PERLANCAR/@Filter/GatherDir'
version: '6.012'
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@Author::PERLANCAR/@Filter/PruneCruft'
version: '6.012'
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@Author::PERLANCAR/@Filter/ManifestSkip'
version: '6.012'
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@Author::PERLANCAR/@Filter/MetaYAML'
version: '6.012'
-
class: Dist::Zilla::Plugin::License
name: '@Author::PERLANCAR/@Filter/License'
version: '6.012'
-
class: Dist::Zilla::Plugin::PodCoverageTests
name: '@Author::PERLANCAR/@Filter/PodCoverageTests'
version: '6.012'
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@Author::PERLANCAR/@Filter/PodSyntaxTests'
version: '6.012'
-
class: Dist::Zilla::Plugin::ExtraTests
name: '@Author::PERLANCAR/@Filter/ExtraTests'
version: '6.012'
-
class: Dist::Zilla::Plugin::ExecDir
name: '@Author::PERLANCAR/@Filter/ExecDir'
version: '6.012'
-
class: Dist::Zilla::Plugin::ShareDir
name: '@Author::PERLANCAR/@Filter/ShareDir'
version: '6.012'
-
class: Dist::Zilla::Plugin::MakeMaker
config:
Dist::Zilla::Role::TestRunner:
default_jobs: 1
name: '@Author::PERLANCAR/@Filter/MakeMaker'
version: '6.012'
-
class: Dist::Zilla::Plugin::Manifest
name: '@Author::PERLANCAR/@Filter/Manifest'
version: '6.012'
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@Author::PERLANCAR/@Filter/ConfirmRelease'
version: '6.012'
-
class: Dist::Zilla::Plugin::ExecDir
name: '@Author::PERLANCAR/ExecDir script'
version: '6.012'
-
class: Dist::Zilla::Plugin::PERLANCAR::BeforeBuild
name: '@Author::PERLANCAR/PERLANCAR::BeforeBuild'
version: '0.597'
-
class: Dist::Zilla::Plugin::Rinci::AbstractFromMeta
name: '@Author::PERLANCAR/Rinci::AbstractFromMeta'
version: '0.10'
-
class: Dist::Zilla::Plugin::PodnameFromFilename
name: '@Author::PERLANCAR/PodnameFromFilename'
version: '0.02'
-
class: Dist::Zilla::Plugin::PERLANCAR::EnsurePrereqToSpec
name: '@Author::PERLANCAR/PERLANCAR::EnsurePrereqToSpec'
version: '0.060'
-
class: Dist::Zilla::Plugin::PERLANCAR::MetaResources
name: '@Author::PERLANCAR/PERLANCAR::MetaResources'
version: '0.040'
-
class: Dist::Zilla::Plugin::CheckChangeLog
name: '@Author::PERLANCAR/CheckChangeLog'
version: '0.05'
-
class: Dist::Zilla::Plugin::CheckMetaResources
name: '@Author::PERLANCAR/CheckMetaResources'
version: '0.001'
-
class: Dist::Zilla::Plugin::CheckSelfDependency
config:
Dist::Zilla::Plugin::CheckSelfDependency:
finder:
- ':InstallModules'
Dist::Zilla::Role::ModuleMetadata:
Module::Metadata: '1.000033'
version: '0.006'
name: '@Author::PERLANCAR/CheckSelfDependency'
version: '0.011'
-
class: Dist::Zilla::Plugin::CopyrightYearFromGit
name: '@Author::PERLANCAR/CopyrightYearFromGit'
version: '0.003'
-
class: Dist::Zilla::Plugin::IfBuilt
name: '@Author::PERLANCAR/IfBuilt'
version: '0.02'
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@Author::PERLANCAR/MetaJSON'
version: '6.012'
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@Author::PERLANCAR/MetaConfig'
version: '6.012'
-
class: Dist::Zilla::Plugin::Authority
name: '@Author::PERLANCAR/Authority'
version: '1.009'
-
class: Dist::Zilla::Plugin::OurDate
name: '@Author::PERLANCAR/OurDate'
version: '0.03'
-
class: Dist::Zilla::Plugin::OurDist
name: '@Author::PERLANCAR/OurDist'
version: '0.02'
-
class: Dist::Zilla::Plugin::OurPkgVersion
name: '@Author::PERLANCAR/OurPkgVersion'
version: '0.15'
-
class: Dist::Zilla::Plugin::PodWeaver
config:
Dist::Zilla::Plugin::PodWeaver:
finder:
- ':InstallModules'
- ':ExecFiles'
plugins:
-
class: Pod::Weaver::Plugin::EnsurePod5
name: '@CorePrep/EnsurePod5'
version: '4.015'
-
class: Pod::Weaver::Plugin::H1Nester
name: '@CorePrep/H1Nester'
version: '4.015'
-
class: Pod::Weaver::Section::Name
name: '@Author::PERLANCAR/Name'
version: '4.015'
-
class: Pod::Weaver::Section::Version
name: '@Author::PERLANCAR/Version'
version: '4.015'
-
class: Pod::Weaver::Section::Region
name: '@Author::PERLANCAR/prelude'
version: '4.015'
-
class: Pod::Weaver::Section::Generic
name: SYNOPSIS
version: '4.015'
-
class: Pod::Weaver::Section::Generic
name: DESCRIPTION
version: '4.015'
-
class: Pod::Weaver::Section::Generic
name: OVERVIEW
version: '4.015'
-
class: Pod::Weaver::Section::Collect
name: ATTRIBUTES
version: '4.015'
-
class: Pod::Weaver::Section::Collect
name: METHODS
version: '4.015'
-
class: Pod::Weaver::Section::Collect
name: FUNCTIONS
version: '4.015'
-
class: Pod::Weaver::Section::Leftovers
name: '@Author::PERLANCAR/Leftovers'
version: '4.015'
-
class: Pod::Weaver::Section::Region
name: '@Author::PERLANCAR/postlude'
version: '4.015'
-
class: Pod::Weaver::Section::Completion::GetoptLongComplete
name: '@Author::PERLANCAR/Completion::GetoptLongComplete'
version: '0.08'
-
class: Pod::Weaver::Section::Completion::GetoptLongSubcommand
name: '@Author::PERLANCAR/Completion::GetoptLongSubcommand'
version: '0.04'
-
class: Pod::Weaver::Section::Completion::GetoptLongMore
name: '@Author::PERLANCAR/Completion::GetoptLongMore'
version: '0.001'
-
class: Pod::Weaver::Section::Homepage::DefaultCPAN
name: '@Author::PERLANCAR/Homepage::DefaultCPAN'
version: '0.05'
-
class: Pod::Weaver::Section::Source::DefaultGitHub
name: '@Author::PERLANCAR/Source::DefaultGitHub'
version: '0.07'
-
class: Pod::Weaver::Section::Bugs::DefaultRT
name: '@Author::PERLANCAR/Bugs::DefaultRT'
version: '0.06'
-
class: Pod::Weaver::Section::Authors
name: '@Author::PERLANCAR/Authors'
version: '4.015'
-
class: Pod::Weaver::Section::Legal
name: '@Author::PERLANCAR/Legal'
version: '4.015'
-
class: Pod::Weaver::Plugin::Rinci
name: '@Author::PERLANCAR/Rinci'
version: '0.780'
-
class: Pod::Weaver::Plugin::AppendPrepend
name: '@Author::PERLANCAR/AppendPrepend'
version: '0.01'
-
class: Pod::Weaver::Plugin::EnsureUniqueSections
name: '@Author::PERLANCAR/EnsureUniqueSections'
version: '0.163250'
-
class: Pod::Weaver::Plugin::SingleEncoding
name: '@Author::PERLANCAR/SingleEncoding'
version: '4.015'
-
class: Pod::Weaver::Plugin::PERLANCAR::SortSections
name: '@Author::PERLANCAR/PERLANCAR::SortSections'
version: '0.06'
name: '@Author::PERLANCAR/PodWeaver'
version: '4.008'
-
class: Dist::Zilla::Plugin::PruneFiles
name: '@Author::PERLANCAR/PruneFiles'
version: '6.012'
-
class: Dist::Zilla::Plugin::Pod2Readme
name: '@Author::PERLANCAR/Pod2Readme'
version: '0.004'
-
class: Dist::Zilla::Plugin::Rinci::AddPrereqs
name: '@Author::PERLANCAR/Rinci::AddPrereqs'
version: '0.142'
-
class: Dist::Zilla::Plugin::Rinci::AddToDb
name: '@Author::PERLANCAR/Rinci::AddToDb'
version: '0.020'
-
class: Dist::Zilla::Plugin::Rinci::EmbedValidator
name: '@Author::PERLANCAR/Rinci::EmbedValidator'
version: '0.250'
-
class: Dist::Zilla::Plugin::SetScriptShebang
name: '@Author::PERLANCAR/SetScriptShebang'
version: '0.01'
-
class: Dist::Zilla::Plugin::Test::Compile
config:
Dist::Zilla::Plugin::Test::Compile:
bail_out_on_fail: '0'
fail_on_warning: author
fake_home: 0
filename: t/00-compile.t
module_finder:
- ':InstallModules'
needs_display: 0
phase: test
script_finder:
- ':PerlExecFiles'
skips: []
switch: []
name: '@Author::PERLANCAR/Test::Compile'
version: '2.058'
-
class: Dist::Zilla::Plugin::Test::Perl::Critic
name: '@Author::PERLANCAR/Test::Perl::Critic'
version: '3.001'
-
class: Dist::Zilla::Plugin::Test::Rinci
name: '@Author::PERLANCAR/Test::Rinci'
version: '0.040'
-
class: Dist::Zilla::Plugin::StaticInstall
config:
Dist::Zilla::Plugin::StaticInstall:
dry_run: 0
mode: on
name: '@Author::PERLANCAR/StaticInstall'
version: '0.012'
-
class: Dist::Zilla::Plugin::EnsureSQLSchemaVersionedTest
name: '@Author::PERLANCAR/EnsureSQLSchemaVersionedTest'
version: '0.03'
-
class: Dist::Zilla::Plugin::Acme::CPANModules::Blacklist
name: '@Author::PERLANCAR/Acme::CPANModules::Blacklist'
version: '0.001'
-
class: Dist::Zilla::Plugin::Prereqs::EnsureVersion
name: '@Author::PERLANCAR/Prereqs::EnsureVersion'
version: '0.050'
-
class: Dist::Zilla::Plugin::Prereqs::CheckCircular
name: '@Author::PERLANCAR/Prereqs::CheckCircular'
version: '0.006'
-
class: Dist::Zilla::Plugin::UploadToCPAN::WWWPAUSESimple
name: '@Author::PERLANCAR/UploadToCPAN::WWWPAUSESimple'
version: '0.04'
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: test
type: requires
name: TestRequires
version: '6.012'
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: runtime
type: requires
name: Prereqs
version: '6.012'
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: runtime
type: suggests
name: RuntimeSuggests
version: '6.012'
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: runtime
type: recommends
name: RuntimeRecommends
version: '6.012'
-
class: Dist::Zilla::Plugin::Extras
name: 'lint-prereqs / assume-provided'
version: '0.03'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
version: '6.012'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
version: '6.012'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
version: '6.012'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExtraTestFiles'
version: '6.012'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
version: '6.012'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':PerlExecFiles'
version: '6.012'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
version: '6.012'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
version: '6.012'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':AllFiles'
version: '6.012'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':NoFiles'
version: '6.012'
zilla:
class: Dist::Zilla::Dist::Builder
config:
is_trial: '0'
version: '6.012'
x_authority: cpan:PERLANCAR
x_generated_by_perl: v5.28.2
x_serialization_backend: 'YAML::Tiny version 1.73'
x_static_install: 1
Progress-Any-Output-TermProgressBarColor-0.246/lib/ 0000755 0001750 0001750 00000000000 13517624332 017636 5 ustar s1 s1 Progress-Any-Output-TermProgressBarColor-0.246/lib/Progress/ 0000755 0001750 0001750 00000000000 13517624332 021442 5 ustar s1 s1 Progress-Any-Output-TermProgressBarColor-0.246/lib/Progress/Any/ 0000755 0001750 0001750 00000000000 13517624332 022171 5 ustar s1 s1 Progress-Any-Output-TermProgressBarColor-0.246/lib/Progress/Any/Output/ 0000755 0001750 0001750 00000000000 13517624332 023471 5 ustar s1 s1 Progress-Any-Output-TermProgressBarColor-0.246/lib/Progress/Any/Output/TermProgressBarColor.pm 0000644 0001750 0001750 00000035165 13517624332 030121 0 ustar s1 s1 package Progress::Any::Output::TermProgressBarColor;
our $DATE = '2019-07-30'; # DATE
our $VERSION = '0.246'; # VERSION
use 5.010001;
use strict;
use warnings;
use Color::ANSI::Util qw(ansifg ansibg);
require Win32::Console::ANSI if $^O =~ /Win/;
$|++;
# patch handle
my ($ph1, $ph2);
sub _patch {
my $out = shift;
return if $ph1;
require Monkey::Patch::Action;
if (defined &{"Log::Any::Adapter::Screen::hook_before_log"}) {
$ph1 = Monkey::Patch::Action::patch_package(
'Log::Any::Adapter::Screen', 'hook_before_log', 'replace',
sub {
# we install a hook to clean up progress indicator first before
# we print log message to the screen.
$out->cleanup(1);
$Progress::Any::output_data{"$out"}{force_update} = 1;
}
);
} elsif (defined &{"Log::ger::Output::Screen::hook_before_log"}) {
$ph1 = Monkey::Patch::Action::patch_package(
'Log::ger::Output::Screen', 'hook_before_log', 'replace',
sub {
# we install a hook to clean up progress indicator first before
# we print log message to the screen.
$out->cleanup(1);
$Progress::Any::output_data{"$out"}{force_update} = 1;
}
);
}
if (defined &{"Log::Any::Adapter::Screen::hook_after_log"}) {
$ph2 = Monkey::Patch::Action::patch_package(
'Log::Any::Adapter::Screen', 'hook_after_log', 'replace',
sub {
my ($self, $msg) = @_;
# make sure we print a newline after logging so progress bar
# starts at column 1
print { $self->{_fh} } "\n" unless $msg =~ /\R\z/;
# reset show_delay because we have displayed something
$out->keep_delay_showing if $out->{show_delay};
# redisplay progress bar if were cleaned up
print { $self->{_fh} } $out->{_bar} if $out->{_bar};
}
);
} elsif (defined &{"Log::ger::Output::Screen::hook_after_log"}) {
$ph2 = Monkey::Patch::Action::patch_package(
'Log::ger::Output::Screen', 'hook_after_log', 'replace',
sub {
my ($ctx, $msg) = @_;
# make sure we print a newline after logging so progress bar
# starts at column 1
print { $ctx->{_fh} } "\n" unless $msg =~ /\R\z/;
# reset show_delay because we have displayed something
$out->keep_delay_showing if $out->{show_delay};
# redisplay progress bar if were cleaned up
print { $ctx->{_fh} } $out->{_bar} if $out->{_bar};
}
);
}
}
sub _unpatch {
undef $ph1;
undef $ph2;
}
sub _template_length {
require Progress::Any; # for $template_regex
no warnings 'once'; # $Progress::Any::template_regex
my ($self, $template) = @_;
my $template_length = length($template);
while ($template =~ /$Progress::Any::template_regex/g) {
my ($all, $width, $dot, $prec, $conv) =
($1, $2, $3, $4, $5);
if (defined $template_length) {
if ($conv eq '%') {
$width //= 1;
} elsif ($conv eq 'b' || $conv eq 'B') {
$width //= $self->{_default_b_width};
} elsif ($conv eq 'p') {
$width //= 3;
} elsif ($conv eq 'e') {
$width //= -8;
} elsif ($conv eq 'r') {
$width //= -8;
} elsif ($conv eq 'R') {
$width //= -(8 + 1 + 7);
}
if (defined $width) {
$template_length += abs($width) - length($all);
} else {
$template_length = undef;
}
}
}
$template_length;
}
sub new {
my ($class, %args0) = @_;
my %args;
$args{width} = delete($args0{width});
if (!defined($args{width})) {
my ($cols, $rows);
if ($ENV{COLUMNS}) {
$cols = $ENV{COLUMNS};
} elsif (eval { require Term::Size; 1 }) {
($cols, $rows) = Term::Size::chars(*STDOUT{IO});
} else {
$cols = 80;
}
# on windows if we print at rightmost column, cursor will move to the
# next line, so we try to avoid that
$args{width} = $^O =~ /Win/ ? $cols-1 : $cols;
}
$args{fh} = delete($args0{fh});
$args{fh} //= \*STDERR;
$args{show_delay} = delete($args0{show_delay});
$args{freq} = delete($args0{freq});
$args{wide} = delete($args0{wide});
$args{template} = delete($args0{template}) //
'%p%% [%B]%R';
keys(%args0) and die "Unknown output parameter(s): ".
join(", ", keys(%args0));
$args{_last_hide_time} = time();
require Text::ANSI::Util;
if ($args{wide}) {
require Text::ANSI::WideUtil;
}
my $self = bless \%args, $class;
# determine the default width for %b and %B
{
$self->{_default_b_width} = 0;
(my $template = $args{template}) =~ s!|!!g;
my $len = $self->_template_length($template) // 16;
$self->{_default_b_width} = $args{width} - $len;
}
# render color in template
($self->{_template} = $self->{template}) =~ s!|<(/)color>!$1 ? ansifg($1) : "\e[0m"!eg;
$self;
}
sub _handle_unknown_conversion {
my %args = @_;
my $conv = $args{conv};
return () unless $conv eq 'b' || $conv eq 'B';
my $p = $args{indicator};
my $self = $args{self};
my $tottgt = $p->total_target;
my $totpos = $p->total_pos;
my $bar_bar = '';
my $bwidth = abs($args{width} // $self->{_default_b_width});
if ($tottgt) {
my $bfilled = int($totpos / $tottgt * $bwidth);
$bfilled = $bwidth if $bfilled > $bwidth;
$bar_bar = ("=" x $bfilled) . (" " x ($bwidth-$bfilled));
} else {
# display 15% width of bar just moving right
my $bfilled = int(0.15 * $bwidth);
$bfilled = 1 if $bfilled < 1;
$self->{_x}++;
if ($self->{_x} > $bwidth-$bfilled) {
$self->{_x} = 0;
}
$bar_bar = (" " x $self->{_x}) . ("=" x $bfilled) .
(" " x ($bwidth-$self->{_x}-$bfilled));
}
my $msg = $args{args}{message};
if ($conv eq 'B' && defined $msg) {
if ($msg =~ m!{wide}) {
$msg = Text::ANSI::WideUtil::ta_mbtrunc($msg, $bwidth);
$mwidth = Text::ANSI::WideUtil::ta_mbswidth($msg);
} else {
$msg = Text::ANSI::Util::ta_trunc($msg, $bwidth);
$mwidth = Text::ANSI::Util::ta_length($msg);
}
$bar_bar = $msg . substr($bar_bar, $mwidth);
}
return ("%s", $bar_bar);
}
sub update {
my ($self, %args) = @_;
return unless $ENV{PROGRESS_TERM_BAR} // $ENV{PROGRESS} // (-t $self->{fh});
my $now = time();
# if there is show_delay, don't display until we've surpassed it
if (defined $self->{show_delay}) {
return if $now - $self->{show_delay} < $self->{_last_hide_time};
}
$self->_patch;
$self->cleanup;
my $p = $args{indicator};
my $is_finished = $p->{state} eq 'finished';
if ($is_finished) {
if ($self->{_lastlen}) {
$self->{_last_hide_time} = $now;
}
return;
}
my $bar = $p->fill_template(
{
template => $self->{_template},
handle_unknown_conversion => sub {
_handle_unknown_conversion(
self => $self,
@_,
);
},
},
%args,
);
my $len = Text::ANSI::Util::ta_length($bar);
$self->{_bar} = $bar . ("\b" x $len);
print { $self->{fh} } $self->{_bar};
$self->{_lastlen} = $len;
}
sub cleanup {
my ($self, $dont_reset_lastlen) = @_;
# sometimes (e.g. when a subtask's target is undefined) we don't get
# state=finished at the end. but we need to cleanup anyway at the end of
# app, so this method is provided and will be called by e.g.
# Perinci::CmdLine
my $ll = $self->{_lastlen};
return unless $ll;
print { $self->{fh} } " " x $ll, "\b" x $ll;
undef $self->{_lastlen} unless $dont_reset_lastlen;
}
sub keep_delay_showing {
my $self = shift;
$self->{_last_hide_time} = time();
}
sub DESTROY {
my $self = shift;
$self->_unpatch;
}
1;
# ABSTRACT: Output progress to terminal as color bar
__END__
=pod
=encoding UTF-8
=head1 NAME
Progress::Any::Output::TermProgressBarColor - Output progress to terminal as color bar
=head1 VERSION
This document describes version 0.246 of Progress::Any::Output::TermProgressBarColor (from Perl distribution Progress-Any-Output-TermProgressBarColor), released on 2019-07-30.
=head1 SYNOPSIS
use Progress::Any::Output;
# use default options
Progress::Any::Output->set('TermProgressBarColor');
# set options
Progress::Any::Output->set('TermProgressBarColor',
width=>50, fh=>\*STDERR, show_delay=>5);
=head1 DESCRIPTION
B.
Sample screenshots:
=for Pod::Coverage ^(update|cleanup)$
=for HTML
This output displays progress indicators as colored progress bar on terminal. It
produces output similar to that produced by L, except that it
uses the L framework and has additional features:
=over
=item * colors and color themes
=item * template and styles
=item * displaying message text in addition to bar/percentage number
=item * wide character support
=back
XXX option to cleanup when complete or not (like in Term::ProgressBar) and
should default to 1.
=head1 METHODS
=head2 new(%args) => OBJ
Instantiate. Usually called through C<<
Progress::Any::Output->set("TermProgressBarColor", %args) >>.
Known arguments:
=over
=item * freq => num
Limit the frequency of output updating. 0 means no frequency limiting (update
output after every C).
A positive number means to update output when there has been that amount of
difference in position since last C. For example, if C is 10 and
the last C was at position 5, then the next output update will be when
position is at least 15.
A negative number means to update output when time has passed that amount of
absolute value (in seconds). For example, if C is -3 and the last
C was 1 second ago, then the next output update will not be until the
next two seconds has passed.
By default undef, in which case Progress::Any will use the default -0.5 (at most
once every 0.5 seconds).
=item * wide => bool
If set to 1, enable wide character support (requires L.
=item * width => INT
Width of progress bar. The default is to detect terminal width and use the whole
width.
=item * color_theme => STR
Not yet implemented.
Choose color theme. To see what color themes are available, use
C.
=item * style => STR
Not yet implemented.
Choose style. To see what styles are available, use C. Styles
determine the characters used for drawing the bar, alignment, etc.
=item * template => str
See B in Progress::Any's documentation. Aside from conversions
supported by Progress::Any, this output recognizes these additional conversions:
C<%b> to display the progress bar (with width using the rest of the available
width), C<%B> to display the progress bar as well as the message inside it. You
can also enclose parts of text with "" ... "" to give color.
The default template is:
%p [%B]%e
=item * fh => handle (default: \*STDERR)
Instead of the default STDERR, you can direct the output to another filehandle
e.g. STDOUT.
=item * show_delay => int
If set, will delay showing the progress bar until the specified number of
seconds. This can be used to create, e.g. a CLI application that is relatively
not chatty but will display progress after several seconds of seeming inactivity
to indicate users that the process is still going on.
=back
=head2 keep_delay_showing()
Can be called to reset the timer that counts down to show progress bar when
C is defined. For example, if C is 5 seconds and two
seconds have passed, it should've been 3 seconds before progress bar is shown in
the next C. However, if you call this method, it will be 5 seconds
again before showing.
=head1 FAQ
=head2 How to update progress bar output more often?
Set C to e.g. -0.1 or -0.05. The default C, when unset, is -0.5
which means to update output at most once every 0.5 second.
=head1 ENVIRONMENT
=head2 NO_COLOR
Bool. Can be used to disable color. Consulted before L. See
L.
=head2 COLOR
Bool. Can be used to force or disable color. See L.
=head2 COLOR_DEPTH
Integer. Can be used to override color depth detection. See
L.
=head2 COLUMNS
Integer. Can be used to override terminal width detection.
=head2 PROGRESS_TERM_BAR
Bool. Forces disabling or enabling progress output (just for this output).
In the absence of PROGRESS_TERM_MESSAGE and PROGRESS, will default to 1 if
filehandle is detected as interactive (using C<-t>).
=head2 PROGRESS
Bool. Forces disabling or enabling progress output (for all outputs).
=head1 HOMEPAGE
Please visit the project's homepage at L.
=head1 SOURCE
Source repository is at L.
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website L
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.
=head1 SEE ALSO
L
L
Ruby library: ruby-progressbar, L
=head1 AUTHOR
perlancar
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2019, 2018, 2017, 2016, 2015, 2014, 2013 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.
=cut
Progress-Any-Output-TermProgressBarColor-0.246/Changes 0000644 0001750 0001750 00000010257 13517624332 020370 0 ustar s1 s1 0.246 2019-07-30 Released-By: PERLANCAR; Urgency: medium
- [bugfix] Didn't use Term::Size::chars() correctly resulting in
undefined width.
0.245 2018-03-27 Released-By: PERLANCAR
- [ux] Redisplay progress bar after printing log message.
0.244 2018-03-26 Released-By: PERLANCAR
- Add option: freq.
- [Bugfix] Make sure we patch logger (and avoid clobbered output when
mixing output with logger) by doing it in update(), not in constructor
because by that time logger might not be setup yet.
- [optimize] Calculate color in template once, not in every update().
0.243 2018-03-21 Released-By: PERLANCAR
- [Bugfix] Check -t against the actual handle used, not hardcoded
STDOUT or STDERR.
0.242 2018-03-21 Released-By: PERLANCAR
- [Incompatible change] [ux] Default output to STDERR instead of
STDOUT, like logging.
- Observe PROGRESS_TERM_BAR and PROGRESS environment variables to
allow disabling or force-enabling progress output.
- [opt] No need to add extra color reset.
0.241 2018-03-17 Released-By: PERLANCAR
- No functional changes.
- [dist] Forgot to add entry to Changes.
0.240 2018-03-17 Released-By: PERLANCAR
- Implement template.
- [Incompatible change] [ux] Don't clear progress bar on 100%, clear on
finish().
0.23 2017-06-21 Released-By: PERLANCAR
- Support patching Log::ger::Output::Screen in addition to
Log::Any::Adapter::Screen.
- Update documentation about COLOR being observed by Color::ANSI::Util.
0.22 2016-03-11 Released-By: PERLANCAR
- No functional changes.
- Adjust to Text::ANSI::Util 0.22 (::NonWideUtil removed).
0.21 2015-08-29 Released-By: PERLANCAR
- Typo.
0.20 2015-08-29 Released-By: PERLANCAR
- [Bugfix] fix dependencies, add option wide=>1 to explicitly
enable wide character support and load the correct module
[RT#106719].
0.19 2015-06-19 Released-By: PERLANCAR
- Patch Log::Any::Adapter::Screen instead of ::ScreenColoredLevel,
because that's what the new Perinci::CmdLine is using.
0.18 2015-01-28 Released-By: PERLANCAR
- [Bugfix] Fixes so that show_delay is reset again after log is
printed.
- [doc] Complete incomplete sentence.
0.17 2015-01-28 Released-By: PERLANCAR
- Put patch for working together with
Log::Any::Adapter::ScreenColoredLevel here, moved from
Perinci::CmdLine(::Lite).
0.16 2015-01-23 Released-By: PERLANCAR
- Support eliding message with String::Elide::Parts.
0.15 2015-01-22 Released-By: PERLANCAR
- No functional changes.
- [doc] Tweak POD: show all options in example, mark unimplemented
options.
0.14 2015-01-22 Released-By: PERLANCAR
- Add option: show_delay (and method: keep_delay_showing).
0.13 2015-01-03 Released-By: PERLANCAR
- No functional changes.
- Rebuild (Generate TODO.md).
0.12 2014-10-14 Released-By: PERLANCAR
- No functional changes.
- Include screenshot.
0.11 2014-10-14 Released-By: PERLANCAR
- Add option: fh, to allow output other than to STDOUT (thanks Przemek
WesoĊek).
0.10 2014-07-04 Released-By: SHARYANTO
[BUG FIXES]
- Avoid division by zero.
0.09 2014-02-26 Released-By: SHARYANTO
[BUG FIXES]
- Fix cleanup (\b doesn't erase).
0.08 2014-02-26 Released-By: SHARYANTO
- Add cleanup() to allow, e.g. Perinci::CmdLine, to clean the at the end
of application run.
0.07 2013-09-11 Released-By: SHARYANTO
- No functional changes. Require Win32::Console::ANSI on Windows.
0.06 2013-09-11 Released-By: SHARYANTO
- Provide defaults and allow install on Windows.
0.05 2013-09-03 Released-By: SHARYANTO
[BUG FIXES]
- Missed some adjustment for Progress::Any 0.10.
0.04 2013-09-03 Released-By: SHARYANTO
- No functional changes. Update to Progress::Any 0.10.
0.03 2013-07-18 Released-By: SHARYANTO
[BUG FIXES]
- Fix RGB color.
0.02 2013-05-18 Released-By: SHARYANTO
- Bugfix: didn't display when target is undefined.
0.01 2013-05-18 Released-By: SHARYANTO
- First, early release.
Progress-Any-Output-TermProgressBarColor-0.246/t/ 0000755 0001750 0001750 00000000000 13517624332 017333 5 ustar s1 s1 Progress-Any-Output-TermProgressBarColor-0.246/t/00-compile.t 0000644 0001750 0001750 00000002671 13517624332 021373 0 ustar s1 s1 use 5.006;
use strict;
use warnings;
# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.058
use Test::More;
plan tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
my @module_files = (
'Progress/Any/Output/TermProgressBarColor.pm'
);
# no fake home requested
my @switches = (
-d 'blib' ? '-Mblib' : '-Ilib',
);
use File::Spec;
use IPC::Open3;
use IO::Handle;
open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
my @warnings;
for my $lib (@module_files)
{
# see L
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
and not eval { +require blib; blib->VERSION('1.01') };
if (@_warnings)
{
warn @_warnings;
push @warnings, @_warnings;
}
}
is(scalar(@warnings), 0, 'no warnings found')
or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING};
Progress-Any-Output-TermProgressBarColor-0.246/t/author-pod-syntax.t 0000644 0001750 0001750 00000000454 13517624332 023131 0 ustar s1 s1 #!perl
BEGIN {
unless ($ENV{AUTHOR_TESTING}) {
print qq{1..0 # SKIP these tests are for testing by the author\n};
exit
}
}
# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
use strict; use warnings;
use Test::More;
use Test::Pod 1.41;
all_pod_files_ok();
Progress-Any-Output-TermProgressBarColor-0.246/t/01-basic.t 0000644 0001750 0001750 00000002417 13517624332 021023 0 ustar s1 s1 #!perl
use 5.010001;
use strict;
use warnings;
use Test::More 0.98;
use Capture::Tiny qw(capture);
use Progress::Any;
use Progress::Any::Output;
subtest default => sub {
local $ENV{PROGRESS} = 1;
Progress::Any::Output->set('TermProgressBarColor');
my $progress = Progress::Any->get_indicator(task=>'', target=>10);
my ($out, $err, $exit) = capture {
$progress->update(message => "foo");
};
like($err, qr/foo/);
like($err, qr/10%/);
};
subtest "fh option" => sub {
local $ENV{PROGRESS} = 1;
Progress::Any::Output->set('TermProgressBarColor', fh=>\*STDOUT);
my $progress = Progress::Any->get_indicator(task=>'', target=>10);
my ($out, $err, $exit) = capture {
$progress->update(message => "foo");
};
like($out, qr/foo/);
like($out, qr/20%/);
};
subtest "default (wide)" => sub {
local $ENV{PROGRESS} = 1;
plan skip_all => 'Text::ANSI::WideUtil not available'
unless eval { require Text::ANSI::WideUtil; 1 };
Progress::Any::Output->set('TermProgressBarColor', wide=>1);
my $progress = Progress::Any->get_indicator(task=>'', target=>10);
my ($out, $err, $exit) = capture {
$progress->update(message => "foo");
};
like($err, qr/foo/);
like($err, qr/30%/);
};
done_testing;
Progress-Any-Output-TermProgressBarColor-0.246/t/author-pod-coverage.t 0000644 0001750 0001750 00000000536 13517624332 023377 0 ustar s1 s1 #!perl
BEGIN {
unless ($ENV{AUTHOR_TESTING}) {
print qq{1..0 # SKIP these tests are for testing by the author\n};
exit
}
}
# This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests.
use Test::Pod::Coverage 1.08;
use Pod::Coverage::TrustPod;
all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });
Progress-Any-Output-TermProgressBarColor-0.246/t/author-critic.t 0000644 0001750 0001750 00000000403 13517624332 022272 0 ustar s1 s1 #!perl
BEGIN {
unless ($ENV{AUTHOR_TESTING}) {
print qq{1..0 # SKIP these tests are for testing by the author\n};
exit
}
}
use strict;
use warnings;
use Test::Perl::Critic (-profile => "perlcritic.rc") x!! -e "perlcritic.rc";
all_critic_ok();
Progress-Any-Output-TermProgressBarColor-0.246/LICENSE 0000644 0001750 0001750 00000044053 13517624332 020103 0 ustar s1 s1 This software is copyright (c) 2019, 2018, 2017, 2016, 2015, 2014, 2013 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.
Terms of the Perl programming language system itself
a) the GNU General Public License as published by the Free
Software Foundation; either version 1, or (at your option) any
later version, or
b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
This software is Copyright (c) 2019, 2018, 2017, 2016, 2015, 2014, 2013 by perlancar@cpan.org.
This is free software, licensed under:
The GNU General Public License, Version 1, February 1989
GNU GENERAL PUBLIC LICENSE
Version 1, February 1989
Copyright (C) 1989 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. The
General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it.
You can use it for your programs, too.
When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
software, that you receive source code or can get it if you want it,
that you can change the software or use pieces of it in new free
programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of a such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must tell them their rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any program or other work which
contains a notice placed by the copyright holder saying it may be
distributed under the terms of this General Public License. The
"Program", below, refers to any such program or work, and a "work based
on the Program" means either the Program or any work containing the
Program or a portion of it, either verbatim or with modifications. Each
licensee is addressed as "you".
1. You may copy and distribute verbatim copies of the Program's source
code as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this
General Public License and to the absence of any warranty; and give any
other recipients of the Program a copy of this General Public License
along with the Program. You may charge a fee for the physical act of
transferring a copy.
2. You may modify your copy or copies of the Program or any portion of
it, and copy and distribute such modifications under the terms of Paragraph
1 above, provided that you also do the following:
a) cause the modified files to carry prominent notices stating that
you changed the files and the date of any change; and
b) cause the whole of any work that you distribute or publish, that
in whole or in part contains the Program or any part thereof, either
with or without modifications, to be licensed at no charge to all
third parties under the terms of this General Public License (except
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
Public License.
d) You may charge a fee for the physical act of transferring a
copy, and you may at your option offer warranty protection in
exchange for a fee.
Mere aggregation of another independent work with the Program (or its
derivative) on a volume of a storage or distribution medium does not bring
the other work under the scope of these terms.
3. You may copy and distribute the Program (or a portion or derivative of
it, under Paragraph 2) in object code or executable form under the terms of
Paragraphs 1 and 2 above provided that you also do one of the following:
a) accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of
Paragraphs 1 and 2 above; or,
b) accompany it with a written offer, valid for at least three
years, to give any third party free (except for a nominal charge
for the cost of distribution) a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of
Paragraphs 1 and 2 above; or,
c) accompany it with the information you received as to where the
corresponding source code may be obtained. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form alone.)
Source code for a work means the preferred form of the work for making
modifications to it. For an executable file, complete source code means
all the source code for all modules it contains; but, as a special
exception, it need not include source code for modules which are standard
libraries that accompany the operating system on which the executable
file runs, or for standard header files or definitions files that
accompany that operating system.
4. You may not copy, modify, sublicense, distribute or transfer the
Program except as expressly provided under this General Public License.
Any attempt otherwise to copy, modify, sublicense, distribute or transfer
the Program is void, and will automatically terminate your rights to use
the Program under this License. However, parties who have received
copies, or rights to use copies, from you under this General Public
License will not have their licenses terminated so long as such parties
remain in full compliance.
5. By copying, distributing or modifying the Program (or any work based
on the Program) you indicate your acceptance of this license to do so,
and all its terms and conditions.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these
terms and conditions. You may not impose any further restrictions on the
recipients' exercise of the rights granted herein.
7. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of the license which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software
Foundation.
8. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
Copyright (C) 19yy
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License. Of course, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
program `Gnomovision' (a program to direct compilers to make passes
at assemblers) written by James Hacker.
, 1 April 1989
Ty Coon, President of Vice
That's all there is to it!
--- The Artistic License 1.0 ---
This software is Copyright (c) 2019, 2018, 2017, 2016, 2015, 2014, 2013 by perlancar@cpan.org.
This is free software, licensed under:
The Artistic License 1.0
The Artistic License
Preamble
The intent of this document is to state the conditions under which a Package
may be copied, such that the Copyright Holder maintains some semblance of
artistic control over the development of the package, while giving the users of
the package the right to use and distribute the Package in a more-or-less
customary fashion, plus the right to make reasonable modifications.
Definitions:
- "Package" refers to the collection of files distributed by the Copyright
Holder, and derivatives of that collection of files created through
textual modification.
- "Standard Version" refers to such a Package if it has not been modified,
or has been modified in accordance with the wishes of the Copyright
Holder.
- "Copyright Holder" is whoever is named in the copyright or copyrights for
the package.
- "You" is you, if you're thinking about copying or distributing this Package.
- "Reasonable copying fee" is whatever you can justify on the basis of media
cost, duplication charges, time of people involved, and so on. (You will
not be required to justify it to the Copyright Holder, but only to the
computing community at large as a market that must bear the fee.)
- "Freely Available" means that no fee is charged for the item itself, though
there may be fees involved in handling the item. It also means that
recipients of the item may redistribute it under the same conditions they
received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications derived
from the Public Domain or from the Copyright Holder. A Package modified in such
a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way, provided that
you insert a prominent notice in each changed file stating how and when you
changed that file, and provided that you do at least ONE of the following:
a) place your modifications in the Public Domain or otherwise make them
Freely Available, such as by posting said modifications to Usenet or an
equivalent medium, or placing the modifications on a major archive site
such as ftp.uu.net, or by allowing the Copyright Holder to include your
modifications in the Standard Version of the Package.
b) use the modified Package only within your corporation or organization.
c) rename any non-standard executables so the names do not conflict with
standard executables, which must also be provided, and provide a separate
manual page for each non-standard executable that clearly documents how it
differs from the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
4. You may distribute the programs of this Package in object code or executable
form, provided that you do at least ONE of the following:
a) distribute a Standard Version of the executables and library files,
together with instructions (in the manual page or equivalent) on where to
get the Standard Version.
b) accompany the distribution with the machine-readable source of the Package
with your modifications.
c) accompany any non-standard executables with their corresponding Standard
Version executables, giving the non-standard executables non-standard
names, and clearly documenting the differences in manual pages (or
equivalent), together with instructions on where to get the Standard
Version.
d) make other distribution arrangements with the Copyright Holder.
5. You may charge a reasonable copying fee for any distribution of this
Package. You may charge any fee you choose for support of this Package. You
may not charge a fee for this Package itself. However, you may distribute this
Package in aggregate with other (possibly commercial) programs as part of a
larger (possibly commercial) software distribution provided that you do not
advertise this Package as a product of your own.
6. The scripts and library files supplied as input to or produced as output
from the programs of this Package do not automatically fall under the copyright
of this Package, but belong to whomever generated them, and may be sold
commercially, and may be aggregated with this Package.
7. C or perl subroutines supplied by you and linked into this Package shall not
be considered part of this Package.
8. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.
9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The End
Progress-Any-Output-TermProgressBarColor-0.246/dist.ini 0000644 0001750 0001750 00000001176 13517624332 020541 0 ustar s1 s1 version=0.246
name =Progress-Any-Output-TermProgressBarColor
[@Author::PERLANCAR]
:version=0.594
[Prereqs / TestRequires]
Capture::Tiny=0
Progress::Any::Output=0
Test::More=0.98
[Prereqs]
perl=5.010001
strict=0
warnings=0
Color::ANSI::Util=0.161
Monkey::Patch::Action=0.060
Progress::Any=0.214
;!lint_prereqs assume-used "parent module"
String::Elide::Parts=0.07
Text::ANSI::Util=0.22
[Prereqs / RuntimeSuggests]
Text::ANSI::WideUtil=0
[Prereqs / RuntimeRecommends]
; currently failing to build on Windows, so this is just a recommends
Term::Size=0
[Extras / lint-prereqs / assume-provided]
; windows-only
Win32::Console::ANSI=0