Perl Subroutine Signatures Opinion Blog

This site is an opinion blog about Perl Subroutine Signatures. Subroutine Signatures is plan to added to Perl in the near future. I have a very strong concern in the future of Perl, so I created an independent site about sub signatures. My name is Yuki Kimoto. I'm Perl Light User. I have no media power, community power, political power, and big company power. I just feel and talk about the heart of a weak perl user without a voice.

Default value expression

In first proposal of subroutine signatures, default value is the following.

sub func($foo //= 0, $bar ||= 0) {

I think this can use only "=" as same as many ohter languages. and "||" is in body if needed.

sub func($foo = 0, $bar) {
  $bar ||= 0;

This expression is general in other languages.


function makecoffee($type = "cappuccino")
    return "Making a cup of $type.\n";


def func_default(arg1, arg2='default_x', arg3='default_y'):


def printHello(msg="No msg", name="No name")
  print(msg + "," + name + "¥n")