Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
prototype() is not documented as accepting no arguments. But it does accept no arguments, and corrupts the stack in the process:
$ ./perl -Ilib -le '$,=" "; print 1,2,3,prototype(),4,5,6'
Here, it steals 3 from the stack and replaces it with undef. Here is a more intriguing example:
$ ./perl -Ilib -le 'print "CORE::undef", prototype()'
Should prototype() be illegal? Or should it mean prototype($_)?
On 28 December 2014 at 23:17, Father Chrysostomos
Well, according to itself, it requires one argument:
perl -E 'say prototype"CORE::prototype"'
which is probably an implementation detail. I see no strong objection against
On 28/12/2014 22:17, Father Chrysostomos (via RT) wrote:
I'd go for the latter, prototype($_), in line with oct(), say(), print()