Subscribe

recursion??

You are viewing a single message from this topic. View all messages.

  1. 2001-03-12 06:04:57 PST
    Is there anyway that I can get HTML::Template to evaluate recursively without iteratively recusting templates myself. This is what I'd like be able to do:
    #!/usr/bin/perl -w
    use strict;
    use HTML::Template;
    my $s= '<tmpl_var name="foo">';
    my $h=HTML::Template->new(scalarref => \$s);
    $h->param( foo => '<tmpl_var name="bar">');
    $h->param( bar => 'baz');
    print $h->output();
    but this is the only way I can get it to work:
    #!/usr/bin/perl -w
    use strict;
    use HTML::Template;
    my $s= '<tmpl_var name="foo">';
    my $h=HTML::Template->new(scalarref => \$s);
    $h->param( foo => '<tmpl_var name="bar">');
    $s=$h->output();
    $h=HTML::Template->new(scalarref => \$s);
    $h->param( bar => 'baz');
    print $h->output();
Jump To:
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.