Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lexical subs can't be found in the setting #1168

Closed
p6rt opened this issue Jul 24, 2009 · 5 comments
Closed

lexical subs can't be found in the setting #1168

p6rt opened this issue Jul 24, 2009 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jul 24, 2009

Migrated from rt.perl.org#67868 (status was 'resolved')

Searchable as RT67868$

@p6rt
Copy link
Author

p6rt commented Jul 24, 2009

From @moritz

If I add a lexical sub in the setting and then call it from within the
same file, I get 'Could not find non-existent $sub'.

The attached patch demonstrates this. Apply it, reconfigure, recompile
and run
$ perl6 -e 'caller()'

Cheers,
Moritz

@p6rt
Copy link
Author

p6rt commented Jul 24, 2009

From @moritz

0001-initial-NYI.pm-implementation.patch
From 9326bf8285aafaa09100d3e5db54f8efa619a324 Mon Sep 17 00:00:00 2001
From: Moritz Lenz <moritz@faui2k3.org>
Date: Fri, 24 Jul 2009 22:32:40 +0200
Subject: [PATCH] initial NYI.pm implementation

---
 build/Makefile.in  |    1 +
 src/setting/NYI.pm |   10 ++++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)
 create mode 100644 src/setting/NYI.pm

diff --git a/build/Makefile.in b/build/Makefile.in
index 5527a03..37f317f 100644
--- a/build/Makefile.in
+++ b/build/Makefile.in
@@ -126,6 +126,7 @@ SETTING = \
   src/setting/List.pm \
   src/setting/Match.pm \
   src/setting/Num.pm \
+  src/setting/NYI.pm \
   src/setting/Object.pm \
   src/setting/Operators.pm \
   src/setting/Pair.pm \
diff --git a/src/setting/NYI.pm b/src/setting/NYI.pm
new file mode 100644
index 0000000..507ec49
--- /dev/null
+++ b/src/setting/NYI.pm
@@ -0,0 +1,10 @@
+my sub nyi($what) {
+    die "$what is not yet implemented in Rakudo, sorry"
+};
+
+multi caller() { nyi('caller()') }
+multi want()   { nyi('want()')   }
+
+caller();
+
+# vim: ft=perl6
-- 
1.5.6.5

@p6rt
Copy link
Author

p6rt commented Sep 14, 2011

From @jnthn

On Fri Jul 24 13​:35​:41 2009, moritz wrote​:

If I add a lexical sub in the setting and then call it from within the
same file, I get 'Could not find non-existent $sub'.

Well, every sub in the setting is lexical now, so I guess this works
these days... ;-)

/jnthn

@p6rt
Copy link
Author

p6rt commented Sep 14, 2011

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Sep 14, 2011

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Sep 14, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant