Changeset 6922edd for perlwrap.pm
- Timestamp:
- Oct 26, 2006, 11:14:41 AM (18 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:
- 4c46dfd
- Parents:
- bc220b2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perlwrap.pm
r216c734 r6922edd 30 30 $called =~ s/.*:://; 31 31 return &owl::command("$called ".join(" ",@_)); 32 } 33 34 =head2 new_command NAME FUNC [{ARGS}] 35 36 Add a new owl command. When owl executes the command NAME, FUNC will 37 be called with the arguments passed to the command, with NAME as the 38 first argument. 39 40 ARGS should be a hashref containing any or all of C<summary>, 41 C<usage>, or C<description> keys. 42 43 =cut 44 45 sub new_command { 46 my $name = shift; 47 my $func = shift; 48 my $args = shift || {}; 49 my %args = ( 50 summary => undef, 51 usage => undef, 52 description => undef, 53 %{$args} 54 ); 55 56 owl::new_command_internal($name, $func, $args{summary}, $args{usage}, $args{description}); 32 57 } 33 58
Note: See TracChangeset
for help on using the changeset viewer.