one

# given [2..5]

$array->one(fun ($value) {
  $value == 5; # 1; true
});

$array->one(fun ($value) {
  $value == 6; # 0; false
});

The one method returns true if only one of the elements in the array meet the criteria set by the operand and rvalue. This method returns a Data::Object::Number object.

one(CodeRef $arg1, Any $arg2) : NumObject

method

5 POD Errors

The following errors were encountered while parsing the POD:

Around line 10:

Unknown directive: =name

Around line 14:

Unknown directive: =usage

Around line 26:

Unknown directive: =description

Around line 32:

Unknown directive: =signature

Around line 36:

Unknown directive: =type