diff options
author | Chip Salzenberg <chip@perl.com> | 1997-04-30 00:00:00 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-04-30 00:00:00 +1200 |
commit | 6da72b644b845971d5b417f3c6f5590e23084bcd (patch) | |
tree | 322d1e0b1a154d0b12f1fcc49838fe9a9aa4288c /pod/perldelta.pod | |
parent | 404b15a1d1b7c56f5774b99fd0d4b6854620182b (diff) | |
download | perl-6da72b644b845971d5b417f3c6f5590e23084bcd.tar.gz |
Support C< $coderef->($x,$y) >
Randal Schwartz said:
> Some time in October, 1994, Larry Wall said:
> > : All other references you can follow with ->, what about code refs?
> > Aw, look, I'd really like that feature in, but I think it's a bit
> > too close to the release for that.
> Hey Chip,
> Look, Larry said he'd really like that feature
Larry said that? That change is like two lines, it's in!
Tricked-into-doing-by: Randal Schwartz <merlyn@stonehenge.com>
Diffstat (limited to 'pod/perldelta.pod')
-rw-r--r-- | pod/perldelta.pod | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 930773ca02..f4a4d232ca 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -190,6 +190,24 @@ It is now possible to build Perl with AT&T's sfio IO package instead of stdio. See L<perlapio> for more details, and the F<INSTALL> file for how to use it. +=head2 New and changed syntax + +=over + +=item $coderef->(PARAMS) + +A subroutine reference may now be suffixed with an arrow and a +(possibly empty) parameter list. This syntax denotes a call of the +referenced subroutine, with the given parameters (if any). + +This new syntax follows the pattern of C<$hashref-E<gt>{FOO}> and +C<$aryref-E<gt>[$foo]>; now, C<&$subref($foo)> may now be written +C<$subref-E<gt>($foo)>. All of these arrow terms may be chained; +thus, C<&{$table-E<gt>{FOO}}($bar)> may now be written +C<$table-E<gt>{FOO}->($bar)>. + +=back + =head2 New and changed builtin constants =over |