[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] Function inside user tag


Ok.
Powerful.
Thank you.
Marco

Mike Heins ha scritto:
Quoting Peter (suppressed):
On 11/23/2007 03:28 AM, Marco Mescoli wrote:
Is it possible declare and call a perl function inside user tag ?
Digged mailing list without any example ...
I usually do something like:

...................

# Declare sub foo
my $foo = sub {
	my ($bar, $baz) = @_;
}


# Call foo
&$foo($bar, $baz);

...................


I think you can also just declare the sub and call it, but I've never
tried it.  I know the above works, though.


It works to the point that you can create packages, modules, and
everything else and call them.

In fact, you will see Usertags like [get-url] "require" modules then
use their routines. And we frequently define subs in UserTags.

_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.