diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-08-25 09:50:02 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-08-25 09:50:02 -0700 |
commit | c931b03652afbc6f3525df91e6f1b821bf7c9fe3 (patch) | |
tree | 517008b87b4b6b8f94936681a51531ac04ef95d4 /gv.c | |
parent | e664e0a4d2b36e9c34f1d617414f811f59792c9b (diff) | |
download | perl-c931b03652afbc6f3525df91e6f1b821bf7c9fe3.tar.gz |
Allow ampersand calls for CORE subs with $*$$**$ protos
This enables ampersand calls and calls through references for CORE
subs that have * and $ in their prototypes and a fixed number of
arguments.
Usually, the *-prototyped ops have their child ops wrapped in rv2gv’s
(*{}) implicitly. The rv2gv op is sometimes flagged as an autoviv-
ificatory op, such as the first argument to accept() or open().
S_is_handle_constructor contains the list of ops that turn on
that flag.
This commit makes the coreargs op use a couple of flags to serve the
same purpose. pp_coreargs itself calls S_rv2gv (split out from
pp_rv2gv recently for precisely this purpose) with arguments based on
its own flags.
Currently the autovivified glob gets a name like main::_GEN_0 instead
of main::$a. I think we can live with that.
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 29 |
1 files changed, 12 insertions, 17 deletions
@@ -1351,31 +1351,26 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, case KEY_gt: case KEY_le: case KEY_lt: case KEY_ne: case KEY_or: case KEY_x: case KEY_xor: return gv; - case KEY_accept: case KEY_bind: case KEY_binmode: + case KEY_binmode: case KEY_bless: case KEY_caller: case KEY_chdir: case KEY_chmod: case KEY_chomp: case KEY_chop: case KEY_chown: - case KEY_close: case KEY_closedir: case KEY_connect: + case KEY_close: case KEY_dbmclose: case KEY_dbmopen: case KEY_die: case KEY_each: case KEY_eof: case KEY_exec: case KEY_exit: - case KEY_fcntl: case KEY_fileno: case KEY_flock: - case KEY_formline: case KEY_getc: case KEY_getpeername: - case KEY_getpgrp: case KEY_getsockname: case KEY_getsockopt: - case KEY_gmtime: case KEY_index: case KEY_ioctl: case KEY_join: - case KEY_keys: case KEY_kill: case KEY_listen: + case KEY_formline: case KEY_getc: case KEY_getpgrp: + case KEY_gmtime: case KEY_index: case KEY_join: + case KEY_keys: case KEY_kill: case KEY_localtime: case KEY_lock: case KEY_lstat: - case KEY_mkdir: case KEY_open: case KEY_opendir: case KEY_pack: - case KEY_pipe: case KEY_pop: case KEY_push: case KEY_rand: - case KEY_read: case KEY_readdir: case KEY_readline: + case KEY_mkdir: case KEY_open: case KEY_pack: case KEY_pop: + case KEY_push: case KEY_rand: case KEY_read: case KEY_readline: case KEY_recv: case KEY_reset: case KEY_reverse: - case KEY_rewinddir: case KEY_rindex: case KEY_seek: - case KEY_seekdir: case KEY_select: case KEY_send: - case KEY_setpgrp: case KEY_setsockopt: case KEY_shift: - case KEY_shutdown: case KEY_sleep: case KEY_socket: - case KEY_socketpair: case KEY_splice: case KEY_sprintf: + case KEY_rindex: case KEY_select: case KEY_send: + case KEY_setpgrp: case KEY_shift: case KEY_sleep: + case KEY_splice: case KEY_sprintf: case KEY_srand: case KEY_stat: case KEY_substr: case KEY_syscall: case KEY_sysopen: case KEY_sysread: - case KEY_sysseek: case KEY_system: case KEY_syswrite: - case KEY_tell: case KEY_telldir: case KEY_tie: case KEY_tied: + case KEY_system: case KEY_syswrite: + case KEY_tell: case KEY_tie: case KEY_tied: case KEY_truncate: case KEY_umask: case KEY_unlink: case KEY_unpack: case KEY_unshift: case KEY_untie: case KEY_utime: case KEY_values: case KEY_warn: case KEY_write: |