Changeset c681337 for perlwrap.pm
- Timestamp:
- Jan 9, 2007, 3:00:36 PM (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:
- 3354cea5
- Parents:
- c0987a8
- git-author:
- Nelson Elhage <nelhage@mit.edu> (01/09/07 14:59:20)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (01/09/07 15:00:36)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perlwrap.pm
rc0987a8 rc681337 6 6 ##################################################################### 7 7 8 use strict; 9 use warnings; 10 8 11 package owl; 9 12 … … 17 20 use lib($::ENV{'HOME'}."/.owl/lib"); 18 21 19 20 22 our $configfile; 21 23 … … 38 40 # make owl::<command>("foo") be aliases to owl::command("<command> foo"); 39 41 sub AUTOLOAD { 42 our $AUTOLOAD; 40 43 my $called = $AUTOLOAD; 41 44 $called =~ s/.*:://; … … 66 69 ); 67 70 71 no warnings 'uninitialized'; 68 72 owl::new_command_internal($name, $func, $args{summary}, $args{usage}, $args{description}); 69 73 } … … 198 202 package owl::Message::Admin; 199 203 200 @ISA =qw( owl::Message );204 use base qw( owl::Message ); 201 205 202 206 sub header { return shift->{"header"}; } … … 207 211 package owl::Message::Generic; 208 212 209 @ISA =qw( owl::Message );213 use base qw( owl::Message ); 210 214 211 215 ##################################################################### … … 214 218 package owl::Message::AIM; 215 219 216 @ISA =qw( owl::Message );220 use base qw( owl::Message ); 217 221 218 222 # all non-loginout AIM messages are personal for now... … … 226 230 package owl::Message::Zephyr; 227 231 228 @ISA =qw( owl::Message );232 use base qw( owl::Message ); 229 233 230 234 sub login_tty { … … 241 245 242 246 sub zwriteline { return shift->{"zwriteline"}; } 243 244 sub zsig { return shift->{"zsig"}; }245 247 246 248 sub is_ping { return (lc(shift->opcode) eq "ping"); } … … 438 440 package main; 439 441 # alias the hooks 440 foreach my $hook qw (onStartSubs 441 onReceiveMsg 442 onMainLoop 443 onGetBuddyList ) { 444 *{"main::".$hook} = \*{"owl::".$hook}; 442 { 443 no strict 'refs'; 444 foreach my $hook qw (onStartSubs 445 onReceiveMsg 446 onMainLoop 447 onGetBuddyList ) { 448 *{"main::".$hook} = \*{"owl::".$hook}; 449 } 445 450 } 446 451
Note: See TracChangeset
for help on using the changeset viewer.