Boucherot::utils - Some usefull functions for The Boucherot IRC bot
use Boucherot::utils;
Boucherot::utils::source("myXChatScript.pl");
print Boucherot::utils::gettime; print Boucherot::utils::getsmalltime;
sub poide {
return 7/8;
}
Boucherot::utils::givecode("poide");
This package provide some usefull functions for the Boucherot Bot.
package Boucherot::utils
Functions:
+$ source ( file_name : SCALAR ) : Boolean +$ gettime () : SCALAR +$ getsmalltime () : SCALAR +$ givecode ( subroutine_name : SCALAR ) : Code +$ mkalldir ( repertoire : SCALAR, ) : Boolean
+$ source ( file_name : SCALAR ) : Boolean
Source a perl script into the main program. Note that the ``do'' perl built-in function do exactly the same. ``source'' is only here to be sure that the perl scripts are loaded exactly the same as the are under XChat (it seems that the XChat way to load scripts have some weird effect due to the use of $/.
Note that source MUST be defined in main package context. And so,
use Boucherot::utils HAVE to be explicitely put BEFORE
``package''.
+$ gettime () : SCALAR
Return the current time, formated with a universal format.
+$ getsmalltime () : SCALAR
Return the current time, formated with a short universal format. (No Spaces)
+$ givecode ( subroutine_name : SCALAR ) : Code
Return a reference on a CODE whose name is the argument.
If the argument is the code itself, it REALLY is return.
+$ mkalldir ( repertoire : SCALAR, ) : Boolean
Create a directory event if the directory is in a nonexistant one. Return false if fail.
This class was written by Arthibus Gissehel <gissehel@vachefolle.com> in 2000.
Go and see XChat authors for the Boucherot::utils::source's
authors.
This package is part of the Boucherot project.