NAME
Taskwarrior::Kusarigama::Hook - Entry-point for Kusarigama's hook scripts
VERSION
version 0.12.0
SYNOPSIS
# most likely in one of the ~/.task/hooks/on-xxx.pl scripts
use Taskwarrior::Kusarigama::Hook;
Taskwarrior::Kusarigama::Hook->new(
raw_args => \@ARGV
)->run_event( 'launch' );
DESCRIPTION
This is the entry point for kusarigama when running it as a Taskwarrior hook.
METHODS
new
my $kusarigama = Taskwarrior::Kusarigama::Hook->new(
raw_args => [],
);
Constructor. Recognizes the following arguments
- raw_args
-
Reference to the list of arguments as passed to the taskwarrior hooks.
- exit_on_failure
-
If the system should exit with an error code when one of the plugin throws an exception (and thus abort the executiong of the remaining of the taskwarrior pipeline).
Defaults to
true
.
config
my $config = $kusarigama->config;
Returns taskwarrior's configuration as task show
would.
run_event
$kusarigama->run_event( 'launch' );
Runs all plugins associated with the provided stage.
If exit_on_failure
is true, it will die if a plugin throws an exception.
run_exit
$kusarigama->run_exit;
Runs the exit stage part of the plugins.
run_launch
$kusarigama->run_launch;
Runs the launch stage part of the plugins. Also intercepts and run custom commands.
run_add
$kusarigama->run_add;
Runs the add stage part of the plugins.
run_modify
$kusarigama->run_modify;
Runs the modify stage part of the plugins.
AUTHOR
Yanick Champoux <yanick@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2019, 2018, 2017 by Yanick Champoux.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.