From 43424b9438dff43a056e4563b47e1f334dd94a25 Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Sun, 10 Oct 2010 22:56:19 +0100 Subject: added a brief proof-of-concept for loading/reloading additional functions on the fly from within irssi scripts. --- feature-tests/test.sub | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 feature-tests/test.sub (limited to 'feature-tests/test.sub') diff --git a/feature-tests/test.sub b/feature-tests/test.sub new file mode 100644 index 0000000..6a24879 --- /dev/null +++ b/feature-tests/test.sub @@ -0,0 +1,6 @@ +{ + 'moo' => sub { print "Moo" }, + 'hello' => sub { print join(", ", @_) } +}; + + -- cgit v1.2.3 From 745b2901e2f635d6a57cbe3e40695a6fe751f97b Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Sun, 10 Oct 2010 23:11:52 +0100 Subject: tidied up loading code, added demo of calling func in outer scope --- feature-tests/test.sub | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'feature-tests/test.sub') diff --git a/feature-tests/test.sub b/feature-tests/test.sub index 6a24879..350e89d 100644 --- a/feature-tests/test.sub +++ b/feature-tests/test.sub @@ -1,6 +1,7 @@ { 'moo' => sub { print "Moo" }, - 'hello' => sub { print join(", ", @_) } + 'hello' => sub { print join(", ", @_) }, + 'inp' => sub { print "input is : ", _input(); }, }; -- cgit v1.2.3