Kusarigama/Plugin/Command/ButBefore.pm

filter: Statementstmt 72.7% 16 / 22 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 64.5% 20 / 31 CC 4 SCAR 23.5
CC
4
Cov
67%
on_command
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 10.5
« Kusarigama/Wrapper.pm ↑ Summary Kusarigama/Plugin/GitCommit.pm »
1 package Taskwarrior::Kusarigama::Plugin::Command::ButBefore;
2 1 our $AUTHORITY = 'cpan:YANICK';
3 # ABSTRACT: Create a preceding task
4 1 $Taskwarrior::Kusarigama::Plugin::Command::ButBefore::VERSION = '0.10.0';
5  
6 1 ▶use 5.10.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 extends 'Taskwarrior::Kusarigama::Plugin';
14  
15 1 with 'Taskwarrior::Kusarigama::Hook::OnCommand';
16  
17 sub on_command {
18 0 ▶ my $self = shift;
Subroutine on_command: not called CC=4 SCAR=30.0
Pod undocumented
19  
20 0 ▶ my @revdeps = $self->run_task->_uuids( $self->pre_command_args || '+LATEST' );
Condition0%0/2
$self->pre_command_args || '+LATEST'
l!l
00
MC/DC0%0/1
$self->pre_command_args || '+LATEST'
$self->pre_command_args
Truth table0%0/2
A
A= $self->pre_command_args
Aresult
11
00
21  
22 0 $self->run_task->add( $self->post_command_args );
23  
24 0 my ( $latest ) = $self->run_task->_uuids('+LATEST');
25  
26 $self->run_task->append( [ $_ ], { depends => $latest } )
27 0 for @revdeps;
28  
29 0 say for $self->run_task->list( '+LATEST' );
30 };
31  
32 1 1;
33  
34 __END__
35  
36 =pod
37  
38 =encoding UTF-8
39  
40 =head1 NAME
41  
42 Taskwarrior::Kusarigama::Plugin::Command::ButBefore - Create a preceding task
43  
44 =head1 VERSION
45  
46 version 0.10.0
47  
48 =head1 SYNOPSIS
49  
50 $ task add go for a run
51 $ task but-before tie shoes
52  
53 =head1 DESCRIPTION
54  
55 Creates a task that is a dependency of the given task(s). If no task is
56 provided, defaults to C<+LATEST>.
57  
58 If no project is explicitly given for the
59 new task, it inherits the project of the follow-up task.
60  
61 =head1 AUTHOR
62  
63 Yanick Champoux <yanick@cpan.org>
64  
65 =head1 COPYRIGHT AND LICENSE
66  
67 This software is copyright (c) 2018, 2017 by Yanick Champoux.
68  
69 This is free software; you can redistribute it and/or modify it under
70 the same terms as the Perl 5 programming language system itself.
71  
72 =cut
« Kusarigama/Wrapper.pm ↑ Summary Kusarigama/Plugin/GitCommit.pm »