Introspection: Difference between revisions

Content added Content deleted
m (→‎{{header|zkl}}: fix bare tag)
m (→‎{{header|Raku}}: Fix link: Perl 6 --> Raku)
Line 1,922: Line 1,922:
=={{header|Raku}}==
=={{header|Raku}}==
(formerly Perl 6)
(formerly Perl 6)
<lang perl6>use v6; # require Perl 6
<lang perl6>my $bloop = -123;

my $bloop = -123;


if MY::{'$bloop'}.defined and CORE::{'&abs'}.defined { say abs $bloop }
if MY::{'$bloop'}.defined and CORE::{'&abs'}.defined { say abs $bloop }
Line 1,935: Line 1,933:
Number of PROCESS vars of type Int: 1
Number of PROCESS vars of type Int: 1
PROCESS vars of type Int add up to 28785</pre>
PROCESS vars of type Int add up to 28785</pre>
Obviously Perl 6 doesn't maintain a lot of global integer variables... <tt>:-)</tt>
Obviously Raku doesn't maintain a lot of global integer variables... <tt>:-)</tt>


Nevertheless, you can use similar code to access all the variables in any package you like,
Nevertheless, you can use similar code to access all the variables in any package you like,