Hi,
I know about this problem with the template parser - basically, it needs some parser overhauling to compartmentalize and break down much of the parsing. We did try and hack that in at one point, but it ended up causing several failures in our template test script so unfortunately we had to remove it.
Right now, the best solution to your problem is to do this in two steps:
<%set have_plugin = check_plugin(foo => 1, bar => 2)%>
<%if have_plugin%><%Plugins::myplugin::function%><%endif%>
Also note that you can
sort of call subroutines in an if, like this:
<%if Package::function%>
You can get away with passing arguments this way, but if you do so, be warned that it doesn't always work 100% correctly - if you have the word "and" or "or" in there, calling it that way
will break things. By far the safest and most worry-free way when you need to pass arguments is to use the 'set', as I showed above.
Jason Rhinelander
Gossamer Threads jason@gossamer-threads.com