Re: writing code that works on machines with or without mod_perl

2000-05-19 Thread Doug MacEachern
On Thu, 18 May 2000, Matt Sergeant wrote: > On Thu, 18 May 2000, Kenneth Lee wrote: > > > modperlers, > > > > does it make sense if i put some mod_perl specific codes inside > > an eval() so that the code runs on machines that have or haven't > > mod_perl installed? > > > > eval <<'MOD_PER

Re: writing code that works on machines with or without mod_perl

2000-05-18 Thread Matt Sergeant
On Thu, 18 May 2000, Kenneth Lee wrote: > i know that, but it doesn't work if i use "use", since the block > will be eval()'d at compile time: > > eval { > die unless $ENV{MOD_PERL}; > use Apache::Constants qw(:common); > ... > }; > > it complains if Apache::Constants is not instal

Re: writing code that works on machines with or without mod_perl

2000-05-18 Thread Kenneth Lee
i know that, but it doesn't work if i use "use", since the block will be eval()'d at compile time: eval { die unless $ENV{MOD_PERL}; use Apache::Constants qw(:common); ... }; it complains if Apache::Constants is not installed. Matt Sergeant wrote: > > On Thu, 18 May 2000, Kenneth

Re: writing code that works on machines with or without mod_perl

2000-05-18 Thread Matt Sergeant
On Thu, 18 May 2000, Kenneth Lee wrote: > arggg... i was sticked to "use" instead of "require"... > but how about if i've to import something? perldoc -f use -- Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and

Re: writing code that works on machines with or without mod_perl

2000-05-18 Thread Kenneth Lee
arggg... i was sticked to "use" instead of "require"... but how about if i've to import something? Matt Sergeant wrote: > > On Thu, 18 May 2000, Kenneth Lee wrote: > > > modperlers, > > > > does it make sense if i put some mod_perl specific codes inside > > an eval() so that the code runs on ma

Re: writing code that works on machines with or without mod_perl

2000-05-18 Thread Matt Sergeant
On Thu, 18 May 2000, Kenneth Lee wrote: > modperlers, > > does it make sense if i put some mod_perl specific codes inside > an eval() so that the code runs on machines that have or haven't > mod_perl installed? > > eval <<'MOD_PERL_CODE' if $ENV{MOD_PERL}; > use Apache (); > my $r =