MooX::MethodProxyArgs(3pm)

MooX::MethodProxyArgs3pm

Invoke code to populate static arguments.

Usage

    package Foo;
    use Moo;
    with 'MooX::MethodProxyArgs';
    has bar => (
        is => 'ro',
    );
    
    package main;
    
    sub divide {
        my ($class, $number, $divisor) = @_;
        return $number / $divisor;
    }
    
    my $foo = Foo->new( bar => ['$proxy', 'main', 'divide', 10, 2 ] );
    
    print $foo->bar(); # 5

Overview

This module munges the class's input arguments by replacing any method proxy values found with the result of calling the methods.

This is done using Data::MethodProxy. See that module for more information on how method proxies work.

Support

See "SUPPORT" in MooX::BuildArgs.

Releases

5 releases since Debian 9 (Stretch); the text changed 3 times.

  1. 9
  2. 10
  3. 11–12
  4. 13

Authors

See "AUTHORS" in MooX::BuildArgs.

License

See "LICENSE" in MooX::BuildArgs.

From libmoox-buildargs-perl 0.08-4 in Debian 13 (Trixie). Parsed by carta from the page's man source.