On Wed, Jun 30, 2010 at 17:47, Furst, Carl <carl.fu...@mlb.com> wrote: > %} > > % elsif ($dosomethingelse) { Mason basically works by translating "templates" into Perl code. Each such template ("component" in Mason lingo) may contain specific syntax determining what's replaceable (i.e. code - as are lines that begin with "%"), EVERYTHING else is left as is. Mason does NOT assume that whitespace is insignificant.
So, the generated code for those 3 lines will look something like this: 1. } 2. $output .= "\n"; 3. elsif ($dosomethingelse) { > This component crashes... Why? Because of whitespace between the end of the > if block and the elsif. I wouldn't say it's a bug, but it would be > convenient if we didn't have to decipher the following error message as "you > have something that mason considers code between your if and elsif": Please don't try to twist this into whatever your magic ball tells you to :( I can comprehend the annoyance you felt when "discovering" the source of your error, but IMO this has nothing to do with "traps", "common" or otherwise. :( ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users