Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Decision::ParseTree 0.041

    Download button

    No screenshots available
    Downloads: 315  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.0/5)
    2 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Ben Hengst | More programs
    Perl Artistic License / FREE
    December 22nd, 2007, 22:18 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Decision::ParseTree description

    Decision::ParseTree is a Perl module for replacing waterfall IF-ELSIF-ELSE blocks.

    [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

      


    TAGS:

    waterfall blocks | IF-ELSIF-ELSE blocks | Perl module | waterfall | IF-ELSIF-ELSE | blocks

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM