[364] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

[D-O-H] r506 - in trunk: . owl

daemon@ATHENA.MIT.EDU (nelhage@MIT.EDU)
Thu Oct 29 18:05:21 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: nelhage@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Tue,  9 Jan 2007 15:00:36 -0500 (EST)

Author: nelhage
Date: 2007-01-09 15:00:36 -0500 (Tue, 09 Jan 2007)
New Revision: 506

Modified:
   trunk/
   trunk/owl/perlwrap.pm
Log:
 r17894@phanatique:  nelhage | 2007-01-09 14:59:20 -0500
 The lack of strict and warnings was making me sad.



Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - bb873fd7-8e23-0410-944a-99ec44c633eb:/branches/owl/filter-rewrite:15925
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h/trunk:17892
   + bb873fd7-8e23-0410-944a-99ec44c633eb:/branches/owl/filter-rewrite:15925
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h/trunk:17894

Modified: trunk/owl/perlwrap.pm
===================================================================
--- trunk/owl/perlwrap.pm	2007-01-09 15:42:14 UTC (rev 505)
+++ trunk/owl/perlwrap.pm	2007-01-09 20:00:36 UTC (rev 506)
@@ -5,6 +5,9 @@
 #####################################################################
 #####################################################################
 
+use strict;
+use warnings;
+
 package owl;
 
 
@@ -16,7 +19,6 @@
 use lib(get_data_dir()."/owl/lib");
 use lib($::ENV{'HOME'}."/.owl/lib");
 
-
 our $configfile;
 
 $configfile ||= $::ENV{'HOME'}."/.owlconf";
@@ -37,6 +39,7 @@
 
 # make owl::<command>("foo") be aliases to owl::command("<command> foo");
 sub AUTOLOAD {
+    our $AUTOLOAD;
     my $called = $AUTOLOAD;
     $called =~ s/.*:://;
     $called =~ s/_/-/g;
@@ -65,6 +68,7 @@
         %{$args}
     );
 
+    no warnings 'uninitialized';
     owl::new_command_internal($name, $func, $args{summary}, $args{usage}, $args{description});
 }
 
@@ -197,7 +201,7 @@
 
 package owl::Message::Admin;
 
-@ISA = qw( owl::Message );
+use base qw( owl::Message );
 
 sub header       { return shift->{"header"}; }
 
@@ -206,14 +210,14 @@
 
 package owl::Message::Generic;
 
-@ISA = qw( owl::Message );
+use base qw( owl::Message );
 
 #####################################################################
 #####################################################################
 
 package owl::Message::AIM;
 
-@ISA = qw( owl::Message );
+use base qw( owl::Message );
 
 # all non-loginout AIM messages are personal for now...
 sub is_personal { 
@@ -225,7 +229,7 @@
 
 package owl::Message::Zephyr;
 
-@ISA = qw( owl::Message );
+use base qw( owl::Message );
 
 sub login_tty { 
     my ($m) = @_;
@@ -241,8 +245,6 @@
 
 sub zwriteline  { return shift->{"zwriteline"}; }
 
-sub zsig        { return shift->{"zsig"}; }
-
 sub is_ping     { return (lc(shift->opcode) eq "ping"); }
 
 sub is_personal { 
@@ -437,11 +439,14 @@
 # switch to package main when we're done
 package main;
 # alias the hooks
-foreach my $hook  qw (onStartSubs
-onReceiveMsg
-onMainLoop
-onGetBuddyList ) {
-  *{"main::".$hook} = \*{"owl::".$hook};
+{
+    no strict 'refs';
+    foreach my $hook  qw (onStartSubs
+                          onReceiveMsg
+                          onMainLoop
+                          onGetBuddyList ) {
+        *{"main::".$hook} = \*{"owl::".$hook};
+    }
 }
 
 # load the config  file


home help back first fref pref prev next nref lref last post