The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Clownfish::ParamList - parameter list.

DESCRIPTION

METHODS

new

    my $param_list = Clownfish::ParamList->new(
        variadic => 1,    # default: false
    );
  • variadic - Should be true if the function is variadic.

add_param

    $param_list->add_param( $variable, $value );

Add a parameter to the ParamList.

  • variable - A Clownfish::Variable.

  • value - The default value for the parameter, which should be undef if there is no such value and the parameter is required.

get_variables get_initial_values variadic

Accessors.

num_vars

Return the number of variables in the ParamList, including "self" for methods.

to_c

    # Prints "Obj* self, Foo* foo, Bar* bar".
    print $param_list->to_c;

Return a list of the variable's types and names, joined by commas.

name_list

    # Prints "self, foo, bar".
    print $param_list->name_list;

Return the variable's names, joined by commas.