App-repeat
view release on metacpan or search on metacpan
0.006 2024-12-10 Released-By: PERLANCAR; Urgency: medium
- [ux][experimental] Add shorter alias commands: 2x, 3x, 4x, 5x,
twice, 2times.
0.005 2024-12-06 Released-By: PERLANCAR; Urgency: low
- Make dependency to DateTime::Format::Natural optional.
0.004 2024-12-06 Released-By: PERLANCAR; Urgency: medium; Backward-Incompatible: yes
- [incompatible change] Rename --until to --until-time, --bail to
--until-fail; add --until-success.
0.003 2024-12-06 Released-By: PERLANCAR; Urgency: medium; Backward-Incompatible: yes
"runtime" : {
"requires" : {
"Getopt::Long::Less" : "0",
"Log::ger" : "0.038",
"Time::HiRes" : "0",
"perl" : "5.010001",
"strict" : "0",
"warnings" : "0"
},
"suggests" : {
"DateTime::Format::Natural" : "0"
}
},
"test" : {
"requires" : {
"File::Spec" : "0",
"IO::Handle" : "0",
"IPC::Open3" : "0",
"Test::More" : "0"
}
}
[Prereqs]
perl=5.010001
strict=0
warnings=0
Getopt::Long::Less=0
Log::ger=0.038
Time::HiRes=0
[Prereqs / RuntimeSuggests]
DateTime::Format::Natural=0
script/2times view on Meta::CPAN
dry_run => 0,
dry_run_delay => 0,
);
my $Exit_Code = 0;
sub parse_cmdline {
my $res = GetOptions(
'n=i' => \$Opts{n},
'until-time=s' => sub {
require DateTime::Format::Natural;
my $dt = DateTime::Format::Natural->new->parse_datetime($_[1]);
warn "TZ is not set!" unless $ENV{TZ};
$dt->set_time_zone($ENV{TZ});
log_debug "--until-time is set to %s (%.3f)", "$dt", $dt->epoch;
$Opts{until_time} = $dt->epoch;
},
'max=i' => \$Opts{max},
'delay|d=f' => \$Opts{delay},
'delay-min=f' => \$Opts{delay_min},
'delay-max=f' => \$Opts{delay_max},
script/2times view on Meta::CPAN
=item * --help, -h, -?
=item * -n
Uint. Number of times to run the command. Alternatively, you can use
C<--until-time> (with optional C<--max>) instead.
=item * --until-time
String representation of time. Will be parsed using
L<DateTime::Format::Natural>. Alternatively, you can use C<-n> instead.
Note that dependency to L<DateTime::Format::Natural> is declared optionally
(RuntimeSuggests). You need to install the module first if you want to use
C<--until-time>.
=item * --max
Uint. When C<--until-time> is specified, specify maximum number of repetition.
=item * --delay, -d
Float. Number of seconds to delay between running a command. Alternatively, you
dry_run => 0,
dry_run_delay => 0,
);
my $Exit_Code = 0;
sub parse_cmdline {
my $res = GetOptions(
'n=i' => \$Opts{n},
'until-time=s' => sub {
require DateTime::Format::Natural;
my $dt = DateTime::Format::Natural->new->parse_datetime($_[1]);
warn "TZ is not set!" unless $ENV{TZ};
$dt->set_time_zone($ENV{TZ});
log_debug "--until-time is set to %s (%.3f)", "$dt", $dt->epoch;
$Opts{until_time} = $dt->epoch;
},
'max=i' => \$Opts{max},
'delay|d=f' => \$Opts{delay},
'delay-min=f' => \$Opts{delay_min},
'delay-max=f' => \$Opts{delay_max},
=item * --help, -h, -?
=item * -n
Uint. Number of times to run the command. Alternatively, you can use
C<--until-time> (with optional C<--max>) instead.
=item * --until-time
String representation of time. Will be parsed using
L<DateTime::Format::Natural>. Alternatively, you can use C<-n> instead.
Note that dependency to L<DateTime::Format::Natural> is declared optionally
(RuntimeSuggests). You need to install the module first if you want to use
C<--until-time>.
=item * --max
Uint. When C<--until-time> is specified, specify maximum number of repetition.
=item * --delay, -d
Float. Number of seconds to delay between running a command. Alternatively, you
dry_run => 0,
dry_run_delay => 0,
);
my $Exit_Code = 0;
sub parse_cmdline {
my $res = GetOptions(
'n=i' => \$Opts{n},
'until-time=s' => sub {
require DateTime::Format::Natural;
my $dt = DateTime::Format::Natural->new->parse_datetime($_[1]);
warn "TZ is not set!" unless $ENV{TZ};
$dt->set_time_zone($ENV{TZ});
log_debug "--until-time is set to %s (%.3f)", "$dt", $dt->epoch;
$Opts{until_time} = $dt->epoch;
},
'max=i' => \$Opts{max},
'delay|d=f' => \$Opts{delay},
'delay-min=f' => \$Opts{delay_min},
'delay-max=f' => \$Opts{delay_max},
=item * --help, -h, -?
=item * -n
Uint. Number of times to run the command. Alternatively, you can use
C<--until-time> (with optional C<--max>) instead.
=item * --until-time
String representation of time. Will be parsed using
L<DateTime::Format::Natural>. Alternatively, you can use C<-n> instead.
Note that dependency to L<DateTime::Format::Natural> is declared optionally
(RuntimeSuggests). You need to install the module first if you want to use
C<--until-time>.
=item * --max
Uint. When C<--until-time> is specified, specify maximum number of repetition.
=item * --delay, -d
Float. Number of seconds to delay between running a command. Alternatively, you
dry_run => 0,
dry_run_delay => 0,
);
my $Exit_Code = 0;
sub parse_cmdline {
my $res = GetOptions(
'n=i' => \$Opts{n},
'until-time=s' => sub {
require DateTime::Format::Natural;
my $dt = DateTime::Format::Natural->new->parse_datetime($_[1]);
warn "TZ is not set!" unless $ENV{TZ};
$dt->set_time_zone($ENV{TZ});
log_debug "--until-time is set to %s (%.3f)", "$dt", $dt->epoch;
$Opts{until_time} = $dt->epoch;
},
'max=i' => \$Opts{max},
'delay|d=f' => \$Opts{delay},
'delay-min=f' => \$Opts{delay_min},
'delay-max=f' => \$Opts{delay_max},
=item * --help, -h, -?
=item * -n
Uint. Number of times to run the command. Alternatively, you can use
C<--until-time> (with optional C<--max>) instead.
=item * --until-time
String representation of time. Will be parsed using
L<DateTime::Format::Natural>. Alternatively, you can use C<-n> instead.
Note that dependency to L<DateTime::Format::Natural> is declared optionally
(RuntimeSuggests). You need to install the module first if you want to use
C<--until-time>.
=item * --max
Uint. When C<--until-time> is specified, specify maximum number of repetition.
=item * --delay, -d
Float. Number of seconds to delay between running a command. Alternatively, you
dry_run => 0,
dry_run_delay => 0,
);
my $Exit_Code = 0;
sub parse_cmdline {
my $res = GetOptions(
'n=i' => \$Opts{n},
'until-time=s' => sub {
require DateTime::Format::Natural;
my $dt = DateTime::Format::Natural->new->parse_datetime($_[1]);
warn "TZ is not set!" unless $ENV{TZ};
$dt->set_time_zone($ENV{TZ});
log_debug "--until-time is set to %s (%.3f)", "$dt", $dt->epoch;
$Opts{until_time} = $dt->epoch;
},
'max=i' => \$Opts{max},
'delay|d=f' => \$Opts{delay},
'delay-min=f' => \$Opts{delay_min},
'delay-max=f' => \$Opts{delay_max},
=item * --help, -h, -?
=item * -n
Uint. Number of times to run the command. Alternatively, you can use
C<--until-time> (with optional C<--max>) instead.
=item * --until-time
String representation of time. Will be parsed using
L<DateTime::Format::Natural>. Alternatively, you can use C<-n> instead.
Note that dependency to L<DateTime::Format::Natural> is declared optionally
(RuntimeSuggests). You need to install the module first if you want to use
C<--until-time>.
=item * --max
Uint. When C<--until-time> is specified, specify maximum number of repetition.
=item * --delay, -d
Float. Number of seconds to delay between running a command. Alternatively, you
script/repeat view on Meta::CPAN
dry_run => 0,
dry_run_delay => 0,
);
my $Exit_Code = 0;
sub parse_cmdline {
my $res = GetOptions(
'n=i' => \$Opts{n},
'until-time=s' => sub {
require DateTime::Format::Natural;
my $dt = DateTime::Format::Natural->new->parse_datetime($_[1]);
warn "TZ is not set!" unless $ENV{TZ};
$dt->set_time_zone($ENV{TZ});
log_debug "--until-time is set to %s (%.3f)", "$dt", $dt->epoch;
$Opts{until_time} = $dt->epoch;
},
'max=i' => \$Opts{max},
'delay|d=f' => \$Opts{delay},
'delay-min=f' => \$Opts{delay_min},
'delay-max=f' => \$Opts{delay_max},
script/repeat view on Meta::CPAN
=item * --help, -h, -?
=item * -n
Uint. Number of times to run the command. Alternatively, you can use
C<--until-time> (with optional C<--max>) instead.
=item * --until-time
String representation of time. Will be parsed using
L<DateTime::Format::Natural>. Alternatively, you can use C<-n> instead.
Note that dependency to L<DateTime::Format::Natural> is declared optionally
(RuntimeSuggests). You need to install the module first if you want to use
C<--until-time>.
=item * --max
Uint. When C<--until-time> is specified, specify maximum number of repetition.
=item * --delay, -d
Float. Number of seconds to delay between running a command. Alternatively, you
script/twice view on Meta::CPAN
dry_run => 0,
dry_run_delay => 0,
);
my $Exit_Code = 0;
sub parse_cmdline {
my $res = GetOptions(
'n=i' => \$Opts{n},
'until-time=s' => sub {
require DateTime::Format::Natural;
my $dt = DateTime::Format::Natural->new->parse_datetime($_[1]);
warn "TZ is not set!" unless $ENV{TZ};
$dt->set_time_zone($ENV{TZ});
log_debug "--until-time is set to %s (%.3f)", "$dt", $dt->epoch;
$Opts{until_time} = $dt->epoch;
},
'max=i' => \$Opts{max},
'delay|d=f' => \$Opts{delay},
'delay-min=f' => \$Opts{delay_min},
'delay-max=f' => \$Opts{delay_max},
script/twice view on Meta::CPAN
=item * --help, -h, -?
=item * -n
Uint. Number of times to run the command. Alternatively, you can use
C<--until-time> (with optional C<--max>) instead.
=item * --until-time
String representation of time. Will be parsed using
L<DateTime::Format::Natural>. Alternatively, you can use C<-n> instead.
Note that dependency to L<DateTime::Format::Natural> is declared optionally
(RuntimeSuggests). You need to install the module first if you want to use
C<--until-time>.
=item * --max
Uint. When C<--until-time> is specified, specify maximum number of repetition.
=item * --delay, -d
Float. Number of seconds to delay between running a command. Alternatively, you
( run in 0.408 second using v1.01-cache-2.11-cpan-05444aca049 )