NAME

Dancer2::RPCPlugin::PluginNames - Register Dancer2::Plugin::RPC plugin-names

SYNOPSIS

use Dancer2::RPCPlugin::PluginNames;
my $pt = Dancer2::RPCPlugin::PluginNames->new();

say "Plugin: $_" for $pt->names;

if ($my_name =~ $pt->regex) {
    say "$my_name is a registered plugin-name";
}

DESCRIPTION

Dancer2::RPCPlugin::PluginNames->new(@names)

Returns a singleton-object of this class.

Arguments

List of names or none.

$pn->add_names(@names)

Adds the names given to the singleton-object and returns that.

$pn->names

Returns a list of registered plugin-names ordered by:

1. length of the name
2. ASCII-betical

$pn->regex

Returns a Regexp object with all the names as alternatives.

COPYRIGHT

© MMXXII - Abe Timmerman <abetim@cpan.org>