Skip to content
Browse files

Implement getting the name of a scalar container through $a.VAR.name.

  • Loading branch information...
1 parent 7e77c0c commit 5eed4409fca780d38197a9b29bc14950b8e33bb2 @jnthn jnthn committed Dec 10, 2011
Showing with 8 additions and 0 deletions.
  1. +7 −0 src/core/Scalar.pm
  2. +1 −0 tools/build/Makefile.in
View
7 src/core/Scalar.pm
@@ -0,0 +1,7 @@
+# This is mostly set up in BOOTSTRAP.pm.
+my class Scalar {
+ method name() {
+ my $d := $!descriptor;
+ nqp::isnull($d) ?? Str !! $d.name()
+ }
+}
View
1 tools/build/Makefile.in
@@ -152,6 +152,7 @@ CORE_SOURCES = \
src/core/Mu.pm \
src/core/Stringy.pm \
src/core/Any.pm \
+ src/core/Scalar.pm \
src/core/Code.pm \
src/core/WhateverCode.pm \
src/core/Block.pm \

0 comments on commit 5eed440

Please sign in to comment.
Something went wrong with that request. Please try again.