Respond to an unknown method call: Difference between revisions

Content added Content deleted
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
m (Fix Perl 6 -> Raku links)
Line 1,244: Line 1,244:
Sparrow: Hoist the Jolly Roger mateys, full speed ahead!</pre>
Sparrow: Hoist the Jolly Roger mateys, full speed ahead!</pre>


<tt>[http://design.perl6.org/S12.html#FALLBACK_methods FALLBACK]</tt> will be called for any method that is not defined. Since any class inherits from <tt>Any</tt>, there will be plenty of already defined methods. Those which are not defined can also be used as L-Values by the magic of <tt>[http://design.perl6.org/S12.html#Lvalue_methods is rw]</tt>.
<tt>[https://docs.raku.org/language/typesystem#index-entry-FALLBACK_(method) FALLBACK]</tt> will be called for any method that is not defined. Since any class inherits from <tt>Any</tt>, there will be plenty of already defined methods. Those which are not defined can also be used as L-Values by the magic of <tt>[https://docs.raku.org/type/Attribute#index-entry-trait_is_rw_(Attribute)-trait_is_rw is rw]</tt>.


<lang perl6>class L-Value {
<lang perl6>class L-Value {