| 1 | package Miril::App::Cmd::Command::publish; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | use autodie; | ||
| 6 | |||
| 7 | use Miril::App::Cmd -command; | ||
| 8 | |||
| 9 | use Class::Autouse; | ||
| 10 | Class::Autouse->autouse('Miril'); | ||
| 11 | |||
| 12 | sub opt_spec | ||
| 13 | { | ||
| 14 | return ( | ||
| 15 | [ 'dir|d=s', "miril base dir", { default => 'example' } ], | ||
| 16 | [ 'site|s=s', "website", { default => 'example.com' } ], | ||
| 17 | ); | ||
| 18 | } | ||
| 19 | |||
| 20 | sub execute | ||
| 21 | { | ||
| 22 | my ($self, $opt, $args) = @_; | ||
| 23 | |||
| 24 | my $miril = Miril->new($opt->dir, $opt->site); | ||
| 25 | $miril->publish; | ||
| 26 | } | ||
| 27 | |||
| 28 | 1; |