Changeset 4953c44 for t/variable.t


Ignore:
Timestamp:
Feb 23, 2013, 5:44:23 PM (9 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master
Children:
6a8b519
Parents:
4419d3d
git-author:
David Benjamin <davidben@mit.edu> (02/22/13 14:12:23)
git-committer:
David Benjamin <davidben@mit.edu> (02/23/13 17:44:23)
Message:
Change set_fromstring to die on failure

Returning zero/non-zero is awkward. Leave a note for future improvement
to pass the error message along, although the default one is pretty
reasonable already.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • t/variable.t

    r4419d3d r4953c44  
    6262    get_tostring => sub { "value is " . $value },
    6363    set_fromstring => sub {
    64         return -1 unless $_[0] =~ /^...?$/;
     64        die "Too long" unless $_[0] =~ /^...?$/;
    6565        $value = $_[0];
    66         return 0;
    6766    },
    6867    takes_on_off => 1
Note: See TracChangeset for help on using the changeset viewer.