Author: dylan
Date: 2004-06-03 22:57:20 -0400 (Thu, 03 Jun 2004)
New Revision: 220
Added:
trunk/haver-core/lib/Haver/Error.pm
trunk/haver-core/lib/Haver/Error/
Modified:
trunk/haver-irc/haver-irc.pl
trunk/haver-server/lib/Haver/Server/Object.pm
Log:
commiting small changes.
Added: trunk/haver-core/lib/Haver/Error.pm
===================================================================
--- trunk/haver-core/lib/Haver/Error.pm 2004-06-04 00:49:10 UTC (rev 219)
+++ trunk/haver-core/lib/Haver/Error.pm 2004-06-04 02:57:20 UTC (rev 220)
@@ -0,0 +1,36 @@
+# vim: set ft=perl ts=4 sw=4:
+# Haver::Error - Base class for haver exceptions.
+#
+# Copyright (C) 2004 Dylan William Hardison.
+#
+# This module is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This module is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this module; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+package Haver::Error;
+use strict;
+use warnings;
+use Error;
+use base 'Error';
+
+sub new {
+ my $self = shift;
+ my $text = shift;
+
+ local $Error::Depth = $Error::Depth + 1;
+
+ $self->SUPER::new(-text => $text, @_);
+}
+
+
+
+
Modified: trunk/haver-irc/haver-irc.pl
===================================================================
--- trunk/haver-irc/haver-irc.pl 2004-06-04 00:49:10 UTC (rev 219)
+++ trunk/haver-irc/haver-irc.pl 2004-06-04 02:57:20 UTC (rev 220)
@@ -24,7 +24,6 @@
use POE;
use POE::Component::IRC;
use POE::Component::Client::Haver;
-use Haver::Protocol::Filter;
use Haver::Config;
use Data::Dumper;
@@ -284,8 +283,7 @@
}
-sub daemonize { #Not in use currently, but left in case it's needed. It's
functional, anyway.
- #Thanks to Vadim and his replaybot for this code.
+sub daemonize { # Thanks to Vadim and his replaybot for this code.
close(STDERR);
close(STDIN);
close(STDOUT);
Modified: trunk/haver-server/lib/Haver/Server/Object.pm
===================================================================
--- trunk/haver-server/lib/Haver/Server/Object.pm 2004-06-04 00:49:10 UTC
(rev 219)
+++ trunk/haver-server/lib/Haver/Server/Object.pm 2004-06-04 02:57:20 UTC
(rev 220)
@@ -21,7 +21,6 @@
use Carp;
use Fatal qw(:void open close opendir closedir);
-use POE::Kernel qw( $poe_kernel );
use Haver::Base;
use Haver::Preprocessor;
@@ -108,36 +107,10 @@
$me->{_flags} = {};
$me->{id} ||= $ID++;
- if (exists $me->{wheel}) {
- Scalar::Util::weaken($me->{wheel});
- }
return $me;
}
-## Helper methods for POE-ness.
-sub post {
- my $me = shift;
- unless (defined $me->{sid}) {
- carp "Can not post. session id is not defined!";
- return;
- }
- $poe_kernel->post($me->{sid}, @_);
-}
-
-sub send {
- my $me = shift;
-
- unless (defined $me->{wheel}) {
- carp "Can not send. Wheel undefined!";
- return;
- }
- $me->{wheel}->put(@_);
-}
-
-
-
-
## Accessor methods.
sub id {
my ($me, $val) = @_;