Changeset cce9369 for perl/lib/BarnOwl.pm
- Timestamp:
- Sep 30, 2011, 8:14:50 AM (13 years ago)
- Children:
- e21b921
- Parents:
- b54b06a
- git-author:
- Jason Gross <jgross@mit.edu> (07/12/11 19:20:46)
- git-committer:
- Jason Gross <jgross@mit.edu> (09/30/11 08:14:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/lib/BarnOwl.pm
rb54b06a rcce9369 413 413 =item valid_settings 414 414 415 A listref of valid setttings for the enum variable. 416 The settings must not contain any commas. 415 A listref of valid setttings for the enum variable, or a string describing 416 the valid settings for any other type of variable. The settings for an enum 417 variable may not contain any commas. You should not specify valid settings 418 for boolean variables. 417 419 418 420 =back … … 421 423 422 424 sub new_variable_int { 423 unshift @_, \&BarnOwl::Internal::new_variable_int, 0; 424 goto \&_new_variable; 425 _new_variable(\&BarnOwl::Internal::new_variable_int, 0, "<int>", @_); 425 426 } 426 427 427 428 sub new_variable_bool { 428 unshift @_, \&BarnOwl::Internal::new_variable_bool, 0; 429 goto \&_new_variable; 429 _new_variable(\&BarnOwl::Internal::new_variable_bool, 0, "on,off", @_); 430 430 } 431 431 432 432 sub new_variable_string { 433 unshift @_, \&BarnOwl::Internal::new_variable_string, ""; 434 goto \&_new_variable; 433 _new_variable(\&BarnOwl::Internal::new_variable_string, "", "<string>", @_); 435 434 } 436 435 … … 457 456 my $func = shift; 458 457 my $default_default = shift; 458 my $default_valid_settings = shift; 459 459 my $name = shift; 460 460 my $args = shift || {}; 461 461 my %args = ( 462 summary => "", 463 description => "", 464 default => $default_default, 462 summary => "", 463 description => "", 464 default => $default_default, 465 valid_settings => $default_valid_settings, 465 466 %{$args}); 466 $func->($name, $args{default}, $args{summary}, $args{description} );467 $func->($name, $args{default}, $args{summary}, $args{description}, $args{valid_settings}); 467 468 } 468 469
Note: See TracChangeset
for help on using the changeset viewer.