Chapter 4 of 9
Perl 5 took the most from Perl 6
N.B. This material was collected and structured automatically, and may contain unintentional mistakes. Every claim links its source: please check it before relying on a detail.
Perl 5 is where Perl 6's design travelled furthest. Perl 5.10 brought in a whole set of Perl 6 features, use feature was built to import them, and CPAN modules such as Moose carried the object model across. The credits are in perl5-porters threads and module documentation rather than in release notes.
| Feature | Perl 6 date | Perl 5 version (date) | Credit in Perl's own record | Verdict |
|---|---|---|---|---|
say | ≤ A12 (16 Apr 2004); Perl6::Say on CPAN 27 Mar 2004; Pugs 18 Feb 2005 | 5.10.0 (18 Dec 2007) | feature.pm at 5.10.0 calls it the Perl 6 say function; Perl6::Say tells 5.10 users they no longer need it; the 2005 p5p patches were titled as Perl6-style and Perl 6 say (feature.pm @5.10.01; Perl6::Say2; msg987963; msg1063354) | Borrowed (documented) |
given/when, ~~ | RFC 22 (4 Aug 2000); A4 (15 Jan 2002); ~~ floated 24 Oct 2002, first in an Apocalypse in A6 (7 Mar 2003); Pugs Mar 2005 | 5.10.0; revised 5.10.1 (22 Aug 2009) | perlsyn at 5.10.0 says the switch feature is closely based on the Perl 6 proposal and lists differences from Perl 6; Robin Houston followed the Perl 6 spec and adapted the smartmatch table from Synopsis 4 (perlsyn @5.10.05; msg1072656; msg1075797) | Borrowed (documented); Perl 5 deprecated its smartmatch in 2023 |
(*THEN), (*COMMIT) | A5 :: and ::: (4 Jun 2002) | 5.10.0 | perlre identifies them with Perl 6's cut-group and commit constructs (perlre @5.10.08) | Borrowed (documented) |
no VERSION | — | 5.10.0 | perlfunc: added during early Raku design so programs could begin no 6; (perlfunc9) | Built for Perl 6 coexistence |
//, //= (err dropped) | A3 (2 Oct 2001) | patch posted 21 Apr 2002, committed 5 Aug 2002; 5.10.0 | Brent Dax's patch was titled as implementing Perl 6's //; the perldelta is silent (msg5743710; commit c963b1511; perl5100delta12) | Borrowed (documented): Perl 6's spelling for an older p5p wish |
state | E7 (27 Feb 2004); Pugs 6.2.3 (12 May 2005) | 5.10.0 | Rafael Garcia-Suarez, April 2006: it comes from Perl 6; the perldelta calls them static variables (msg11143913; perl5100delta12) | Borrowed (documented) |
\h, \H; new \v, \V | Perl 6 regex escapes | 5.10.0 | demerphq's 2007 patch says they are from Perl 6 and that Larry requested the \v change; the perldelta lists them uncredited (msg12364814) | Borrowed (documented) |
Lexical my $_ | — | 5.10.0; experimental 5.18; removed 5.24.0 | Uncredited in the 2004 patch; Nicholas Clark said in 2012 it had been taken blindly from Perl 6 (msg8699315; msg19163216; perl5240delta17) | Borrowed (documented in retrospect); removed |
use feature | — | 5.10.0 | Grew from Larry's 2002 suggestion of a use perl6ish pragma for Perl 6 features and Rafael's perl6ish patch (msg6417818; msg6571619) | Built to import Perl 6 features |
| C3 MRO | canonical MRO of Perl 6 and Parrot | Class::C3 (7 Aug 2005); 5.10.0 mro | mro.pm: Dylan, then Python 2.3, then Raku (mro.pm20) | Common ancestor (Dylan) |
| Moose / Class::MOP | A12; Pugs meta-model | Class::MOP 2 Feb 2006; Moose 0.01 15 Mar 2006 | Based in large part on the Perl 6 object system (Moose::Manual21; Class::MOP22) | Borrowed (documented), CPAN |
| Regexp::Grammars | A5 (2002); S05 | 24 Jul 2009 (CPAN) | Angle-bracket subrules as in Perl 6; <.SUBRULE> taken directly from Perl 6 (Regexp::Grammars23) | Borrowed (documented), CPAN |
Indented heredoc <<~ | RFC 162 (27 Aug 2000); A2 (3 May 2001) | 5.26.0 (30 May 2017) | Commit silent; Matthew Horsfall's 2016 thread proposed Perl 6's stripping rules and modelled the spelling on Ruby 2.3 (commit cdd637524; msg23747725; msg23751026) | Borrowed (documented): Raku's rule made stricter, Ruby's spelling |
| Chained comparisons | RFC 25 (4 Aug 2000); A3 (2 Oct 2001) | 5.32.0 (20 Jun 2020) | None in the 2017 ticket or the 2020 thread; Dax suggested a Perl 6 backport in July 2002 (msg6381927; msg25700528; perl5320delta29) | Borrowed (circumstantial) |
defer | LEAVE phaser (A4 era, S04) | 5.36.0 (27 May 2022), experimental | PPC0004 dropped the name LEAVE because the semantics differ from Raku's (PPC000430) | Raku considered, rejected; credits Swift, Zig, Jai, Nim, Odin |
class, field, method, ADJUST | A12 (16 Apr 2004) | 5.38.0 (2 Jul 2023), experimental | Core docs silent; Corinna designer Ovid names Raku among the biggest influences (Ovid31; perlclass32) | Influenced (documented by designer) |
any/all keywords | RFC 225 junctions (14 Sep 2000) | 5.42.0 (3 Jul 2025), experimental | Credited to List::Util; PPC0027 rejects junction semantics (perl5420delta33; PPC002734) | Raku explicitly not followed |
Named signature params :$x | A6 named-only +$x (7 Mar 2003), later :$x | 5.44.0 (15 Jul 2026), experimental | PPC0024 cites Function::Parameters, Kavorka, Method::Signatures; the latter two credit Perl 6 (PPC002435; Kavorka36; Method::Signatures37) | Borrowed indirectly via CPAN (documented chain) |
What the sources say 37
Perl 5 core documentation (feature.pm) lib/feature.pm at the perl-5.10.0 tag source ↗
Documents the new feature pragma, explaining that the say feature turns on Perl 6's say function and the switch feature turns on Perl 6's given/when construct.
Perl6::Say, Damian Conway's CPAN module Perl6::Say documentation, version 0.16 source ↗
Tells readers they can do without the module on Perl 5.10, where the Perl 6 function it provides is built in and switched on through the say feature.
Nigel Sandever perl5-porters, msg98796 source ↗
Submits a nine-line patch against Perl 5.8.6 that adds a say keyword, under a subject line presenting it as Perl 6-style, and asks whether the idea could be accepted.
Steve Peters, Perl 5 core committer perl5-porters, msg106335 source ↗
Posts a patch giving Perl 5 a built-in say taken from Perl 6, describing it as print with an automatic newline and following the documented behaviour of Perl6::Say.
Perl 5 core documentation (perlsyn) pod/perlsyn.pod at the perl-5.10.0 tag source ↗
Presents the switch feature as following Perl 6's proposed design closely, and adds a section on how Perl 5's given/when and smartmatch table differ from their Perl 6 counterparts.
Robin Houston, implementer of given/when and smartmatch perl5-porters, msg107265 source ↗
Unveils his given/when work, saying he chose to track the Perl 6 specification as far as was sensible instead of imitating Switch.pm, with the syntax switched on through a new use feature pragma.
Robin Houston, implementer of given/when and smartmatch perl5-porters, msg107579 source ↗
Announces that his first pass at a ~~ smartmatch operator is finished, grounded in the Perl 6 specification and using a dispatch table he derived from Synopsis 4's.
Perl 5 core documentation (perlre) pod/perlre.pod at the perl-5.10.0 tag source ↗
Likens the new backtracking verb (*THEN) to Perl 6's :: cut-group operator and identifies (*COMMIT) with Perl 6's <commit> or ::: pattern.
Perl 5 core documentation (perlfunc) pod/perlfunc.pod, entry for no source ↗
Says the no VERSION form was introduced while Raku, then called Perl 6, was first being designed, so that Perl 5 code could open with no 6.
Brent Dax, Parrot developer perl5-porters, msg57437 source ↗
Submits a patch that brings the //, //= and err operators from Perl 6 into Perl 5, with tests, perlop and B::Deparse changes, under a subject naming the operator as Perl 6's.
Brent Dax (author); committed by Hugo van der Sanden Perl/perl5 commit c963b15 (Perforce change 17682) source ↗
Applies a tidied version of the defined-or patch from Brent Dax to the Perl 5 sources; the commit message names no other language and makes no reference to Perl 6.
Perl 5 Porters (release notes) perl5100delta source ↗
Lists //, say, state, given/when and ~~ among 5.10.0's additions without crediting Perl 6, which it names only for the MAD converter work and the SVt_BIND type.
Rafael Garcia-Suarez, Perl 5.10 pumpking perl5-porters, msg111439 source ↗
Replying to Nick Ing-Simmons, confirms that state variables originate in Perl 6 and quotes the perltodo entry recommending state over my $x if 0, which calls the syntax Perl 6's.
Yves Orton (demerphq), regex engine maintainer perl5-porters, msg123648 source ↗
Patch redefining \v and \V as vertical whitespace, as Larry had earlier asked, adding \h and \H for horizontal whitespace, and stating that both pairs come from Perl 6.
Rafael Garcia-Suarez perl5-porters, msg86993 source ↗
Proposes letting $_ be declared lexical with my $_, so that operations defaulting to $_ use the lexical copy when one is in scope; the post makes no reference to Perl 6.
Nicholas Clark, Perl 5 core developer perl5-porters, msg191632 source ↗
Opens a thread arguing that Perl 6, a coherent design that split from Perl 5, cannot be borrowed from piecemeal, citing my $_ as a copy that lacks the rest it depends on.
Perl 5 Porters (release notes) perl5240delta source ↗
Announces that my $_ is gone after years of confusion and experimental status since 5.18, and widens hashbang redirection to perl followed by 6 for Perl 6 compatibility.
Hugo van der Sanden, Perl 5.9 development pumpking perl5-porters, msg64178 source ↗
Replying to Brent Dax, reports that Larry proposed routing Perl 6-ish features through a perl6ish pragma that takes a list of features, and asks for volunteers to lead the work.
Rafael Garcia-Suarez, later the Perl 5.10 pumpking perl5-porters, msg65716 source ↗
Posts a perl6ish pragma that lexically turns on forthcoming Perl 6-like syntax, for now just // and //=, which stay disabled unless the pragma is used.
Perl 5 core documentation (mro) ext/mro/mro.pm source ↗
Traces the C3 method resolution order from Dylan to Python 2.3 and finally to Raku, which made it the standard order for its classes.
Moose developers (Moose::Manual) Moose::Manual, Moose 2.4001 source ↗
Calls Moose largely based on the object model of Perl 6 plus ideas from CLOS and Smalltalk, grown out of meta-model prototypes Stevan Little built for Perl 6, yet not Perl 6 itself.
Class::MOP documentation, now shipped with Moose Class::MOP, Prior Art section, Moose 2.4001 source ↗
Lists the Pugs project's Perl 6 meta-model experiments as prior art for this Perl 5 meta-object protocol.
Damian Conway, module author Regexp::Grammars documentation, version 1.058 source ↗
Explains that a subrule is called by putting its name in angle brackets, as in Perl 6, and that the non-capturing <.SUBRULE> form was lifted straight from Perl 6.
Matthew Horsfall, Perl 5 core developer Perl/perl5 commit cdd6375 source ↗
Adds the <<~ heredoc modifier, which removes from each line the indentation found before the terminator and makes perl die on lines lacking it; Raku and Perl 6 go unmentioned.
Matthew Horsfall, Perl 5 core developer perl5-porters, msg237477 source ↗
Attaches a rough <<~ indented-heredoc patch, not yet stripping indentation, and suggests Perl 6's rules for it, outlining them: surplus indentation stays, lines indented too little are aligned with a warning.
Matthew Horsfall, Perl 5 core developer perl5-porters, msg237510 source ↗
Replying to Aristotle Pagaltzis, says he loosely based his <<~ spelling on Ruby 2.3, which picked it because <<- already meant something for heredocs, and is open to changing it.
Brent Dax, Parrot developer perl5-porters, msg63819 source ↗
Reposts the defined-or patch for Perl 5.8.0 and, among his questions, asks whether other low-impact Perl 6 features should be backported, offering chained comparison operators as an example.
Zefram, Perl 5 core developer perl5-porters, msg257005 source ↗
Opens the 67-message discussion of chained comparisons by pointing to his zefram/cmpchain branch; the thread argues over precedence and FETCH counts and names no other language.
Perl 5 Porters (release notes) perl5320delta source ↗
Announces that comparison operators can now be chained, a chain behaving like its separate tests joined with &&, without naming Raku, Perl 6, Python or another language as a model.
Paul Evans, PPC author Perl PPC 0004 (defer blocks) source ↗
Takes the defer name from Swift, Zig and other languages, and records that the block was first called LEAVE, a name dropped because Raku's phaser of that name behaves differently.
Curtis Poe (Ovid), designer of Corinna Corinna in the Perl Core, curtispoe.org source ↗
Recounts studying several languages, Raku among them, while designing Corinna, names Raku, Moose/Moo and Java as its strongest influences, and credits Paul Evans with the implementation.
Perl 5 core documentation (perlclass) pod/perlclass.pod source ↗
Documents the experimental class syntax without naming Raku, its History section included, and still lists roles, a role keyword plus a :does attribute, as future work.
Perl 5 Porters (release notes) perl5420delta source ↗
Adds experimental any and all keywords, crediting List::Util's functions of the same names, and keeps switch and smartmatch behind feature flags with their removal postponed indefinitely and no deprecation warning.
Paul Evans, PPC author Perl PPC 0027 (any and all) source ↗
Proposes block-taking any and all operators modelled on List::Util, and lists making them junctions as a rejected idea, since junction values need no new syntax and can come from ordinary modules.
Paul Evans, PPC author Perl PPC 0024 (named parameters in signatures) source ↗
Proposes named signature parameters with a leading colon, citing Function::Parameters, Kavorka and Method::Signatures as CPAN prior art using the same style, and never mentions Raku or Perl 6.
Toby Inkster, module author Kavorka documentation, version 0.039 source ↗
States that its signature syntax draws mainly on Perl 6, and lists Synopsis 6 alongside Function::Parameters and Method::Signatures as inspirations.
Michael Schwern, module author Method::Signatures documentation, version 20170211 source ↗
Presents its signatures as closely resembling Perl 6's, in the main a subset of them, and includes a section setting out where it differs from Perl 6.
Perl 5.10.0: the largest import
Perl 5.10.0 (18 December 2007) is the largest documented import of Perl 6 design into another language's core. Its release notes do not spell out the credits:
- The perldelta mentions Perl 6 for the MAD converter and for the
SVt_BINDplaceholder for implementing Perl 6 on Perl 5 (perl5100delta12). - The Perl Foundation's announcement spoke in general terms of features and inspiration taken from the Perl 6 project (Linux.com38).
- The specific credits are in feature.pm, perlsyn and perlre (perlre @5.10.08), and above all in the perl5-porters archive, whose threads name Perl 6 openly.
What the sources say 1
The Perl Foundation, as reported by Linux.com Linux.com report on the Perl 5.10 release source ↗
Relays the Perl Foundation's 5.10 announcement, which credits the Perl 6 project only in general terms for features and inspiration and names no particular feature.
How // and use feature arrived
| Date | What happened |
|---|---|
| October 1999 | Wilson Snyder asks for an ordef / ||| defined-or, with Larry Wall in the thread (msg179439) |
| February 2000 | John Tobey posts a working ||| patch (msg780240). The wish is older than Perl 6; Perl 6 supplied the spelling. |
| 21 April 2002 | Brent Dax posts a patch implementing Perl 6's // operator, six and a half months after A3 specified it. Dax was a Parrot developer who in 2001 had published Perl6::Parameters, to emulate Perl 6 named parameters in Perl 5 (msg5743710; Perl6::Parameters41) |
| July 2002 | Dax's repost asks whether other unobtrusive Perl 6 features should be backported, naming chained comparisons (msg6381927). Hugo van der Sanden, the 5.9 pumpking, replies that Larry had suggested a use perl6ish pragma for such features (msg6417818) |
| August 2002 | Rafael Garcia-Suarez posts the pragma (msg6571619) |
| December 2005 | The idea becomes use feature and its bundles (msg10770442). So the mechanism behind every later Perl 5 experiment was designed to import Perl 6. |
| September 2007 | The low-precedence err from Dax's patch had been kept because Perl 6 had it (msg10774343). Larry renames it orelse in Perl 6, and Perl 5 drops it before 5.10.0 (msg12832444) |
What the sources say 6
Wilson Snyder perl5-porters, msg1794 source ↗
Pleads for a defined-or operator in Perl 5, offering ordef, ||| and |||= as possible spellings.
John Tobey perl5-porters, msg7802 source ↗
Announces a working patch that adds |||, &&&, |||| and &&&& operators, logical operators that test definedness or existence rather than truth.
Brent Dax, module author Perl6::Parameters documentation, version 0.03 source ↗
Lets Perl 5 subroutines declare named parameters through prototypes styled after Perl 6, emulating the parameter syntax Perl 6 was to have.
Robin Houston, implementer of given/when and smartmatch perl5-porters, msg107704 source ↗
Patch that adds version bundles to the feature pragma, starting with a 5.9.3 bundle of switch, ~~, say and err, and places err behind its own feature.
Rafael Garcia-Suarez, Perl 5.10 pumpking perl5-porters, msg107743 source ↗
Answers that the low-precedence defined-or keyword is spelled err because that is its Perl 6 name, adding that backporting Perl 6 features is a fair topic for the list.
Rafael Garcia-Suarez, Perl 5.10 pumpking perl5-porters, msg128324 source ↗
Reports that Larry has replaced Perl 6's err with orelse and added andthen, citing Synopsis 3, and concludes that err is obsolete and will be dropped before 5.10 ships.
The 5.9.x port
The 5.9.x work openly ported Perl 6 features:
| Feature | Credit on perl5-porters |
|---|---|
say | Nigel Sandever posted a Perl 6-style say patch in March 2005 (msg987963). On Steve Peters's later patch, Rafael Garcia-Suarez, the 5.10 pumpking, said he missed say partly because he played with Pugs (msg10637845) |
| given/when | Damian Conway asked that any core switch follow Synopsis 4 (msg10697846). Robin Houston followed the Perl 6 spec as closely as he found sensible (msg1072656) |
~~ | Houston's smartmatch used a table adapted from S04's (msg1075797) |
state | Rafael said in April 2006 that it came from Perl 6 (msg11143913) |
\h, \v | demerphq's April 2007 patch said both were from Perl 6 (msg12364814) |
Lexical my $_ | Also from Perl 6. Nicholas Clark later said it had been taken without the rest of the design it needs (msg19163216). It became experimental in 5.18 and was removed in 5.24.0 (perl5240delta17) |
What the sources say 2
Rafael Garcia-Suarez, Perl 5.10 pumpking perl5-porters, msg106378 source ↗
Replying in the thread on Steve Peters's say patch, says he dislikes new and weak keywords but could be persuaded to admit say, chiefly because using Pugs has made him miss it.
Damian Conway, Perl 6 design team member and author of Switch.pm perl5-porters, msg106978 source ↗
Tells Robin Houston that Synopsis 4 is now the sole authoritative reference for a core switch, and urges taking Larry's improved design rather than preserving compatibility with Switch.pm.
The perldelta's silence about these reflects a writing convention, not an absence of borrowing.
Chained comparisons keep a circumstantial verdict. Dax's 2002 suggestion is on record, but Zefram's 2017 ticket and the 67-message 2020 thread that produced 5.32's chaining name no other language (msg24822447; msg25700528).
What the sources say 1
Zefram, Perl 5 core developer perl5-porters, msg248224 (RT #132607) source ↗
Files a wishlist ticket asking that string and numeric comparisons become chainable, each middle operand evaluated only once, naming no other language as a model.
Smartmatch: adopting a design in progress
Perl 5 adopted smartmatch early, while Perl 6's design of it was still changing. Today's perlsyn says Perl's table differs partly because the Raku spec changed after Perl 5 adopted it, and it recommends Raku-style any instead (perlsyn48).
What the sources say 1
Perl 5 core documentation (perlsyn) pod/perlsyn.pod source ↗
Says Perl's smartmatch table departs from Raku's partly because the Raku specification changed after Perl 5 adopted it early, recommends a Raku-style any in place of array smartmatch, and discourages switch in new code.
| Date | What happened |
|---|---|
| March 2005 | Michael Schwern is uneasy about fixing in Perl 5 a Perl 6 feature that might still change (msg9885049) |
| December 2005 | Houston's patch adds perlsyn's section on differences from Perl 6, and warns that the S04 table cannot yet be treated as final (msg10801350) |
| 3 January 2008 | Two weeks after 5.10.0, Larry Wall tells p5p that Perl 6 had decided a year earlier that ~~ must not be symmetric and that arrays no longer imply any. He apologises that these "old misfeatures of the early Perl 6 design" reached Perl 5; he had expected p5p to track the design's principles rather than its features (msg13246751) |
| 22 August 2009 | 5.10.1 makes ~~ non-commutative, dispatching mainly on the right operand (perl5101delta52) |
| 18 May 2013 | 5.18 makes smartmatch experimental (perl5180delta53) |
| December 2017 | A redesign is reverted because it broke too much of CPAN (7896dde54) |
| 2022 | switch leaves the 5.36 version bundle |
| 2 July 2023 | 5.38 deprecates switch and smartmatch, and schedules their removal for 5.42 (perl5380delta55) |
| August 2024 | The removal, written in July, is committed to blead (cb2167d56) |
| February 2025 | The removal is reverted (a215a7757) |
| 3 July 2025 | 5.42 keeps both behind the switch and smartmatch feature flags, with removal postponed indefinitely (perl5420delta33) |
What the sources say 9
Michael Schwern, Test::More maintainer perl5-porters, msg98850 source ↗
Leans slightly toward say but is uneasy about fixing a still-evolving Perl 6 feature into Perl 5 that the Perl 6 design might later change, and suggests first seeing whether Perl6::Say catches on.
Robin Houston, implementer of given/when and smartmatch perl5-porters, msg108013 source ↗
Patch adding a perlsyn section on differences from Perl 6, which explains departures from the Synopsis 4 smartmatch table and warns that the table cannot yet be treated as final.
Larry Wall, designer of Perl and Perl 6 perl5-porters, msg132467 source ↗
Says Perl 6 decided a year before that ~~ is asymmetric, driven only by its right operand, and that arrays no longer mean any, and apologises that these early Perl 6 mistakes reached Perl 5.
Perl 5 Porters (release notes) perl5101delta source ↗
Announces a reworked smartmatch whose ~~ stops being commutative and picks its behaviour mainly from the type of the right-hand operand.
Perl 5 Porters (release notes) perl5180delta source ↗
Makes ~~, given and when experimental with warnings, calling smartmatch a constant source of complaint that will probably change or disappear, and marks lexical $_ experimental as well.
Zefram, Perl 5 core developer Perl/perl5 commit 7896dde source ↗
Restores the smartmatch behaviour of 5.27.6, undoing the recent redesign, because the pumpking judged the resulting CPAN breakage too great to keep for 5.28.
Perl 5 Porters (release notes) perl5380delta source ↗
Declares the switch and smartmatch experiment failed, moves both from experimental to deprecated, and announces their complete removal in Perl 5.42.0.
Tony Cook, Perl 5 core developer Perl/perl5 commit cb2167d source ↗
Deletes the smartmatch operator from the Perl source as one step of removing the switch feature.
Tony Cook (author); committed by Aristotle Pagaltzis Perl/perl5 commit a215a77 source ↗
Reverts the earlier commit that removed smartmatch, putting the operator back into blead.
perlexperiment now lists them as experiments kept in place because they are widely used (perlexperiment58).
What the sources say 1
Perl 5 core documentation (perlexperiment) pod/perlexperiment.pod source ↗
Lists switch and smartmatch as failed experiments left in place because they are so widely used, noting that their planned removal in 5.42.0 was reversed.
How Perl 5's documentation credits Perl 6 today
- By 5.20, perlsyn described the switch as loosely based on an old version of the Perl 6 proposal (perlsyn @v5.20.059).
- A 2020 sweep replaced the name Perl 6 with Raku (commit 17b350460).
- From 5.34, feature.pm describes
sayas Raku-inspired (feature.pm61). - One release made room for Perl 6 itself: 5.24.0 extended hashbang redirection to
perl6, and 5.24.1 withdrew it because it misfired on interpreter paths such as/opt/perl64/bin/perl(perl5240delta17; perl5241delta62).
What the sources say 4
Perl 5 core documentation (perlsyn) pod/perlsyn.pod at the v5.20.0 tag source ↗
Describes the switch feature as only loosely derived from an outdated Perl 6 proposal and as no longer looking like Perl 6's own construct.
H. Merijn Brand (author); committed by Sawyer X, Perl 5 pumpking Perl/perl5 commit 17b3504 source ↗
Replaces the name Perl 6 with Raku across the Perl 5 sources where the change fits.
Perl 5 core documentation (feature.pm) lib/feature.pm source ↗
Describes the say feature as switching on a say function inspired by Raku, and the switch feature as switching on Raku's given/when construct.
Perl 5 Porters (release notes) perl5241delta source ↗
Withdraws the 5.24.0 hashbang redirection for perl6, since it misfired on an interpreter path like /opt/perl64/bin/perl.
CPAN carried even more
CPAN carried more Perl 6 into Perl 5 than core did:
| Module | Date | What it brought |
|---|---|---|
| Perl6::* modules | 2001–2009 | Dozens, by Damian Conway, Brent Dax, Luke Palmer, chromatic, Moritz Lenz and others. Conway's alone include Placeholders, Currying, Form, Export, Slurp, Gather, Say and Rules |
| Class::Roles | 12 December 2003 | chromatic's Perl 5 implementation of Perl 6 roles, four months before A12 was published (Class::Roles63) |
| Perl6::Junction | 2005 | Junctions, built from the Exegesis 6 design (Perl6::Junction64) |
| Perl6::Str | 2008 | A grapheme-level string API |
| Moose | 2006 | The Perl 6 object model; see below |
What the sources say 2
chromatic, module author Class::Roles documentation, version 0.30 source ↗
Describes itself as bringing Perl 6 roles to Perl 5.
Carl Franks, module author Perl6::Junction documentation, version 1.60000 source ↗
Offers Perl 6-style junction operators to Perl 5, credits the design documents of Perl 6 as its inspiration, and calls itself a reduced subset of Quantum::Superpositions.
Moose
Moose is the most consequential transfer.
- Its manual says it is based in large part on the Perl 6 object system, plus ideas from CLOS and Smalltalk (Moose::Manual21).
- Class::MOP 0.01 lists the Pugs Perl 6 meta-model work as its prior art (Class-MOP-0.0165).
- The
haskeyword is a strong circumstantial link. Moose 0.01'shas 'x' => (is => 'rw')transliterates A12'shas $.y is rw, whose declarator Larry Wall chose to signal a has-a rather than an is-a relationship. Stevan Little never said why he picked it (Moose-0.0166; A1267). - In 2012, Moose core developer Chris Prather said Little had set the Pugs meta-models aside, that Moose's meta-model is very different from Perl 6's, and that what it took from Perl 6 was minor syntax such as
has(msg19170668).
What the sources say 4
Stevan Little, author of Class::MOP and Moose Class::MOP 0.01 source, lib/Class/MOP.pm source ↗
The first Class::MOP release lists the Pugs project's Perl 6 meta-model work as prior art and points readers to CLOS and Smalltalk literature.
Stevan Little, author of Moose Moose 0.01 source, lib/Moose.pm source ↗
The first Moose release exports has, extends, around, before and after, declares an rw attribute with has in its synopsis, and gives no source for any of these keywords.
Larry Wall, Perl 6 designer Apocalypse 12, perl.com source ↗
Introduces Perl 6 attribute declarations such as has $.y is rw, explaining that the has keyword was picked to mark an attribute as something an object has rather than is.
Chris Prather, Moose core developer perl5-porters, msg191706 source ↗
Recounts that Stevan Little built and discarded several Pugs meta-models before starting Moose, that Perl 6 contributed only minor syntax, has for instance, and that Moose's meta-model is far from Perl 6's.
Signatures and classes
Signatures reached Perl 5 through three CPAN modules, each of which credits Perl 6's S06:
| Step | Date |
|---|---|
| Method::Signatures | 26 December 2007 |
| MooseX::Method::Signatures (MooseX::Method::Signatures69) | 24 September 2008 |
| Kavorka | 3 October 2013 |
Perl 5.44's :$name parameters, via PPC0024 (perl5440delta) | 15 July 2026 |
What the sources say 1
Florian Ragwitz, module author MooseX::Method::Signatures documentation, version 0.49 source ↗
States that its method signature syntax is modelled closely on Perl 6's.
The PPC itself does not name Raku.
The 5.38 class feature grew out of Paul Evans's Object::Pad test bed (2019). Object::Pad began with the has keyword of Raku and Moose, and switched to Corinna's field in 2022 (Object::Pad Changes70). Roles, where the Moose lineage started, are on perlclass's TODO list (perlclass32).
What the sources say 1
Paul Evans, Object::Pad author Object-Pad Changes file, CPAN source ↗
Records field arriving as a synonym for has in 0.66, field becoming the preferred keyword in 0.73, and has triggering compile-time deprecation warnings from 0.800.
The 2012 debate: "Perl 6 is not a menu"
The 2012 signature debates turned this experience into a rule of thumb: learn from Perl 6's designs, but adapt them to Perl 5.
| Who | What they said |
|---|---|
| Nicholas Clark | Opened a thread titled "Perl 6 is not a menu": parts of a coherent design that has grown apart from Perl 5 cannot be lifted back verbatim (msg19163216) |
| demerphq | Argued that most Perl 6-inspired features had worked out badly in Perl 5 (msg19164171) |
| Leon Timmermans | Answered with say and // as Perl 6-inspired features that worked well (msg19164272) |
| Ricardo Signes, then pumpking | Said Larry's designs suit Perl 6, and that Perl 5 should learn from them but design its own (msg19166273) |
| Reini Urban | Urged S06 as the model (msg19438574). In 2015 he was still arguing that Perl 5 should follow Perl 6's design choices, as it had not for signatures (msg23014675) |
What the sources say 5
Yves Orton (demerphq), regex engine maintainer perl5-porters, msg191641 source ↗
Replying to Nicholas Clark, calls nearly all Perl 5 features inspired by Perl 6 botched, invites counter-examples, and says Perl 6 has nothing to tell Perl 5 about its design.
Leon Timmermans, Perl 5 core developer perl5-porters, msg191642 source ↗
Answers demerphq with counter-examples: say as a good Perl 6-inspired feature, // as apparently borrowed too, and named captures as possibly another Perl 6 idea.
Ricardo Signes, Perl 5 pumpking perl5-porters, msg191662 source ↗
Argues that Larry's Perl 6 designs suit Perl 6, that copying them into Perl 5 without thought would end in disaster, and that Perl 5 should learn from them but design its own.
Reini Urban, B::C maintainer perl5-porters, msg194385 source ↗
Condemns Peter Martini's signature patch as blocking types and optional defaults and, among other faults, as following neither Perl 6 nor the conventions of existing signature modules.
Reini Urban, B::C maintainer perl5-porters, msg230146 source ↗
Tells a signature proposal to study Perl 6 and CPAN signature modules as prior art, holding that Perl 5 should as a rule follow Perl 6's design choices, as it failed to for signatures.
Perl 5 today
Modern p5p routes features through CPAN prototypes and PPCs. When Raku comes up now, Perl 5 usually takes the idea in its own direction:
| Proposal | The Raku design | Perl 5's choice |
|---|---|---|
defer | LEAVE | Another name (PPC000430) |
any / all | Junction values | Plain list operators (PPC002734) |
Everything-slices @a[*] | Raku's * | Not adopted (PPC000576) |
What the sources say 1
Ricardo Signes, PPC author and sponsor Perl PPC 0005 (everything slices) source ↗
Proposes a slice syntax such as @a[*] returning every element or pair, says the * was borrowed from Raku's general-purpose placeholder, and carries the status Rejected.
In September 2026, p5p was asked whether the new match/case proposals avoided Raku's keywords on purpose. The answer: given/when are now permanently discouraged, so neither those names nor ~~ can be reused, and any replacement must first solve smartmatch's number-versus-string ambiguity (msg27126277; msg27126578; msg27127479).
What the sources say 3
Darren Duncan perl5-porters, msg271262 source ↗
Asks whether the two current switch proposals, which use match and case, avoid the given and when keywords chosen by Raku on purpose or simply prefer the new words.
Dan Book, CPAN author perl5-porters, msg271265 source ↗
Explains that given was made experimental, deprecated with smartmatch and then left in as permanently discouraged, so its keywords cannot be reused any more than ~~ can.
Leon Timmermans, Perl 5 core developer perl5-porters, msg271274 source ↗
Says no candidate module or design deserves consideration unless it solves the number-versus-string ambiguity that afflicts smartmatch.
Some look-alikes have no Raku link in Perl's record, so they count as resemblance, not borrowing: __SUB__ (5.16), lexical subs (5.18), the infix isa proposed in 2019 (#1720080), for my ($k, $v) (5.36) and infix ^^ (5.40) (perl5400delta81).
What the sources say 2
Paul Evans (LeoNerd), Perl 5 core developer Perl/perl5 GitHub issue #17200 source ↗
Proposes an infix isa operator for testing whether an object belongs to a class; the issue names neither Raku nor Perl 6, nor Python, nor instanceof.
Perl 5 Porters (release notes) perl5400delta source ↗
Adds a ^^ logical xor operator to complete the set formed with && and ||, without mentioning Raku.