SourceForge Logo

NAME

Boucherot::utils - Some usefull functions for The Boucherot IRC bot

SYNOPSIS

  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");

DESCRIPTION

This package provide some usefull functions for the Boucherot Bot.

GISSUML MODEL

package Boucherot::utils

Functions:

 +$ source ( file_name : SCALAR ) : Boolean
 +$ gettime () : SCALAR
 +$ getsmalltime () : SCALAR
 +$ givecode ( subroutine_name : SCALAR ) : Code
 +$ mkalldir ( repertoire : SCALAR,  ) : Boolean

METHODS

source

 +$ 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

 +$ gettime () : SCALAR

Return the current time, formated with a universal format.

getsmalltime

 +$ getsmalltime () : SCALAR

Return the current time, formated with a short universal format. (No Spaces)

givecode

 +$ 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

 +$ mkalldir ( repertoire : SCALAR,  ) : Boolean

Create a directory event if the directory is in a nonexistant one. Return false if fail.

AUTHORS

This class was written by Arthibus Gissehel <gissehel@vachefolle.com> in 2000.

Go and see XChat authors for the Boucherot::utils::source's authors.

NOTES

This package is part of the Boucherot project.