Taskwarrior::Kusarigama::Hook::OnCommand - Role for plugins implementing custom commands
version 0.6.0
package Taskwarrior::Kusarigama::Plugin::Command::Foo; use Moo; extends 'Taskwarrior::Kusarigama::Hook'; with 'Taskwarrior::Kusarigama::Hook::OnCommand'; sub on_command { say "running foo"; } 1;
Role consumed by plugins implementing a custom command.
Requires that a on_command is implemented.
on_command
By default, the command name is the name of the package minus its Taskwarrior::Kusarigama::Plugin::Command:: prefix, but it can be modified via the command_name attribute.
Taskwarrior::Kusarigama::Plugin::Command::
command_name
package MyCustom::Command; use Moo; extends 'Taskwarrior::Kusarigama::Hook'; with 'Taskwarrior::Kusarigama::Hook::OnCommand'; # will intercept `task custom-command` has '+command_name' => ( default => sub { return 'custom-command' }, ); sub on_command { ... };
Yanick Champoux <yanick@cpan.org>
This software is copyright (c) 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.
To install Taskwarrior::Kusarigama, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Taskwarrior::Kusarigama
CPAN shell
perl -MCPAN -e shell install Taskwarrior::Kusarigama
For more information on module installation, please visit the detailed CPAN module installation guide.