in reply to Refactoring prototypes - what am I going to break

My (limited) understanding of prototypes is that they modify the way perl parses your code.

Which means that

sub foo($) { ... } bar foo $arg1, $arg2
parses as bar(foo($arg1), $arg2) Whereas without protoypes it parses as bar(foo($arg1, $arg2))

So you could break things by just removing prototypes.

Update: A code example to test this:

sub foo($) { print "foo: $_\n" for @_; return "returned from foo"; } sub bar { print "bar: $_\n" for @_; } bar foo 1, 2; __END__ # with prototype on foo: foo: 1 bar: returned from foo bar: 2 # without prototype: foo: 1 foo: 2 bar: returned from foo

Another way to test this is using B::Deparse: perl -MO=Deparse -e 'sub f($) { 1 }; sub bar { 2 }; bar f 1, 2'