> >
> >
> [ .... ]
> > config.pm file
> > ---------------------------------------------
> > package AFPA::Evolif::Config ;
> >
> > use XML::LibXML () ;
> > use XML::LibXSLT () ;
> > use XML::XPath () ;
> > use XML::Simple () ;
> > use DBI () ;
> [ ... ]
>
> Hi,
>     Could it be that XML::XPath does file tests on the
> file $xmlfile passed to it through
>       XML::XPath->new(filename => $xmlfile)
> which would cause '_' to use the stat on $xmlfile, rather
> than the original config file?
>
> best regards,
> randy kobes
>
>



oh yes, this was the answer !  XML::XPATh->new stats the file.

thanks for clearing it out !

then maybe the last line of reread_conf  in mod_perl guide should be
modified to

 $MODIFIED{$file} = -M $file;

  in case the do ( ) loads something which can possibily stat file.


pascal barbedor



sub reread_conf{
>  my $file=shift;
>  return unless $file;
>  return unless -e $file and -r _;
>  unless ($MODIFIED{$file} and $MODIFIED{$file}== -M _){
>   unless (my $result = do $file){
>    print "lecture\n";
>    warn "lecture de $file impossible: $@" if $@;
>    warn "do de $file impossible: $!" unless defined $result;
>    warn "run de $file impossible" unless $result;
>   }
>       $MODIFIED{$file} = -M _
>  }
> }




Reply via email to