(package main) 6 my $irc_handler = QsIRC->new ({ 7 'nick' => 'testnick', 8 'mode' => '+x', 9 'port' => 6667, 10 'email' => 'n@n.com', 11 'anick' => 'alt_nick', 12 'nsnick' => 'no', 13 'nspass' => 'no_again', 14 'server' => server.com', 15 'channels'=> '#zap',} +++ 1 package QsIRC; ... 27 sub new 28 { 29 my $deref = $_[8]; 30 31 #$nick = $$_[0]{nick}; 32 #$mode = $$_[0]{mode}; 33 #$port = $$_[0]{port}; 34 #$email = $$_[0]{email}; 35 #$anick = $$_[0]{anick}; 36 #$nsnick = $$_[0]{nsnick}; 37 #$nspass = $$_[0]{nspass}; 38 $server = $deref->server; 39 #$channels = $$_[0]{channels}; 40 41 POE::Session->new( 'QsIRC' => #### 1 package QsOutput; 2 3 use Env; 4 use POSIX; 5 use strict; 6 7 our($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); 8 9 my $Revision = substr(q$Revision: $,1); 10 my $ts = sub { strftime('%c',localtime()); }; 11 12 @ISA = qw(Exporter); 13 $VERSION = $Revision; 14 @EXPORT_OK = qw($DEBUGLVL); 15 @EXPORT = qw(debug); 16 17 our $DEBUGLVL = 0; 18 print $DEBUGLVL,"\n"; 19 20 1; 21 22 # debug {{{ 23 # prints debug messages 24 # returns(void) 25 26 sub debug 27 { 28 my $msg = shift; 29 my $pdbg = shift || 0; 30 my $dlvl = shift || 0; 31 32 print "DBG -- dlvl: $dlvl\n"; 33 if ( $dlvl >= $DEBUGLVL ) 34 { 35 if ( $pdbg ) 36 { 37 if ( $msg =~ /\n$/ ) 38 { 39 print &$ts ." : Debug($dlvl): $msg"; #### 379 use QsOutput qw($DEBUGLVL = 4); #### "=" is not exported by the QsOutput module Can't continue after import errors at /home/zap/frag/cmds/qservwatch line 379 BEGIN failed--compilation aborted at /home/zap/frag/cmds/qservwatch line 379.