diff options
author | Joey Pabalinas <joeypabalinas@gmail.com> | 2018-07-31 14:37:12 -1000 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2018-08-07 17:01:29 +1200 |
commit | d45fd39c8453c5d2ce850410da9351eaa5393bcc (patch) | |
tree | d64d5210e3949d69c425f46051249bf8a8cac736 /Plugin/Source.pm | |
parent | 086fb2285810819e8c0553558c8c274804e91959 (diff) | |
download | idalius-d45fd39c8453c5d2ce850410da9351eaa5393bcc.tar.xz |
Source: Add source url command
Signed-off-by: Joey Pabalinas <joeypabalinas@gmail.com>
Diffstat (limited to 'Plugin/Source.pm')
-rw-r--r-- | Plugin/Source.pm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Plugin/Source.pm b/Plugin/Source.pm new file mode 100644 index 0000000..97434dd --- /dev/null +++ b/Plugin/Source.pm @@ -0,0 +1,24 @@ +#!/usr/bin/env perl + +package Plugin::Source; + +use strict; +use warnings; + +my %config; + +sub configure { + my $self = shift; + my $cmdref = shift; + my @source_commands = ("guts", "help", "source"); + $cmdref->($_, sub { $self->source(@_); }) for @source_commands; + return $self; +} + +sub source { + my ($self, $logger, $who, $where, $rest, @arguments) = @_; + my @urls = ("https://gitlab.com/dphillips/idalius"); + my $help_message = "My guts can be browsed at: "; + return $help_message . join " ", @urls; +} +1; |