Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
t
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Operator::DynvarOr

Build Status

SYNOPSIS

use Operator::DynvarOr;

sub s {
    my $*dynvar //* 42;
}

s;

This module supplies the infix operator //* that expects its LHS to be a dynvar and its RHS a value. It scans the call stack for a dynvar of the same name and sets the LHS to its value. If the dynvar is not declared in any caller it will assign the RHS to the LHS. This allows optional dynvars to contain undefined values which is otherwise difficult to achieve.

LICENSE

All files (unless noted otherwise) can be used, modified and redistributed under the terms of the Artistic License Version 2. Examples (in the documentation, in tests or distributed as separate files) can be considered public domain.

ⓒ2020 Wenzel P. P. Peppmeyer

About

No description, website, or topics provided.

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.