NAME

Pluto::Engine

ABSTRACT

Functional Scripting for Perl 5

SYNOPSIS

package Example;

use Pluto::Engine;

my $engine = Pluto::Engine->new(
  package => 'example',
  config => { tempdir => { package => 'File/Temp' } },
);

DESCRIPTION

This package provides an engine for resolving dependencies and dispatching function calls, enabling a functional programming environment for Perl 5. See Rewire for more information on dependency injection.

LIBRARIES

This package uses type constraints from:

Types::Standard

ATTRIBUTES

This package has the following attributes:

config

config(HashRef)

This attribute is read-only, accepts (HashRef) values, and is optional.

library

library(Object)

This attribute is read-only, accepts (Object) values, and is optional.

package

package(Str)

This attribute is read-only, accepts (Str) values, and is required.

services

services(Object)

This attribute is read-only, accepts (Object) values, and is optional.

space

space(Object)

This attribute is read-only, accepts (Object) values, and is optional.

METHODS

This package implements the following methods:

call

call(Str | Object $invocant, Str $routine, Any @arguments) : Any

The call method dispatches a routine call.

call example #1
# given: synopsis

$engine->call('File::Temp', 'new', 'File::Temp');

AUTHOR

Al Newkirk, awncorp@cpan.org

LICENSE

Copyright (C) 2011-2019, Al Newkirk, et al.

This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".

PROJECT

Wiki

Project

Initiatives

Milestones

Contributing

Issues