File Coverage

blib/lib/Taskwarrior/Kusarigama/Hook/OnExit.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package Taskwarrior::Kusarigama::Hook::OnExit;
2             our $AUTHORITY = 'cpan:YANICK';
3             #ABSTRACT: Role for plugins running during the exit stage
4             $Taskwarrior::Kusarigama::Hook::OnExit::VERSION = '0.12.0';
5 1     1   568 use strict;
  1         2  
  1         27  
6 1     1   6 use warnings;
  1         2  
  1         24  
7              
8              
9 1     1   5 use Moo::Role;
  1         2  
  1         6  
10              
11             requires 'on_exit';
12              
13             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.12.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) 2019, 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