Reflection/Get source: Difference between revisions

Content added Content deleted
m (include_files() now exists)
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
Line 311: Line 311:
<lang nanoquery>import Nanoquery.IO
<lang nanoquery>import Nanoquery.IO
println new(File, __file__).readAll()</lang>
println new(File, __file__).readAll()</lang>

=={{header|Perl 6}}==
{{Works with|rakudo|2016.11}}


A full path is provided for built-in routines/methods. However for routines exported by pre-compiled modules a precompilation hash is returned, not a proper file path.

<lang perl6>say &sum.file;
say Date.^find_method("day-of-week").file;</lang>

{{out}}
<pre>
SETTING::src/core/Any.pm
SETTING::src/core/Dateish.pm
</pre>


=={{header|Phix}}==
=={{header|Phix}}==
Line 361: Line 346:
# "/usr/local/lib/python3.5/os.pyc"
# "/usr/local/lib/python3.5/os.pyc"
</lang>
</lang>

=={{header|Raku}}==
(formerly Perl 6)
{{Works with|rakudo|2016.11}}


A full path is provided for built-in routines/methods. However for routines exported by pre-compiled modules a precompilation hash is returned, not a proper file path.

<lang perl6>say &sum.file;
say Date.^find_method("day-of-week").file;</lang>

{{out}}
<pre>
SETTING::src/core/Any.pm
SETTING::src/core/Dateish.pm
</pre>


=={{header|REXX}}==
=={{header|REXX}}==