From a5a79fb39d5a53cb0869cb29d5f0438f162c948a Mon Sep 17 00:00:00 2001 From: milkbone57 Date: Fri, 19 Sep 2003 23:16:25 +0000 Subject: [PATCH] "" --- mos.pl | 56 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/mos.pl b/mos.pl index f5c8a27..72b1fb4 100755 --- a/mos.pl +++ b/mos.pl @@ -9,42 +9,46 @@ # License : it's on our TODO list... # ----------------------------------------------------------------------- -use 5.006; # milkbone might work on 5.004 or lower; someone should find out... +eval { -use warnings; -use strict; + use 5.006; # milkbone might work on 5.004 or lower; someone should find out... -use lib 'lib'; -use lib '.'; + use warnings; + use strict; -use Tk; + use lib 'lib'; + use lib '.'; -$SIG{CHLD} = 'IGNORE'; # this is so forked processes don't become zombies + use Tk; -use Milkbone; -use Milkbone::Hooks qw(load_options pre_mainloop post_mainloop - protocol_signon load_plugins); + $SIG{CHLD} = 'IGNORE'; # this is so forked processes don't become zombies -$| = 1; + use Milkbone; + use Milkbone::Hooks qw(load_options pre_mainloop post_mainloop + protocol_signon load_plugins); -sub main -{ - Milkbone->init(); + $| = 1; - load_options; + sub main + { + Milkbone->init(); - require "plugins/Tk-Splash.pl" unless option("NoSplash"); + load_options; - load_plugins; - pre_mainloop; + require "plugins/Tk-Splash.pl" unless option("NoSplash"); - protocol_signon -user => 'test', -pass => 'test'; - data("me") = "test"; + load_plugins; + pre_mainloop; + + protocol_signon -user => 'test', -pass => 'test'; + data("me") = "test"; - MOSLoop; + MOSLoop; + post_mainloop; + } + + # off it goes... + main(); +}; - post_mainloop; -} - -# off it goes... -main(); +print $@ if $@;