| 1 | package Taskwarrior::Kusarigama::Plugin::Command::Wait; | ||||||||||||
| 2 | 1 | our $AUTHORITY = 'cpan:YANICK'; | |||||||||||
| 3 | # ABSTRACT: hide tasks for a wee while | ||||||||||||
| 4 | 1 | $Taskwarrior::Kusarigama::Plugin::Command::Wait::VERSION = '0.11.0'; | |||||||||||
| 5 | |||||||||||||
| 6 | 1 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | 1 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | |||||||||||||
| 9 | 1 | ▶ | use Moo; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 10 | |||||||||||||
| 11 | 1 | extends 'Taskwarrior::Kusarigama::Plugin'; | |||||||||||
| 12 | |||||||||||||
| 13 | 1 | with 'Taskwarrior::Kusarigama::Hook::OnCommand'; | |||||||||||
| 14 | |||||||||||||
| 15 | sub on_command { | ||||||||||||
| 16 | 0 | ▶ | my $self = shift; | ||||||||||
|
Subroutine
on_command: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||
| 17 | |||||||||||||
| 18 | 0 | my $args = $self->args; | |||||||||||
| 19 | 0 | ▶ | $args =~ s/wait\s*(.*)/ 'mod wait:' . ($1 || '1day')/e; | ||||||||||
|
Condition0%0/2
$1 || '1day'
MC/DC0%0/1
$1 || '1day'
$1
Truth table0%0/2
A
A= $1
| |||||||||||||
| 20 | |||||||||||||
| 21 | 0 | system $args; | |||||||||||
| 22 | }; | ||||||||||||
| 23 | |||||||||||||
| 24 | 1 | 1; | |||||||||||
| 25 | |||||||||||||
| 26 | __END__ | ||||||||||||
| 27 | |||||||||||||
| 28 | =pod | ||||||||||||
| 29 | |||||||||||||
| 30 | =encoding UTF-8 | ||||||||||||
| 31 | |||||||||||||
| 32 | =head1 NAME | ||||||||||||
| 33 | |||||||||||||
| 34 | Taskwarrior::Kusarigama::Plugin::Command::Wait - hide tasks for a wee while | ||||||||||||
| 35 | |||||||||||||
| 36 | =head1 VERSION | ||||||||||||
| 37 | |||||||||||||
| 38 | version 0.11.0 | ||||||||||||
| 39 | |||||||||||||
| 40 | =head1 SYNOPSIS | ||||||||||||
| 41 | |||||||||||||
| 42 | $ task 123 wait 3d | ||||||||||||
| 43 | |||||||||||||
| 44 | =head1 DESCRIPTION | ||||||||||||
| 45 | |||||||||||||
| 46 | If not provided, the waiting time defaults to one day. | ||||||||||||
| 47 | |||||||||||||
| 48 | =head1 AUTHOR | ||||||||||||
| 49 | |||||||||||||
| 50 | Yanick Champoux <yanick@cpan.org> | ||||||||||||
| 51 | |||||||||||||
| 52 | =head1 COPYRIGHT AND LICENSE | ||||||||||||
| 53 | |||||||||||||
| 54 | This software is copyright (c) 2018, 2017 by Yanick Champoux. | ||||||||||||
| 55 | |||||||||||||
| 56 | This is free software; you can redistribute it and/or modify it under | ||||||||||||
| 57 | the same terms as the Perl 5 programming language system itself. | ||||||||||||
| 58 | |||||||||||||
| 59 | =cut | ||||||||||||