1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
#!/bin/perl
#=================================================
# Fonctions diverses
#
# r@mislb0b
# Mai 2006
#=================================================
package myFonctions;
use strict;
# Tout ce qu'il faut pour exporter proprement
# -------------------------------------------
use Exporter;
use vars qw/ @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS /;
@ISA = qw/ Exporter /;
# Déclaration des variables globales du package
#--------------------------------------------
use vars qw/
$hostPostgres $portPostgres $userPostgres $passPostgres $database @tables
$hostApache $portApache $pathCgi $pathImage
$dbh $res ...
/;
# Liste des fonction & variables que l'on souhaite exporter (inutile de toutes les exporter... ^^
# (même ds un package on peut découper en subroutine ;)
#--------------------------------------------
@EXPORT_OK = qw/
Entete
getDate
getDateText
getNavigateur
getOS
popupJS
Body
EndHTML
LagBrowser
connectDB
executeSql
printTable
getAllUsers
goodPassword
$hostPostgres $portPostgres $userPostgres $passPostgres $database
$hostApache $portApache $pathCgi $pathImage
/;
@EXPORT= ();
%EXPORT_TAGS = (
ALL => [@EXPORT_OK]
);
Déclaration des variables,
Fonctions...
#
# Le module doit renvoyer vrai
#
return 1; |
Partager