test.pl ----------------------------- sub thisisatest { print "username is $username"; } 1; #### main script (look for ################### for my code) ---------------------------- #!/usr/bin/perl -- if ($action eq 'detailedversion') { return 1; } # Make sure the module path is present # Some servers need all the subdirs in @INC too. push(@INC, "./Modules"); push(@INC, "./Modules/Upload"); push(@INC, "./Modules/Digest"); if ($ENV{'SERVER_SOFTWARE'} =~ /IIS/) { $yyIIS = 1; $0 =~ m~(.*)(\\|/)~; $yypath = $1; $yypath =~ s~\\~/~g; chdir($yypath); push(@INC, $yypath); } # Check for Time::HiRes #eval { require Time::HiRes; import Time::HiRes qw(time); }; #if ($@) { $START_TIME = 0; } #else { $START_TIME = time; } ### Requirements and Errors ### $script_root = $ENV{'SCRIPT_FILENAME'}; $script_root =~ s/\/YaBB\.(pl|cgi)//ig; if (-e "Paths.pl") { require "Paths.pl"; } elsif (-e "$script_root/Paths.pl") { require "$script_root/Paths.pl"; } require "$vardir/Settings.pl"; require "$vardir/advsettings.txt"; require "$vardir/secsettings.txt"; require "$vardir/membergroups.txt"; require "$sourcedir/Subs.pl"; require "$sourcedir/DateTime.pl"; require "$sourcedir/Load.pl"; #require "test.pl"; # Those who write software only for pay should go hurt some other field. # - Erik Naggum &LoadCookie; # Load the user's cookie (or set to guest) &LoadUserSettings; # Load user settings &WhatTemplate; # Figure out which template to be using. &WhatLanguage; # Figure out which language file we should be using! :D ################################################# #below ################################################# require "test.pl"; &thisisatest; ################################################# # end #################################################