WebService::ProfitBricks::Class - Class helper functions
This is a module exporting some helper functions to ease the creation of objects.
package My::Pkg; use WebService::ProfitBricks::Class; has_many foo => "My::Foo"; belongs_to file => "My::File"; # the constructor, to extend the provided constructor. sub construct { my ($self, @data) = @_; }
A common constructor. It accepts an hash (key, values pairs) and stores this hash. If you need to do more, you can create a function construct.
Create a relations to $class over $what.
Creates a backward relaion to $class.
Create a class attribute $attr.
Create multiple attributes for the class.
Sets a serializer for the class.
This will create a method $class->to_$type([%data]).
To install WebService::ProfitBricks, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::ProfitBricks
CPAN shell
perl -MCPAN -e shell install WebService::ProfitBricks
For more information on module installation, please visit the detailed CPAN module installation guide.