Nope, there is no special command for doing this - you have to use a
Perl construct, as in your examples.
On Oct 18, 2008, at 2:47 PM, Tom Jefferson wrote:
Hello,
I was wondering if there is any preferred method for jumping to
the end or exiting and <%init> block? I've spent quite a bit of time
searching around and couldn't find an answer so I thought I ask the
experts here, TIA.
Currently I use *shudder* goto, first time I've ever needed it.
Simplified example, basically I need to drop out or exit init when
certain conditions are met. I could probably write some pretty
knarly nested if/elsif/else loops to do what I want but it could get
ugly.
<%init>
if(check_condition1)
{
goto END;
}
../code/..
if(check_condition2)
{
goto END;
}
if(check_condition3)
{
goto END;
}
../and so on/..
END:
</%init>
I have also seen an example using something like this:
<%init>
INIT: {
../code/..
if(check_condition)
{
last INIT;
}
../code/..
}
</%init>
I'm not sure what is the *better* way or if Mason has a command I
can use to do this.
You live life beyond your PC. So now Windows goes beyond your PC.
See how
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win
great prizes
Grand prize is a trip for two to an Open Source event anywhere in
the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users