Changeset a695a68 for perlwrap.pm
- Timestamp:
- May 18, 2007, 4:54:51 PM (17 years ago)
- Branches:
- master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- cd57601
- Parents:
- ec53338
- git-author:
- Nelson Elhage <nelhage@mit.edu> (05/18/07 16:54:42)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (05/18/07 16:54:51)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perlwrap.pm
rf6b319c ra695a68 78 78 no warnings 'uninitialized'; 79 79 BarnOwl::new_command_internal($name, $func, $args{summary}, $args{usage}, $args{description}); 80 } 81 82 sub new_variable_int { 83 unshift @_, \&BarnOwl::new_variable_int_internal, 0; 84 goto \&_new_variable; 85 } 86 87 sub new_variable_bool { 88 unshift @_, \&BarnOwl::new_variable_bool_internal, 0; 89 goto \&_new_variable; 90 } 91 92 sub new_variable_string { 93 unshift @_, \&BarnOwl::new_variable_string_internal, ""; 94 goto \&_new_variable; 95 } 96 97 sub _new_variable { 98 my $func = shift; 99 my $default_default = shift; 100 my $name = shift; 101 my $args = shift || {}; 102 my %args = ( 103 summary => "", 104 description => "", 105 default => $default_default, 106 %{$args}); 107 $func->($name, $args{default}, $args{summary}, $args{description}); 80 108 } 81 109
Note: See TracChangeset
for help on using the changeset viewer.