Changeset c681337


Ignore:
Timestamp:
Jan 9, 2007, 3:00:36 PM (17 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
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)
Message:
The lack of strict and warnings was making me sad.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlwrap.pm

    rc0987a8 rc681337  
    66#####################################################################
    77
     8use strict;
     9use warnings;
     10
    811package owl;
    912
     
    1720use lib($::ENV{'HOME'}."/.owl/lib");
    1821
    19 
    2022our $configfile;
    2123
     
    3840# make owl::<command>("foo") be aliases to owl::command("<command> foo");
    3941sub AUTOLOAD {
     42    our $AUTOLOAD;
    4043    my $called = $AUTOLOAD;
    4144    $called =~ s/.*:://;
     
    6669    );
    6770
     71    no warnings 'uninitialized';
    6872    owl::new_command_internal($name, $func, $args{summary}, $args{usage}, $args{description});
    6973}
     
    198202package owl::Message::Admin;
    199203
    200 @ISA = qw( owl::Message );
     204use base qw( owl::Message );
    201205
    202206sub header       { return shift->{"header"}; }
     
    207211package owl::Message::Generic;
    208212
    209 @ISA = qw( owl::Message );
     213use base qw( owl::Message );
    210214
    211215#####################################################################
     
    214218package owl::Message::AIM;
    215219
    216 @ISA = qw( owl::Message );
     220use base qw( owl::Message );
    217221
    218222# all non-loginout AIM messages are personal for now...
     
    226230package owl::Message::Zephyr;
    227231
    228 @ISA = qw( owl::Message );
     232use base qw( owl::Message );
    229233
    230234sub login_tty {
     
    241245
    242246sub zwriteline  { return shift->{"zwriteline"}; }
    243 
    244 sub zsig        { return shift->{"zsig"}; }
    245247
    246248sub is_ping     { return (lc(shift->opcode) eq "ping"); }
     
    438440package main;
    439441# 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    }
    445450}
    446451
Note: See TracChangeset for help on using the changeset viewer.