[COPYRIGHT=]
SYNOPSIS
Death to long if-elsif-else blocks that are hard to maintain, and hard to explain to your manager. Heres an overly simplistic example:
OLD CODE
if ( $obj->is_numeric ) {
if ( $obj->is_positive ) {
print 'Positive Number';
}
elsif ( $obj->is_negative )
print 'Negative Number';
}
else {
print 'Looks like zero';
}
else {
print 'Non-Numeric Value';
}
NEW CODE
YAML Decision Tree
---
- is_num :
0 : Non-Numeric Value
1 : - is_pos :
1 : Positive Number
- is_neg :
= : Looks like zero
1 : Negative Number
...
Product's homepage
Requirements:
· Perl