Re: Check for modules presence

2008-09-02 Thread Francesco Rotondella
Rob Dixon wrote: [...] All it does is to put some stub code in place of any missing modules, with an import routine that just pushes the name of the package onto array @main::NOTFOUND. Then the CHECK block code just reports the contents of that array and dies if it's not empty. There are a numbe

Re: Check for modules presence

2008-08-31 Thread Jenda Krynicky
From: sormariano <[EMAIL PROTECTED]> > However, to set some code before the use MODULE directives is something > I could never imagine, due to my still poor perl knowledge. > I thought that if some modules were missing, I had errors also if some > instructions were put before the use MODULE direc

Re: Check for modules presence

2008-08-30 Thread sormariano
Rob Dixon ha scritto: [...] It works but I prefer to write all into 1 script. I wasn't clear what your purpose was, as running a program will report any module that is missing anyway. I can only guess that you want them all checkd in one pass, and I have written this code that will do th

Re: Check for modules presence

2008-08-29 Thread Rob Dixon
Francesco wrote: > Jenda Krynicky ha scritto: >> From: sormariano <[EMAIL PROTECTED]> >> >>> I made a script that uses some modules. >>> Obviously if one of the modules is not installed, the script doesn't start. >>> I'd like to have the possibility to notify to the user which are the >>> modul

Re: Check for modules presence

2008-08-29 Thread Jenda Krynicky
From: Francesco <[EMAIL PROTECTED]> > Jenda Krynicky ha scritto: > > Put something like this on top of the script: > > > > BEGIN { > > push @INC, sub {print STDERR "Still looking for $_[1]\n";exit;}; > > } > > > > > I tried this and I got the following output > > Still looking for Encode/Conf

Re: Check for modules presence

2008-08-29 Thread Francesco
Jenda Krynicky ha scritto: Date sent: Thu, 28 Aug 2008 17:25:16 +0200 From: sormariano <[EMAIL PROTECTED]> To: beginners@perl.org Subject: Check for modules presence Hello to everybody, I made a script that uses some m

Re: Check for modules presence

2008-08-28 Thread Jenda Krynicky
Date sent: Thu, 28 Aug 2008 17:25:16 +0200 From: sormariano <[EMAIL PROTECTED]> To: beginners@perl.org Subject: Check for modules presence > Hello to everybody, > > I made a script that uses some modules. > Obvio

RE: Check for modules presence

2008-08-28 Thread Gorrebeeck, Robert
:[EMAIL PROTECTED] Sent: Thursday, August 28, 2008 10:25 AM To: beginners@perl.org Subject: Check for modules presence Hello to everybody, I made a script that uses some modules. Obviously if one of the modules is not installed, the script doesn't start. I'd like to have the possibility

Check for modules presence

2008-08-28 Thread sormariano
Hello to everybody, I made a script that uses some modules. Obviously if one of the modules is not installed, the script doesn't start. I'd like to have the possibility to notify to the user which are the modules he still requires and that should have to be installed.. I think I could wrote an "