Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[bml] r138: LJSUP-9743 (site schemes refactoring): a...

Committer: ailyin
LJSUP-9743 (site schemes refactoring): avoid parsing <?imgprefix?> too prematurely, do it in a lazy manner instead
U   trunk/lib/Apache/BML.pm
Modified: trunk/lib/Apache/BML.pm
===================================================================
--- trunk/lib/Apache/BML.pm	2011-09-01 07:24:41 UTC (rev 137)
+++ trunk/lib/Apache/BML.pm	2011-09-08 02:28:36 UTC (rev 138)
@@ -685,6 +685,7 @@
 {
     my BML::Request $req = shift;
     my ($type, $data, $option_ref, $elhash) = @_;
+
     my $realtype = $type;
     my $previous_block = $req->{'BlockStack'}->[-1];
     my $env = $req->{'env'};
@@ -919,6 +920,7 @@
     # from BML::register_block() in which case we want to execute it before we try
     # to run it through the BML parsers
     my $content = ${$req->{'blockref'}->{$realtype}};
+
     if (ref $content) {
         return inline_error("Unknown type of element '$type'")
             unless ref $content eq 'CODE';
@@ -1377,14 +1379,6 @@
                 $sf->{$k} = $v->[1];
             }
         }
-        foreach my $k (keys %$sd) {
-            # skip any refs we have, as they aren't processed until run time
-            next if ref $sf->{$k};
-
-            # convert <?imgroot?> into http://www.site.com/img/ etc...
-            next unless index($sf->{$k}, 's') != -1;
-            $sd->{$k} =~ s/$TokenOpen([a-zA-Z0-9\_]+?)$TokenClose/$sd->{uc($1)}/og;
-        }
     }
 
     # now, this request needs a copy of (well, references to) the

Tags: andy, bml, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments