Changeset 104a4eb for perl


Ignore:
Timestamp:
Feb 23, 2013, 7:28:42 PM (8 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master
Children:
5f3f1e4, f3ac1ae
Parents:
6a8b519
git-author:
David Benjamin <davidben@mit.edu> (02/23/13 17:58:07)
git-committer:
David Benjamin <davidben@mit.edu> (02/23/13 19:28:42)
Message:
Accept validsettings in new_variable_string

If people reeeaaally want to, I suppose they could pass in "<path>" or
something silly. Whatever.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl.pm

    r4953c44 r104a4eb  
    428428=back
    429429
     430In addition, new_variable_string optionally accepts a string validsettings
     431parameter, in case people want to set it to "<path>".
     432
    430433=cut
    431434
     
    464467    my $storage = defined($args->{default}) ? $args->{default} : "";
    465468    BarnOwl::new_variable_full($name, {
     469            # Allow people to override this one if they /reaaally/ want to for
     470            # some reason. Though we still reserve the right to interpret this
     471            # value in interesting ways for tab-completion purposes.
     472            validsettings => "<string>",
    466473            %{$args},
    467474            get_tostring => sub { $storage },
    468475            set_fromstring => sub { $storage = $_[0]; },
    469             validsettings => "<string>",
    470476            takes_on_off => 0,
    471477        });
Note: See TracChangeset for help on using the changeset viewer.