Kusarigama/Hook/OnExit.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 16 / 16 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Kusarigama/Hook/OnCommand.pm ↑ Summary Kusarigama/Hook/OnLaunch.pm »
1 package Taskwarrior::Kusarigama::Hook::OnExit;
2 3 our $AUTHORITY = 'cpan:YANICK';
3 #ABSTRACT: Role for plugins running during the exit stage
4 3 $Taskwarrior::Kusarigama::Hook::OnExit::VERSION = '0.10.0';
5 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8  
9 3 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 3 requires 'on_exit';
12  
13 3 1;
14  
15 __END__
16  
17 =pod
18  
19 =encoding UTF-8
20  
21 =head1 NAME
22  
23 Taskwarrior::Kusarigama::Hook::OnExit - Role for plugins running during the exit stage
24  
25 =head1 VERSION
26  
27 version 0.10.0
28  
29 =head1 SYNOPSIS
30  
31 package Taskwarrior::Kusarigama::Plugin::Foo;
32  
33 use Moo;
34  
35 extends 'Taskwarrior::Kusarigama::Hook';
36  
37 with 'Taskwarrior::Kusarigama::Hook::OnExit';
38  
39 sub on_exit {
40 say "exiting taskwarrior";
41 }
42  
43 1;
44  
45 =head1 DESCRIPTION
46  
47 Role consumed by plugins running during the exit stage of
48 the Taskwarrior hook lifecycle.
49  
50 Requires that a C<on_exit> is implemented.
51  
52 The C<on_exit> method, when invoked, will be
53 given the list of tasks associated with the command.
54  
55 sub on_exit {
56 my( $self, @tasks ) = @_;
57  
58 ...
59 }
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/Hook/OnCommand.pm ↑ Summary Kusarigama/Hook/OnLaunch.pm »