<start_html lang="en-US" title="blocks">

<p>BLOCK1:</p>
<perl handler="hello0">
<block name="hello0">
<p>
Hello World 1
</block>
</perl>

<p>BLOCK2:</p>
<perl handler="hello1">
<block name="hello1">
<p>
Hello World ${i}
</block>
</perl>

<perl handler="hello2">

<p>BLOCK3:</p>
<block name="hello2">
<p>
Hello World 1
</block>

<p>BLOCK4:</p>
<block name="hello3">
<p>
Hello World ${i}
</block>
</perl>

</perl>


__PERL__

sub hello0 {
    my $s=shift();
    for (0..3) {
        $s->render_block('hello0');
    }
    $s->render();
}


sub hello1 {
    my $s=shift();
    for (0..3) {
        $s->render_block('hello1', i=> $_);
    }
    $s->render();
}


sub hello2 {
    my $s=shift();
    for (0..3) {
        $s->render_block('hello2', i=> $_);
        $s->render_block('hello3', i=> $_);
    }
    $s->render();
}
1;
