matts       2003/01/26 09:15:56

  Modified:    lib/Apache/AxKit/Language XPathScript.pm
  Log:
  Fix for import_templates() using the cache
  
  Revision  Changes    Path
  1.9       +8 -5      xml-axkit/lib/Apache/AxKit/Language/XPathScript.pm
  
  Index: XPathScript.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Language/XPathScript.pm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XPathScript.pm    5 Jun 2002 23:59:19 -0000       1.8
  +++ XPathScript.pm    26 Jan 2003 17:15:55 -0000      1.9
  @@ -286,12 +286,15 @@
   }
   
   sub include_file {
  -    my ($filename, $provider, $script_output) = @_;
  +    my ($filename, $provider, $script_output, $ignore_cache) = @_;
   
  -    # return if already included
       my $key = $provider->key();
  -    return '' if grep {$_ eq $filename} @{$stash->{$key}{includes}};
   
  +    unless ($ignore_cache) {
  +        # return if already included
  +        return '' if grep {$_ eq $filename} @{$stash->{$key}{includes}};
  +    }
  +    
       push @{$stash->{$key}{includes}}, $filename;
       
       my $apache = $provider->apache_request;
  @@ -447,7 +450,7 @@
       
       sub import_template {
           my ($filename, $local_changes) = @_;
  -        my ($script) = 
Apache::AxKit::Language::XPathScript::include_file($filename,$Apache::AxKit::Language::XPathScript::style_provider,
 1);
  +        my ($script) = 
Apache::AxKit::Language::XPathScript::include_file($filename,$Apache::AxKit::Language::XPathScript::style_provider,
 1, 1);
           # changes may be local to this imported template, or global 
(default).
           my ($setup_t);
           if ($local_changes) {
  
  
  

Reply via email to