I need a global to check if a plugin is installed or not, so decide to execute the tag in the template or not.
This is how I would like to do:
<%Plugins::myplugin::function%><%endif%>
I also checked your code, and works fine:
and then in your global:
my %hash = @_;
use Data::Dumper;
print "<br>\n hash: " . Dumper(\%hash) . "<br>\n";This works fine. Hash content will be: { 'foo' => '1', 'bar' => '2' }.
But if I place an 'if' statement before the global call, then will not print the hash as earlier :
Hash content will be: { 'HASH(0x21cd8c8)' => undef }.
Why? What happens if I use 'if' statement? Does is pass arguments other way?
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
This is how I would like to do:
Code:
<%if check_plugin( 'foo' => '1', 'bar' => '2' )%> <%Plugins::myplugin::function%><%endif%>
I also checked your code, and works fine:
Code:
<%mytag( foo => 1, bar => 2 )%> and then in your global:
my %hash = @_;
use Data::Dumper;
print "<br>\n hash: " . Dumper(\%hash) . "<br>\n";
But if I place an 'if' statement before the global call, then will not print the hash as earlier :
Code:
<%if mytag( foo => 1, bar => 2 )%>Why? What happens if I use 'if' statement? Does is pass arguments other way?
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...