GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
OpenXPKI::Server::API2::EasyPluginMetaClassTrait(3) User Contributed Perl Documentation OpenXPKI::Server::API2::EasyPluginMetaClassTrait(3)

OpenXPKI::Server::API2::EasyPluginMetaClassTrait - Moose metaclass role (aka. "trait") for API plugins

Not intended for direct use. Please "use OpenXPKI::Server::API2::EasyPlugin;" instead.

This role manages API parameters and their specifications for the API plugin classes. It will be applied when you say "use OpenXPKI::Server::API2::EasyPlugin".

Returns a HashRef: keys are the API command names and values the auto-generated parameter classes of type Moose::Meta::Class.

Returns a list with all API command names defined by the API plugin.

Adds parameter specifications for the given API command.

A new Moose::Meta::Class is created with the name ${command}_ParamObject. Attributes are added to the class that will hold the API command parameters. Type constraints specified via 'matching' are created and attached to the attributes.

Parameters

  • $command - API command name
  • $param_specs - parameter specification HashRef

    Keys are parameter names that will be turned into Moose attributes of a newly generated container class (type Moose::Meta::Class).

    Values are HashRefs with the attribute options (extended version of Moose's has keyword options).

    For more details please see "command" in OpenXPKI::Server::API2::EasyPlugin.

Wraps the given command parameters into an instance of an auto-generated parameter class.

All parameters will be available as Moose attributes.

Example:

    my $po = $plugin->meta->new_param_object("doit", { fish => 'cod', size => 55 });
    printf "%s: %s\n", $po->fish, $po->size;

A Moose::Exception::ValidationFailedForTypeConstraint will be thrown if a parameter does not fulfill the type constraints specified in the call to add_param_specs.

Parameters

  • $command - API command name
  • $params - parameter HashRef
2022-05-14 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.