summaryrefslogtreecommitdiff
path: root/pod/perldelta.pod
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-08-19 08:27:14 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-08-24 23:46:36 -0700
commit527d644b124fe2e8dfe6e07204f8b22f7a7ab83d (patch)
treed8f18a6e9b694d9b49fdcf95bd3bbf29810822f7 /pod/perldelta.pod
parentc2f605db621edfb16309200bbba8ced984d34476 (diff)
downloadperl-527d644b124fe2e8dfe6e07204f8b22f7a7ab83d.tar.gz
Enable ampersand calls to CORE subs with $$$ prototypes
This applies to functions that just take plain scalar arguments, all of which are mandatory. Functions that take optional arguments are not supported yet. truncate() is not supported yet, either (its $$ prototype is not entirely veracious). This commit enables those functions to be called via &CORE::foo() syn- tax or through references. You can now encrypt a string like this: "string"->CORE::crypt($salt). Each function’s op tree is like this: $ ./perl -Ilib -MO=Concise,CORE::atan2 -e 'BEGIN{\&CORE::atan2}' CORE::atan2: 3 <1> leavesub[1 ref] K/REFC,1 ->(end) 2 <@> atan2[t1] sK ->3 - <0> ex-pushmark s ->1 1 <$> coreargs(IV 100) s ->2 -e syntax OK This commit adds code to ck_fun to skip the argument check if coresubs is present. Otherwise we get a ‘Not enough arguments for atan2’ error.
Diffstat (limited to 'pod/perldelta.pod')
0 files changed, 0 insertions, 0 deletions