Changeset 9964 for docs/Perl6/FAQ

Show
Ignore:
Timestamp:
04/16/06 08:14:04 (3 years ago)
Author:
gaal
Message:

r10009@sike: roo | 2006-04-16 09:13:42 +0300

  • FAQ::Capture - method delegation. hw !! 3
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • docs/Perl6/FAQ/Capture.pod

    r9963 r9964  
    207207The C<$args> above becomes a Capture object. 
    208208 
     209=head3 What about delegating a method? 
     210 
     211[hw; there's probably a golfier way] 
     212Perl has a few other provisions for this (e.g., WRAP), but if you want 
     213more control over invocation, you need to pass through the Capture but 
     214replace the invocant: 
     215 
     216  method front_meth (\$args) { $:real_obj.back_meth( ??? ) } 
     217 
     218  # [ does $obj.meth($args) ignore a prebound invocant? ] 
     219 
    209220=head3 How is @x = (1, 2, 3) different from @y := (1, 2, 3) ? 
    210221