Re: Conditional module loading

2007-08-09 Thread Fermín Galán Márquez
Dear Chas, There is one last case, but it doesn't involve loading A or B, it involves loading A if it is available and setting a flag as to whether it is available or not. For example, I once wrote a Gtk based SQL Editor/Runner. It had the ability to save the result sets to Microsoft Excel fil

Re: Conditional module loading

2007-08-08 Thread Fermín Galán Márquez
Dear Paul, Mumia, Thank you for you advice! Now my problem has been solved :) Regards, Fermín Galán Márquez CTTC - Centre Tecnològic de Telecomunicacions de Catalunya Parc Mediterrani de la Tecnologia, Av. del Canal Olímpic s/n, 08860 Castelldefels, Spain Room 1.02 Tel : +3

Re: Conditional module loading

2007-08-07 Thread Chas Owens
On 8/7/07, Fermín Galán Márquez <[EMAIL PROTECTED]> wrote: > Hi! > > I'm trying to introduce conditional module loading in a Perl program, > but I'm experiencing problems. For example: > > ... > if ($some_condition) { > use ModuleA; > (doing something using ModuleA) > } > else { > use M

Re: Conditional module loading

2007-08-07 Thread Mumia W.
On 08/07/2007 10:18 AM, Fermín Galán Márquez wrote: Hi! I'm trying to introduce conditional module loading in a Perl program, but I'm experiencing problems. For example: [...] "Use" is done at compile-time, so both modules will have been loaded before the if statement is executed. When you

Re: Conditional module loading

2007-08-07 Thread Paul Lalli
On Aug 7, 11:18 am, [EMAIL PROTECTED] (Fermin Galan) wrote: > I'm trying to introduce conditional module loading in a Perl program, > but I'm experiencing problems. For example: > > if ($some_condition) { > use ModuleA; > (doing something using ModuleA)} > > else { > use ModuleB; >