Skip to content
Snippets Groups Projects
Commit b7a21675 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

drop usage of experimental switch feature

parent 960669b1
Branches
Tags
No related merge requests found
...@@ -4,8 +4,6 @@ use strict; ...@@ -4,8 +4,6 @@ use strict;
use warnings; use warnings;
use utf8; use utf8;
use lib qw(@modulesdir@); use lib qw(@modulesdir@);
use feature "switch";
no if $] >= 5.017011, warnings => 'experimental::smartmatch';
use Config::Tiny; use Config::Tiny;
use Data::Dumper; use Data::Dumper;
...@@ -62,21 +60,19 @@ AccountManager::DB->register_db( ...@@ -62,21 +60,19 @@ AccountManager::DB->register_db(
my $db = AccountManager::DB->new(); my $db = AccountManager::DB->new();
for ($action) { SWITCH: {
when ('add_account') { add_account() } if ($action eq 'add_account') { add_account(); last SWITCH; }
when ('list_accounts') { list_accounts() } if ($action eq 'list_accounts') { list_account(); last SWITCH; }
when ('add_service') { add_service() } if ($action eq 'add_service') { add_service(); last SWITCH; }
when ('list_services') { list_services() } if ($action eq 'list_services') { list_services(); last SWITCH; }
when ('add_token') { add_token() } if ($action eq 'add_token') { add_token(); last SWITCH; }
when ('get_token') { get_token() } if ($action eq 'get_token') { get_token(); last SWITCH; }
when ('list_tokens') { list_tokens() } if ($action eq 'list_tokens') { list_tokens(); last SWITCH; }
when ('parse_metadata') { parse_metadata() } if ($action eq 'parse_metadata') { parse_metadata(); last SWITCH; }
default { pod2usage(
pod2usage( -message => "invalid action '$action', aborting\n",
-message => "invalid action '$action', aborting\n", -verbose => 0
-verbose => 0 );
);
}
} }
sub add_account { sub add_account {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment