Skip to content

Instantly share code, notes, and snippets.

@hoelzro
Created June 22, 2014 14:46
Show Gist options
  • Save hoelzro/d552753137568ac5285c to your computer and use it in GitHub Desktop.
Save hoelzro/d552753137568ac5285c to your computer and use it in GitHub Desktop.
use v6;
use Test;
use App::Subcommander;
plan 1;
my $exception;
try {
my class App does App::Subcommander {
method foo is subcommand('duplicate') {}
method bar is subcommand('duplicate') {}
}
CATCH { default { $exception = $_ } }
}
say App::Subcommander.HOW;
ok $exception.defined, 'Trying to define duplicate command names should fail';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment