| 1 | package PMLTQ::Command::webdelete; | ||||||||||
| 2 | 1 | our $AUTHORITY = 'cpan:MATY'; | |||||||||
| 3 | 1 | $PMLTQ::Command::webdelete::VERSION = '2.0.3'; | |||||||||
| 4 | # ABSTRACT: Remove treebank from web interface | ||||||||||
| 5 | |||||||||||
| 6 | 1 | ▶ | use PMLTQ::Base 'PMLTQ::Command'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 0 | ▶ | has usage => sub { shift->extract_usage }; | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 9 | |||||||||||
| 10 | 0 | ▶ | sub run { | ||||||||
|
Subroutine
run: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 11 | 0 | my $self = shift; | |||||||||
| 12 | 0 | my $ua = $self->ua; | |||||||||
| 13 | 0 | $self->login($ua); | |||||||||
| 14 | 0 | my $json = JSON->new; | |||||||||
| 15 | 0 | my $treebank = $self->get_treebank($ua); | |||||||||
| 16 | 0 | ▶ | if($treebank) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 0 | $self->request_treebank($treebank,$ua,'DELETE'); | |||||||||
| 18 | } else { | ||||||||||
| 19 | 0 | print STDERR "Treebank '".$self->config->{title}."' is not at ".$self->config->{web_api}->{url}.".\n" | |||||||||
| 20 | } | ||||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | =head1 SYNOPSIS | ||||||||||
| 24 | |||||||||||
| 25 | pmltq webdelete <treebank_config> | ||||||||||
| 26 | |||||||||||
| 27 | =head1 DESCRIPTION | ||||||||||
| 28 | |||||||||||
| 29 | Remove treebank from web interface. | ||||||||||
| 30 | |||||||||||
| 31 | =head1 OPTIONS | ||||||||||
| 32 | |||||||||||
| 33 | =head1 PARAMS | ||||||||||
| 34 | |||||||||||
| 35 | =over 5 | ||||||||||
| 36 | |||||||||||
| 37 | =item B<treebank_config> | ||||||||||
| 38 | |||||||||||
| 39 | Path to configuration file. If a treebank_config is --, config is readed from STDIN. | ||||||||||
| 40 | |||||||||||
| 41 | =back | ||||||||||
| 42 | |||||||||||
| 43 | =cut | ||||||||||
| 44 | |||||||||||
| 45 | 1 | 1; | |||||||||