Subject: | [patch] better style |
This patch will reveal several errors.
--
Alexandr Ciornii, http://chorny.net
Subject: | MRIM.pm.patch |
--- MRIM.pm.dist Sat Dec 29 02:23:54 2007
+++ MRIM.pm Sat Dec 29 15:06:29 2007
@@ -1,8 +1,10 @@
+use 5.008; #bytes.pm
+use strict;
# below is just an utility class
package Net::MRIM::Message;
use constant {
- TYPE_UNKOWN => 0,
+ TYPE_UNKNOWN => 0,
TYPE_MSG => 1,
TYPE_LOGOUT_FROM_SRV => 2,
TYPE_CONTACT_LIST => 3
@@ -11,7 +13,7 @@
sub new {
my ($pkgname)=@_;
my $self={};
- $self->{_type}=TYPE_UNKOWN;
+ $self->{_type}=TYPE_UNKNOWN;
bless $self;
return $self;
}
@@ -78,7 +80,7 @@
package Net::MRIM;
-$VERSION='0.9';
+our $VERSION='0.9';
=pod
@@ -218,7 +220,7 @@
PeerPort => $port,
Proto => 'tcp',
Type => SOCK_STREAM,
- TimeOut => 20
+ TimeOut => 20
);
die "couldn't connect" if (!defined($sock));
print "DEBUG Connected to $host:$port\n" if ($debug==1);
@@ -566,4 +568,4 @@
return pack("V",length($str)).$str;
}
-return 1;
+1;