If you have postprocess_perl and postprocess_text, most non-structural
things on the page get passed through one or the other.

However, the defaults for arguments are passed through neither.  I would
have expected it to be passed through the postprocess_perl hook...

Possible patch follows.  The patch is against Mason 1.33, but the code
seems to be the same in the latest version.

        Thanks...

                                -ben


--- HTML/Mason/Compiler.pm      2007-07-09 11:20:14.000000000 -0400
+++ /tmp/Compiler.pm    2007-10-10 16:02:30.000000000 -0400
@@ -367,6 +367,9 @@
     $self->lexer->throw_syntax_error("$arg already defined")
         if grep { "$_->{type}$_->{name}" eq $arg } @{
$self->{current_compile}{args} };
  
+    eval { $self->postprocess_perl->(\$p{default} } if
$self->postprocess_perl;
+    compiler_error $@ if $@;
+
     push @{ $self->{current_compile}{args} }, { type => $p{type},
                                              name => $p{name},
                                              default => $p{default},

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to