Data::Object::Config
Data-Object Package Configuration
use Data::Object::Config 'Core';
This package is used to configure the consuming package based on arguments passed to the import statement.
This package is used by both Do and Data::Object to configure the calling namespace.
package main; use Data::Object::Config 'Core'; fun main() { # ... } 1;
The core configuration enables strict, warnings, Perl's 5.14 features, and configures the core type library, method signatures, and autoboxing.
package App::Library; use Data::Object::Config 'Library'; our $User = declare 'User', as InstanceOf["App::User"]; 1;
The library configuration established a Type::Library compliant type library, as well as configuring Type::Utils in the calling package. Read more at Data::Object::Library.
package App::User; use Data::Object::Config 'Class'; has 'fname'; has 'lname'; 1;
The class configuration configures the calling package as a Moo class, having the "has", "with", and "extends" keywords available. Read more at Data::Object::Class.
package App::Queuer; use Data::Object::Config 'Role'; has 'queue'; method dequeue() { # ... } method enqueue($job) { # ... } 1;
The role configuration configures the calling package as a Moo role, having the "has", "with", and "extends" keywords available. Read more at Data::Object::Role.
package App::Queueable; use Data::Object::Config 'Rule'; requires 'dequeue'; requires 'enqueue'; 1;
The rule configuration configures the calling package as a Moo role, intended to be used to classify interfaces. Read more at Data::Object::Rule.
package App::Env; use Data::Object::Config 'State'; has 'vars'; has 'args'; has 'opts'; 1;
The state configuration configures the calling package as a singleton class with global state. Read more at Data::Object::State.
package App::Data; use Data::Object::Config 'Struct'; has 'auth'; has 'user'; has 'args'; 1;
The struct configuration configures the calling package as a class whose state becomes immutable after instantiation. Read more at Data::Object::Struct.
package App::Args; use Data::Object::Config 'Args'; method validate() { # ... } 1;
The args configuration configures the calling package as a class representation of the @ARGV variable. Read more at Data::Object::Args.
@ARGV
package App::Args; use Data::Object::Config 'Array'; method command() { return $self->get(0); } 1;
The array configuration configures the calling package as a class which extends the Array class. Read more at Data::Object::Array.
package App::Func; use Data::Object::Config 'Code'; around BUILD($args) { $self->$orig($args); # ... } 1;
The code configuration configures the calling package as a class which extends the Code class. Read more at Data::Object::Code.
package App::Cli; use Data::Object::Config 'Cli'; method main(%args) { # ... } 1;
The cli configuration configures the calling package as a class capable of acting as a command-line interface. Read more at Data::Object::Cli.
package App::Data; use Data::Object::Config 'Data'; method generate() { # ... } 1;
The data configuration configures the calling package as a class capable of parsing POD. Read more at Data::Object::Data.
package App::Amount; use Data::Object::Config 'Float'; method currency(Str $code) { # ... } 1;
The float configuration configures the calling package as a class which extends the Float class. Read more at Data::Object::Float.
package App::Data; use Data::Object::Config 'Hash'; method logline() { # ... } 1;
The hash configuration configures the calling package as a class which extends the Hash class. Read more at Data::Object::Hash.
package App::ID; use Data::Object::Config 'Number'; method find() { # ... } 1;
The number configuration configures the calling package as a class which extends the Number class. Read more at Data::Object::Number.
package App::Opts; use Data::Object::Config 'Opts'; method validate() { # ... } 1;
The opts configuration configures the calling package as a class representation of the command-line arguments. Read more at Data::Object::Opts.
package App::Path; use Data::Object::Config 'Regexp'; method match() { # ... } 1;
The regexp configuration configures the calling package as a class which extends the Regexp class. Read more at Data::Object::Regexp.
package App::OID; use Data::Object::Config 'Scalar'; method find() { # ... } 1;
The scalar configuration configures the calling package as a class which extends the Scalar class. Read more at Data::Object::Scalar.
package App::Title; use Data::Object::Config 'String'; method generate() { # ... } 1;
The string configuration configures the calling package as a class which extends the String class. Read more at Data::Object::String.
package App::Fail; use Data::Object::Config 'Undef'; method explain() { # ... } 1;
The undef configuration configures the calling package as a class which extends the Undef class. Read more at Data::Object::Undef.
package App::Vars; use Data::Object::Config 'Vars'; method config() { # ... } 1;
The vars configuration configures the calling package as a class representation of the %ENV variable. Read more at Data::Object::Vars.
%ENV
package App::Error; use Data::Object::Config 'Class'; use Data::Object::Config 'WithStashable'; 1;
The with configuration configures the calling package to consume the core role denoted in the name, e.g. the name WithStashable configures the package to consume the core role Data::Object::Role::Stashable. Using roles requires that the package have previously been declared a class or role itself.
WithStashable
This package uses type constraints defined by:
Data::Object::Library
This package implements the following functions.
choose(Str $arg1) : ArrayRef
The choose function returns the configuration (plans) based on the argument passed.
choose('class');
config(ArrayRef $arg1) : ArrayRef
The config function returns plans for configuring a package with the standard Data::Object setup.
my $plans = config;
config_array() : ArrayRef
The config_array function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Array.
my $plans = config_array;
config_base() : ArrayRef
The config_base function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Base.
my $plans = config_base;
config_class() : ArrayRef
The config_class function returns plans for configuring the package to be a Data::Object::Class.
my $plans = config_class;
config_cli() : ArrayRef
The config_cli function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Cli.
my $plans = config_cli;
config_code() : ArrayRef
The config_code function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Code.
my $plans = config_code;
config_dispatch() : ArrayRef
The config_dispatch function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Dispatch.
my $plans = config_dispatch;
config_exception() : ArrayRef
The config_exception function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Exception.
my $plans = config_exception;
config_float() : ArrayRef
The config_float function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Float.
my $plans = config_float;
config_hash() : ArrayRef
The config_hash function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Hash.
my $plans = config_hash;
config_library() : ArrayRef
The config_library function returns plans for configuring the package to be a Type::Library which extends Data::Object::Library with Type::Utils configured.
my $plans = config_library;
config_number() : ArrayRef
The config_number function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Number.
my $plans = config_number;
config_regexp() : ArrayRef
The config_regexp function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Regexp.
my $plans = config_regexp;
config_replace() : ArrayRef
The config_replace function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Replace.
my $plans = config_replace;
config_role() : ArrayRef
The config_role function returns plans for configuring the package to be a Data::Object::Role.
my $plans = config_role;
config_rule() : ArrayRef
The config_rule function returns plans for configuring a package to be a Data::Object::Rule.
my $plans = config_rule;
config_scalar() : ArrayRef
The config_scalar function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Scalar.
my $plans = config_scalar;
config_search() : ArrayRef
The config_search function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Search.
my $plans = config_search;
config_state() : ArrayRef
The config_state function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::State.
my $plans = config_state;
config_string() : ArrayRef
The config_string function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::String.
my $plans = config_string;
config_type() : ArrayRef
The config_type function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Type.
my $plans = config_type;
config_undef() : ArrayRef
The config_undef function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Undef.
my $plans = config_undef;
prepare(Str $arg1, Str $arg2) : ArrayRef
The prepare function returns configuration plans based on the arguments passed.
prepare($package, $type);
prepare_add(Str $arg1, Str $arg2) : ArrayRef
The prepare_add function returns an add-plan for the arguments passed.
prepare_add($package, $function);
prepare_call(Str $arg1, Any @args) : ArrayRef
The prepare_call function returns a call-plan for the arguments passed.
prepare_call($function, @args);
prepare_let(Str $arg1, Any @args) : ArrayRef
The prepare_let function returns a let-plan for the arguments passed.
prepare_let($package, @args);
prepare_use(Str $arg1, Any @args) : ArrayRef
The prepare_use function returns a use-plan for the arguments passed.
prepare_use($package, @args);
process(Str $arg1, ArrayRef $arg2) : Any
The process function executes a series of plans on behalf of the caller.
process($caller, $plans);
process_add(Str $arg1, ArrayRef $arg2) : Any
The process_add function executes the add-plan on behalf of the caller.
process_add($caller, $plan);
process_call(Str $arg1, ArrayRef $arg2) : Any
The process_call function executes the call-plan on behalf of the caller.
process_call($caller, $plan);
process_let(Str $arg1, ArrayRef $arg2) : Any
The process_let function executes the let-plan on behalf of the caller.
process_let($caller, $plan);
process_use(Str $arg1, ArrayRef $arg2) : Any
The process_use function executes the use-plan on behalf of the caller.
process_use($caller, $plan);
subject(Str $arg1, Str $arg2) : Int
The subject function returns truthy if both arguments match alphanumerically (not case-sensitive).
subject('Role', 'Role');
This package implements the following methods.
config_args() : ArrayRef
The config_args function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Args.
my $plans = config_args;
config_core() : ArrayRef
The config_core function returns plans for configuring the package to have the Data::Object framework default configuration.
my $plans = config_core;
config_data() : ArrayRef
The config_data function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Data.
my $plans = config_data;
config_opts() : ArrayRef
The config_opts function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Opts.
my $plans = config_opts;
config_space() : ArrayRef
The config_space function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Space.
my $plans = config_space;
config_struct() : ArrayRef
The config_struct function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Struct.
my $plans = config_struct;
config_vars() : ArrayRef
The config_vars function returns plans for configuring the package to be a Data::Object::Class which extends Data::Object::Vars.
my $plans = config_vars;
config_withdumpable() : ArrayRef
The config_withdumpable function returns plans for configuring the package to consume the Data::Object::Role::Dumbable role.
my $plans = config_withdumpable;
config_withimmutable() : ArrayRef
The config_withimmutable function returns plans for configuring the package to consume the Data::Object::Role::Immutable role.
my $plans = config_withimmutable;
config_withproxyable() : ArrayRef
The config_withproxyable function returns plans for configuring the package to consume the Data::Object::Role::Proxyable role.
my $plans = config_withproxyable;
config_withstashable() : ArrayRef
The config_withstashable function returns plans for configuring the package to consume the Data::Object::Role::Stashable role.
my $plans = config_withstashable;
config_withthrowable() : ArrayRef
The config_withthrowable function returns plans for configuring the package to consume the Data::Object::Role::Throwable role.
my $plans = config_withthrowable;
config_withtryable() : ArrayRef
The config_withtryable function returns plans for configuring the package to consume the Data::Object::Role::Tryable role.
my $plans = config_withtryable;
Al Newkirk, +309
+309
Anthony Brummett, +10
+10
Adam Hopkins, +2
+2
José Joaquín Atria, +1
+1
Al Newkirk, awncorp@cpan.org
awncorp@cpan.org
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Wiki
Project
Initiatives
Milestones
Contributing
Issues
To get the most out of this distribution, consider reading the following:
Do
Data::Object
Data::Object::Class
Data::Object::ClassHas
Data::Object::Role
Data::Object::RoleHas
To install Do, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Do
CPAN shell
perl -MCPAN -e shell install Do
For more information on module installation, please visit the detailed CPAN module installation guide.