summaryrefslogtreecommitdiffstats
path: root/lib/App/Hiveminder/Command/Upload.pm
blob: f425c8a3bd86777fe277c6490d30c0ac795b2449 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl
package App::Hiveminder::Command::Upload;
use Moose;
extends 'App::Hiveminder::Command';

=head2 NAME

App::Hiveminder::Command::Upload - Upload a previously downloaded file back to your todo list

=cut

sub command_names { qw/upload up ul/ }

sub command {
    my $self = shift;

    return unless @_ > 0;
    my $filename = shift;
    $self->hm->upload_file($filename);
    return $filename;
}

__PACKAGE__->meta()->make_immutable();
1;