@@ -480,7 +480,6 @@ hierarchical data structure through C<$=pod>.
480
480
Note that all those C<$=someBlockName> support the L<C<Positional>|/type/Positional> and the
481
481
L<C<Associative>|/type/Associative> roles.
482
482
483
- X<|Syntax,$~>
484
483
=head2 The C<~> twigil
485
484
486
485
The C<~> twigil is for referring to sublanguages (called slangs). The
@@ -1018,8 +1017,6 @@ stay as 84 because the block returns a defined value (C<say> returns
1018
1017
C<True>). Otherwise the C<die> statement will cause the block to exit
1019
1018
unsuccessfully, resetting the answer to 42.
1020
1019
1021
- X<|Syntax,constant (Prefix)>
1022
- X<|Language,constants (syntax)>
1023
1020
=head2 The C<constant> prefix
1024
1021
1025
1022
The C<constant> prefix declares that the value it tags is not going to change
@@ -1358,7 +1355,7 @@ C<META6.json> file:
1358
1355
1359
1356
Every resource file is added to an B<installed> Distribution and is
1360
1357
accessible using a L<C<Hash>|/type/Hash>-like access to C<%?RESOURCES>, returning a
1361
- C< Distribution::Resource> object:
1358
+ L<C<Distribution::Resource>|/type/ Distribution::Resource> object:
1362
1359
1363
1360
=begin code
1364
1361
my $foo-IO = %?RESOURCES<images/foo.jpg>; # gets an object you can slurp
@@ -1552,15 +1549,13 @@ for examples and more context.
1552
1549
1553
1550
C<@*ARGS> is an array of L<C<Str>|/type/Str> containing the arguments from the command line.
1554
1551
1555
- X<|Variables,&*ARGS-TO-CAPTURE>
1556
1552
=head4 C<&*ARGS-TO-CAPTURE>
1557
1553
1558
1554
A dynamic variable available inside any custom
1559
1555
L<C<ARGS-TO-CAPTURE>|/language/create-cli#sub_ARGS-TO-CAPTURE> subroutine
1560
1556
that can be used to perform the default argument parsing. Takes the same
1561
1557
parameters as are expected of the custom C<ARGS-TO-CAPTURE> subroutine.
1562
1558
1563
- X<|Variables,&*GENERATE-USAGE>
1564
1559
=head4 C<&*GENERATE-USAGE>
1565
1560
1566
1561
A dynamic variable available inside any custom
@@ -1589,26 +1584,22 @@ Standard error filehandle, AKA I<STDERR>.
1589
1584
These dynamic variables contain information related to the environment the
1590
1585
script or program is running in.
1591
1586
1592
- X<|Variables,%*ENV>
1593
1587
=head4 C<%*ENV>
1594
1588
1595
1589
Operating system environment variables. Numeric values are provided
1596
1590
as L<allomorphs|/language/glossary#Allomorph>.
1597
1591
1598
- X<|Variables,$*REPO>
1599
1592
=head4 C<$*REPO>
1600
1593
1601
1594
This variable holds information about modules installed/loaded.
1602
1595
1603
- X<|Variables,$*INIT-INSTANT>
1604
1596
=head4 C<$*INIT-INSTANT>
1605
1597
1606
1598
C<$*INIT-INSTANT> is an L<C<Instant>|/type/Instant> object representing program
1607
1599
startup time. In particular, this is when the core code starts up, so the value
1608
1600
of C<$*INIT-INSTANT> may be a few milliseconds earlier than C<INIT now> or even
1609
1601
C<BEGIN now> executed in your program.
1610
1602
1611
- X<|Variables,$*TZ>
1612
1603
=head4 C<$*TZ>
1613
1604
1614
1605
C<$*TZ> is a dynamic variable intended to contain an object with information
@@ -1620,20 +1611,17 @@ further information, set the first time C<$*TZ> is accessed. Any
1620
1611
daylight saving time changes occurring during the duration of the
1621
1612
process will B<not> be seen in that case.
1622
1613
1623
- X<|Variables,$*CWD>
1624
1614
=head4 C<$*CWD>
1625
1615
1626
1616
It contains the C<C>urrent C<W>orking C<D>irectory.
1627
1617
1628
- X<|Variables,$*KERNEL>
1629
1618
=head4 C<$*KERNEL>
1630
1619
1631
1620
C<$*KERNEL> contains a L<C<Kernel> instance|/type/Kernel>, the C<.gist> of it
1632
1621
being the current running kernel.
1633
1622
1634
1623
say $*KERNEL; # OUTPUT: «linux (4.4.92.31.default)»
1635
1624
1636
- X<|Variables,$*DISTRO>
1637
1625
=head4 C<$*DISTRO>
1638
1626
1639
1627
This object (of type L<C<Distro>|/type/Distro>) contains information about the current operating
@@ -1662,7 +1650,6 @@ useful to create portable programs, such as the path separator:
1662
1650
# signature => Blob, desc => "2018-12-13T08:50:59.213619+01:00")»
1663
1651
1664
1652
1665
- X<|Variables,$*VM>
1666
1653
=head4 C<$*VM>
1667
1654
1668
1655
This variable contains the current virtual machine running the code, as well as
@@ -1682,7 +1669,6 @@ configuration values used to create the virtual machine, e.g.
1682
1669
which are the version of the virtual machine, generally the same one as the one
1683
1670
used in the interpreter and the overall Raku environment.
1684
1671
1685
- X<|Variables,$*RAKU>
1686
1672
=head4 C<$*RAKU>
1687
1673
1688
1674
This object of the L<C<Raku>|/type/Raku> class contains information on the
@@ -1703,38 +1689,32 @@ B<Note:> Before Rakudo release 2020.1, this information was only
1703
1689
available through the C<$*PERL> variable. Since Rakudo release 2020.1,
1704
1690
it is available through both the C<$*RAKU> and the C<$*PERL> variables.
1705
1691
1706
- X<|Variables,$*PERL>
1707
1692
=head4 C<$*PERL>
1708
1693
1709
1694
For the foreseeable future, the same as C<$*RAKU>. Will be deprecated at
1710
1695
some point.
1711
1696
1712
- X<|Variables,$*PID>
1713
1697
=head4 C<$*PID>
1714
1698
1715
1699
Object containing an integer describing the current Process IDentifier
1716
1700
(operating system dependent).
1717
1701
1718
- X<|Variables,$*PROGRAM-NAME>
1719
1702
=head4 C<$*PROGRAM-NAME>
1720
1703
1721
1704
This contains the path to the current executable as it was entered on the
1722
1705
command line, or C<-e> if raku was invoked with the -e flag.
1723
1706
1724
- X<|Variables,$*PROGRAM>
1725
1707
=head4 C<$*PROGRAM>
1726
1708
1727
1709
Contains the location (in the form of an L<C<IO::Path>|/type/IO::Path> object) of the Raku
1728
1710
program being executed.
1729
1711
1730
- X<|Variables,&*EXIT>
1731
1712
=head4 C<&*EXIT>
1732
1713
1733
1714
This is a L<C<Callable>|/type/Callable> that contains the code that will be
1734
1715
executed when doing an C<exit()> call. Intended to be used in situations where
1735
1716
Raku is embedded in another language runtime (such as Inline::Perl6 in Perl).
1736
1717
1737
- X<|Variables,$*EXIT>
1738
1718
=head4 C<$*EXIT>
1739
1719
1740
1720
Using C<$*EXIT> usually only makes sense in an L<END|/language/phasers#END>
@@ -1744,7 +1724,6 @@ C<exit(N)> was executed.
1744
1724
1745
1725
Support for C<$*EXIT> was added in Rakudo compiler release 2023.02.
1746
1726
1747
- X<|Variables,$*EXCEPTION>
1748
1727
=head4 C<$*EXCEPTION>
1749
1728
1750
1729
Using C<$*EXCEPTION> usually only makes sense in an L<END|/language/phasers#END>
@@ -1754,20 +1733,17 @@ type object otherwise.
1754
1733
1755
1734
Support for C<$*EXCEPTION> was added in Rakudo compiler release 2023.02.
1756
1735
1757
- X<|Variables,$*EXECUTABLE>
1758
1736
=head4 C<$*EXECUTABLE>
1759
1737
1760
1738
Contains an L<C<IO::Path>|/type/IO::Path> absolute path of the raku executable that is currently
1761
1739
running.
1762
1740
1763
- X<|Variables,$*EXECUTABLE-NAME>
1764
1741
=head4 C<$*EXECUTABLE-NAME>
1765
1742
1766
1743
Contains the name of the Raku executable that is currently running. (e.g.
1767
1744
raku-p, raku-m). Favor C<$*EXECUTABLE> over this one, since it's not
1768
1745
guaranteed that the raku executable is in C<PATH>.
1769
1746
1770
- X<|Variables,$*USAGE>
1771
1747
=head4 C<$*USAGE>
1772
1748
1773
1749
This is an object of type L<C<Str>|/type/Str> containing the default usage message
@@ -1781,33 +1757,28 @@ sub MAIN($a, :$b, UInt :$ehehe) {
1781
1757
1782
1758
It is accessible only inside of MAIN sub.
1783
1759
1784
- X<|Variables,$*USER>
1785
1760
=head4 C<$*USER>
1786
1761
1787
1762
An L<C<Allomorph>|/type/Allomorph> with information about the user that is running the program. It
1788
1763
will evaluate to the username if treated as a string and the numeric user id if
1789
1764
treated as a number.
1790
1765
1791
- X<|Variables,$*GROUP>
1792
1766
=head4 C<$*GROUP>
1793
1767
1794
1768
An L<C<Allomorph>|/type/Allomorph> with the primary group of the user who is running the program.
1795
1769
It will evaluate to the groupname only if treated as a string and the numeric
1796
1770
group id if treated as a number.
1797
1771
1798
- X<|Variables,$*HOMEDRIVE>
1799
1772
=head4 C<$*HOMEDRIVE>
1800
1773
1801
1774
Contains information about the "home drive" of the user that is running the
1802
1775
program on Windows. It's not defined in other operating systems.
1803
1776
1804
- X<|Variables,$*HOMEPATH>
1805
1777
=head4 C<$*HOMEPATH>
1806
1778
1807
1779
Contains information about the path to the user directory that is running the
1808
1780
program on Windows. It's not defined in other operating systems.
1809
1781
1810
- X<|Variables,$*HOME>
1811
1782
=head4 C<$*HOME>
1812
1783
1813
1784
Contains an L<C<IO::Path>|/type/IO::Path> object representing the "home directory" of the user
@@ -1816,27 +1787,23 @@ that is running the program. Uses V«%*ENV<HOME>» if set.
1816
1787
On Windows, uses V«%*ENV<HOMEDRIVE> ~ %*ENV<HOMEPATH>». If the home directory
1817
1788
cannot be determined, it will be L<C<Any>|/type/Any>.
1818
1789
1819
- X<|Variables,$*SPEC>
1820
1790
=head4 C<$*SPEC>
1821
1791
1822
1792
Contains the appropriate L<C<IO::Spec>|/type/IO::Spec> sub-class for the platform that the program
1823
1793
is running on. This is a higher-level class for the operating system; it will
1824
1794
return C<Unix>, for instance, in the case of Linux (in the form of the
1825
1795
L<C<IO::Spec>|/type/IO::Spec> class used for the current implementation).
1826
1796
1827
- X<|Variables,$*TMPDIR>
1828
1797
=head4 C<$*TMPDIR>
1829
1798
1830
1799
This is an L<C<IO::Path>|/type/IO::Path> object representing the "system temporary directory" as
1831
1800
determined by L«C<.tmpdir IO::Spec::* method>|/routine/tmpdir».
1832
1801
1833
- X<|Variables,$*THREAD>
1834
1802
=head4 C<$*THREAD>
1835
1803
1836
1804
Contains a L<C<Thread>|/type/Thread> object representing the currently executing
1837
1805
thread.
1838
1806
1839
- X<|Variables,$*SCHEDULER>
1840
1807
=head4 C<$*SCHEDULER>
1841
1808
1842
1809
This is a L<C<ThreadPoolScheduler>|/type/ThreadPoolScheduler> object representing
@@ -1853,7 +1820,6 @@ create a scoped copy with the default changed before using them:
1853
1820
1854
1821
This behavior is not tested in the spec tests and is subject to change.
1855
1822
1856
- X<|Variables,$*SAMPLER>
1857
1823
=head4 C<$*SAMPLER>
1858
1824
1859
1825
The current L<C<Telemetry::Sampler>|/type/Telemetry::Sampler> used for making snapshots of system state.
@@ -1864,19 +1830,16 @@ Only available if L<C<Telemetry>|/type/Telemetry> has been loaded.
1864
1830
These variables affect the behavior of certain functions, and in some cases its
1865
1831
value can be changed during runtime.
1866
1832
1867
- X<|Variables,$*DEFAULT-READ-ELEMS>
1868
1833
=head4 C<$*DEFAULT-READ-ELEMS>
1869
1834
1870
1835
Affects the number of bytes read by default by
1871
1836
L<C<IO::Handle.read>|/type/IO::Handle#method_read>. Its default value is 65536.
1872
1837
1873
- X<|Variables,$*COLLATION>
1874
1838
=head4 C<$*COLLATION>
1875
1839
1876
1840
This is a L<C<Collation>|/type/Collation> object that can be used to
1877
1841
configure Unicode collation levels.
1878
1842
1879
- X<|Variables,$*RAT-OVERFLOW>
1880
1843
=head4 C<$*RAT-OVERFLOW>
1881
1844
1882
1845
Available as of release 2022.02 of the Rakudo compiler.
@@ -1921,7 +1884,6 @@ class ZeroOrInf {
1921
1884
}
1922
1885
=end code
1923
1886
1924
- X<|Variables,$*TOLERANCE>
1925
1887
=head4 C<$*TOLERANCE>
1926
1888
1927
1889
Variable used by the L<C<=~=>|/routine/=~=> operator, and any operations that
0 commit comments